-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy-gateway-v2.45.0.sh
1351 lines (940 loc) · 23.7 KB
/
deploy-gateway-v2.45.0.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
EntryPoint()
{
# Default Variables
blank=""
gwVersionDefault="v2.45.0"
gwPortDefault="9001"
gwModeDefault="encrypt-everything"
gwTopologyDefault="outbound"
gwCksDefault="2"
gwInboundRelayDefault=""
gwFqdnDefault="gw.example.com"
gwDomainDefault="example.com"
gwDkimSelectorDefault="gw"
gwOutboundRelayDefault=""
gwAmplitudeTokenDefault="0000000000"
gwHmacNameDefault="0000000000"
gwHmacSecretDefault="0000000000"
gwDefaultFips="2"
# Final Variables
gwName=""
gwVersion=""
gwPort=""
gwMode=""
gwTopology=""
gwInboundRelay=""
gwCks=""
gwCksKey=""
gwFqdn=""
gwDkimSelector=""
gwOutboundRelay=""
gwAmplitudeToken=""
gwHmacName=""
gwHmacSecret=""
gwType=""
gwSmtpdTlsCompliance=""
gwSmtpdSecurityLevel=""
gwSmtpTlsCompliance=""
gwSmtpSecurityLevel=""
# Working Variables
tlsPath=""
tlsKeyFile=""
tlsKeyFull=""
tlsPemFile=""
tlsPemFull=""
dkimPath=""
dkimPrivateFull=""
dkimPublicFull=""
scriptFile=""
# Actions
ShowLogo
GetGwVersion $gwVersionDefault
GetGwPort $gwPortDefault
GetGwMode $gwModeDefault
GetGwTopology $gwTopologyDefault
GetGwFips $gwDefaultFips
GetGwName
GetGwInboundRelay $gwInboundRelayDefault
GetGwCks $gwCksDefault
GetGwFqdn $gwFqdnDefault
GetGwDomain $gwDomainDefault
GetGwDkimSelector $gwDkimSelectorDefault
GetGwOutboundRelay $gwOutboundRelayDefault
GetGwAmplitudeToken $gwAmplitudeTokenDefault
GetGwHmacName $gwHmacNameDefault
GetGwHmacSecret $gwHmacSecretDefault
MakeTlsPathVariables
MakeDkimPathVariables
MakeDirectories
MakeTlsCert
MakeDkimCert
WriteEnv
WriteScript
WriteTestScripts
clear
ShowLogo
ShowNextSteps
}
## Functions
GetGwName() {
if [ $gwTopology = "outbound" ]
then
if [ $gwMode = "encrypt-everything" ]
then
gwName="oe-$gwPort"
fi
if [ $gwMode = "decrypt-everything" ]
then
gwName="od-$gwPort"
fi
if [ $gwMode = "dlp" ]
then
gwName="dlp-out-$gwPort"
fi
else
if [ $gwMode = "encrypt-everything" ]
then
gwName="ie-$gwPort"
fi
if [ $gwMode = "decrypt-everything" ]
then
gwName="id-$gwPort"
fi
if [ $gwMode = "dlp" ]
then
gwName="dlp-in-$gwPort"
fi
fi
}
GetGwVersion() {
local input=""
read -p "Gateway Version [$1]: " input
case "$input" in
$blank )
gwVersion=$1
;;
* )
gwVersion=$input
;;
esac
echo " "
}
GetGwPort() {
local input=""
read -p "Gateway Port [$1]: " input
case "$input" in
$blank )
gwPort=$1
;;
* )
gwPort=$input
;;
esac
echo " "
}
GetGwMode() {
local input=""
echo "Gateway Mode"
echo " Options"
echo " 1 - encrypt-everything"
echo " 2 - decrypt-everything"
echo " 3 - dlp"
echo " "
read -p "Enter 1-3 [$1]: " input
case "$input" in
$blank )
gwMode=$1
;;
1 )
gwMode="encrypt-everything"
;;
2 )
gwMode="decrypt-everything"
;;
3 )
gwMode="dlp"
;;
* )
gwMode=$1
;;
esac
echo " "
}
GetGwTopology() {
local input=""
echo "Gateway Topology"
echo " Options"
echo " 1 - inbound"
echo " 2 - outbound"
echo " "
read -p "Enter 1-2 [$1]: " input
case "$input" in
$blank )
gwTopology=$1
;;
1 )
gwTopology="inbound"
;;
2 )
gwTopology="outbound"
;;
* )
gwTopology=$1
;;
esac
echo " "
}
GetGwFips() {
local input=""
echo "Do you have a FIPS requirement?"
echo " Options"
echo " 1 - Yes"
echo " 2 - No"
echo " "
read -p "Enter 1-2 [$1]: " input
case "$input" in
$blank )
gwType="gateway"
gwSmtpdSecurityLevel="GATEWAY_SMTPD_SECURITY_LEVEL=opportunistic"
gwSmtpdTlsCompliance="# GATEWAY_SMTPD_TLS_COMPLIANCE_UPSTREAM=MEDIUM"
gwSmtpSecurityLevel="GATEWAY_SMTP_SECURITY_LEVEL=opportunistic"
gwSmtpTlsCompliance="# GATEWAY_SMTP_TLS_COMPLIANCE_DOWNSTREAM=MEDIUM"
;;
1 )
gwType="gateway-fips"
gwSmtpdSecurityLevel="GATEWAY_SMTPD_SECURITY_LEVEL=mandatory"
gwSmtpdTlsCompliance="GATEWAY_SMTPD_TLS_COMPLIANCE_UPSTREAM=HIGH"
gwSmtpSecurityLevel="GATEWAY_SMTP_SECURITY_LEVEL=mandatory"
gwSmtpTlsCompliance="GATEWAY_SMTP_TLS_COMPLIANCE_DOWNSTREAM=HIGH"
;;
2 )
gwType="gateway"
gwSmtpdSecurityLevel="GATEWAY_SMTPD_SECURITY_LEVEL=opportunistic"
gwSmtpdTlsCompliance="# GATEWAY_SMTPD_TLS_COMPLIANCE_UPSTREAM=MEDIUM"
gwSmtpSecurityLevel="GATEWAY_SMTP_SECURITY_LEVEL=opportunistic"
gwSmtpTlsCompliance="# GATEWAY_SMTP_TLS_COMPLIANCE_DOWNSTREAM=MEDIUM"
;;
* )
gwType="gateway"
gwSmtpdSecurityLevel="GATEWAY_SMTPD_SECURITY_LEVEL=opportunistic"
gwSmtpdTlsCompliance="# GATEWAY_SMTPD_TLS_COMPLIANCE_UPSTREAM=MEDIUM"
gwSmtpSecurityLevel="GATEWAY_SMTP_SECURITY_LEVEL=opportunistic"
gwSmtpTlsCompliance="# GATEWAY_SMTP_TLS_COMPLIANCE_DOWNSTREAM=MEDIUM"
;;
esac
echo " "
}
GetGwInboundRelay() {
local input=""
echo "Inbound Relay Addresses"
echo " Options"
echo " 1 - G Suite"
echo " 2 - O365"
echo " 3 - All"
echo " 4 - None"
read -p "Enter (1-4) [$1]: " input
case "$input" in
$blank )
gwInboundRelay=$1
;;
1 )
gwInboundRelay="GATEWAY_RELAY_ADDRESSES=35.190.247.0/24,64.233.160.0/19,66.102.0.0/20,66.249.80.0/20,72.14.192.0/18,74.125.0.0/16,108.177.8.0/21,173.194.0.0/16,209.85.128.0/17,216.58.192.0/19,216.239.32.0/19,172.217.0.0/19,172.217.32.0/20,172.217.128.0/19,172.217.160.0/20,172.217.192.0/19,108.177.96.0/19,35.191.0.0/16,130.211.0.0/22"
;;
2 )
gwInboundRelay="GATEWAY_RELAY_ADDRESSES=23.103.132.0/22,23.103.136.0/21,23.103.144.0/20,23.103.198.0/23,23.103.200.0/22,23.103.212.0/22,40.92.0.0/14,40.107.0.0/17,40.107.128.0/18,52.100.0.0/14,65.55.88.0/24,65.55.169.0/24,94.245.120.64/26,104.47.0.0/17,104.212.58.0/23,134.170.132.0/24,134.170.140.0/24,157.55.234.0/24,157.56.110.0/23,157.56.112.0/24,207.46.51.64/26,207.46.100.0/24,207.46.163.0/24,213.199.154.0/24,213.199.180.128/26,216.32.180.0/23"
;;
3 )
gwInboundRelay="GATEWAY_RELAY_ADDRESSES=0.0.0.0/0"
;;
4 )
gwInboundRelay="GATEWAY_RELAY_ADDRESSES="
;;
* )
gwInboundRelay="GATEWAY_RELAY_ADDRESSES=$1"
;;
esac
echo " "
}
GetGwCks() {
local input=""
echo "CKS Enabled"
echo " Options"
echo " 1 - Yes"
echo " 2 - No"
echo " "
read -p "Enter 1-2 [$1]: " input
case "$input" in
$blank )
gwCks="# GATEWAY_ENCRYPTION_KEY_PROVIDER=CKS"
gwCksKey="# GATEWAY_CKS_SESSION_KEY_EXPIRY_IN_MINS=360"
;;
1 )
gwCks="GATEWAY_ENCRYPTION_KEY_PROVIDER=CKS"
gwCksKey="GATEWAY_CKS_SESSION_KEY_EXPIRY_IN_MINS=360"
;;
2 )
gwCks="# GATEWAY_ENCRYPTION_KEY_PROVIDER=CKS"
gwCksKey="# GATEWAY_CKS_SESSION_KEY_EXPIRY_IN_MINS=360"
;;
* )
gwCks="# GATEWAY_ENCRYPTION_KEY_PROVIDER=CKS"
gwCksKey="# GATEWAY_CKS_SESSION_KEY_EXPIRY_IN_MINS=360"
;;
esac
echo " "
if [ $gwMode = "decrypt-everything" ]
then
gwCks="GATEWAY_ENCRYPTION_KEY_PROVIDER=CKS"
gwCksKey="GATEWAY_CKS_SESSION_KEY_EXPIRY_IN_MINS=360"
fi
}
GetGwFqdn() {
local input=""
read -p "Gateway FQDN [$1]: " input
case "$input" in
$blank )
gwFqdn=$1
;;
* )
gwFqdn=$input
;;
esac
echo " "
}
GetGwDomain() {
local input=""
read -p "Gateway Domain [$1]: " input
case "$input" in
$blank )
gwDomain=$1
;;
* )
gwDomain=$input
;;
esac
echo " "
}
GetGwOutboundRelay() {
local input=""
echo "Outbound Relay - Next Hop in SMTP mailflow after the gateway."
echo " Gmail Relay"
echo " [smtp-relay.gmail.com]:587"
echo " "
echo " Office 365"
echo " [MX Record]:25"
echo " "
echo " Custom"
echo " [1.1.1.1]:25"
echo " "
echo " Blank (Gateway performs final delivery)"
read -p "Enter Relay Address []: " input
case "$input" in
$blank )
gwOutboundRelay="# GATEWAY_TRANSPORT_MAPS=*=>$1"
;;
* )
gwOutboundRelay="GATEWAY_TRANSPORT_MAPS=*=>$input"
;;
esac
echo " "
}
GetGwDkimSelector() {
local input=""
read -p "Gateway DKIM Selector [$1]: " input
case "$input" in
$blank )
gwDkimSelector=$1
;;
* )
gwDkimSelector=$input
;;
esac
echo " "
}
GetGwAmplitudeToken() {
local input=""
read -p "Amplitude Token (Provided by Virtru) [$1]: " input
case "$input" in
$blank )
gwAmplitudeToken=$1
;;
* )
gwAmplitudeToken=$input
;;
esac
echo " "
}
GetGwHmacName() {
local input=""
read -p "Token ID (Provided by Virtru) [$1]: " input
case "$input" in
$blank )
gwHmacName=$1
;;
* )
gwHmacName=$input
;;
esac
echo " "
}
GetGwHmacSecret() {
local input=""
read -p "Token (Provided by Virtru) [$1]: " input
case "$input" in
$blank )
gwHmacSecret=$1
;;
* )
gwHmacSecret=$input
;;
esac
echo " "
}
MakeTlsPathVariables() {
tlsPath="/var/virtru/vg/tls/$gwFqdn"
tlsKeyFile="client.key"
tlsKeyFull="$tlsPath/$tlsKeyFile"
tlsPemFile="client.pem"
tlsPemFull="$tlsPath/$tlsPemFile"
}
MakeDkimPathVariables() {
dkimPath="/var/virtru/vg/dkim"
dkimPrivateFull="$dkimPath/$gwDkimSelector"
dkimPrivateFull="$dkimPrivateFull._domainkey.$gwDomain.pem"
dkimPublicFull="$dkimPath/$gwDkimSelector._domainkey.$gwDomain-public.pem"
}
MakeDirectories(){
mkdir -p /var/virtru/vg/
mkdir -p /var/virtru/vg/env
mkdir -p /var/virtru/vg/scripts
mkdir -p /var/virtru/vg/tls
mkdir -p /var/virtru/vg/queue
mkdir -p /var/virtru/vg/queue/$gwName
chown -R 149:149 /var/virtru/vg/queue/$gwName
mkdir -p /var/virtru/vg/test
mkdir -p $tlsPath
mkdir -p /var/virtru/vg/dkim
}
MakeTlsCert(){
## Make TLS Certs
openssl genrsa -out $tlsKeyFull 2048
openssl req -new -key $tlsKeyFull -x509 -subj /CN=$gwFqdn -days 3650 -out $tlsPemFull
}
MakeDkimCert(){
openssl genrsa -out $dkimPrivateFull 1024 -outform PEM
openssl rsa -in $dkimPrivateFull -out $dkimPublicFull -pubout -outform PEM
}
WriteTestScripts(){
testScript1=/var/virtru/vg/test/checkendpoints.sh
/bin/cat <<EOM >$testScript1
#!/bin/bash
echo https://google.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://google.com
echo ""
echo https://acm.virtru.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://acm.virtru.com
echo ""
echo https://api.virtru.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://acm.virtru.com
echo ""
echo https://accounts.virtru.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://accounts.virtru.com
echo ""
echo https://secure.virtru.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://secure.virtru.com
echo ""
echo https://api.amplitude.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://api.amplitude.com
echo ""
echo https://cdn.virtru.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://cdn.virtru.com
echo ""
echo https://hub.docker.com
curl --connect-timeout 10 -o /dev/null --silent --head --write-out '%{http_code}\n' https://hub.docker.com
echo ""
EOM
testScript2=/var/virtru/vg/test/runall.sh
/bin/cat <<EOM >$testScript2
#!/bin/bash
for container in \`docker ps -q\`; do
# show the name of the container
docker inspect --format='{{.Name}}' \$container;
# run the command (date in the case)
docker exec -it \$container \$1
done
EOM
testScript3=/var/virtru/vg/test/sendtestmessage.sh
/bin/cat <<EOM >$testScript3
#!/bin/bash
echo "Update Virtru Gateway ENV file to include the lan ip of the Gateway."
echo "Use the lan IP and not the loopback (127.0.0.1)"
read -p "SMTP Server: " server
read -p "SMTP Port: " port
read -p "FROM: " from
read -p "TO: " to
swaks --To \$to --From \$from --header "Subject: Test mail" --body "This is a test mail" --server \$server --port \$port -tls -4
EOM
}
ShowLogo() {
echo " "
echo " +++ '++."
echo " +++ ++++"
echo " ++++"
echo " ,::: +++ +++ :+++++++ +++++++ .+++++++ .++ '++"
echo " ++++ .+++. '+++ ++++++++++ ++++++++ ++++++++++ ++++ ++++"
echo " ++++ ++++ ++++ +++++''++ +++++++ +++++++++ ++++ ++++"
echo " ++++ .++++ ++++ ++++ ++++ ++++ ++++ ++++"
echo " ++++ .++++ ++++ ++++ ++++ ++++ ++++ ++++"
echo " ++++ ++++ ++++ ++++ ++++ ++++ ++++ ++++"
echo " ++++++ ;+++ ++++ ++++ ++++ ++++++++"
echo " ++++ +++ ++' ++ ++' .++++"
echo " "
echo " R e s p e c t t h e D a t a"
echo " "
echo " "
}
WriteEnv() {
envFile=/var/virtru/vg/env/$gwName.env
/bin/cat <<EOM >$envFile
# Required to match the CN (Common Name) on the certificate.
# TLS will not function unless this matches.
#
GATEWAY_HOSTNAME=$gwFqdn
# Enable verbose logging in Gateway.
# Values
# Enable: 1
# Disable: 0
# Default: 0
# Required: No
# Note: Set this to 0 unless you are debugging something.
#
GATEWAY_VERBOSE_LOGGING=0
# Domain name of organization
# Values
# Domain
# Required: Yes
#
GATEWAY_ORGANIZATION_DOMAIN=$gwDomain
# Comma delimited list of trusted networks in CIDR formate.
# Inbound addresses allowed to connect to the gateway
# Values (examples)
# All IP: 0.0.0.0/0
# 2 IP: 2.2.2.2/32,2.2.2.3/32
# Required: Yes
#
$gwInboundRelay
# Enable Proxy Protocol for SMTP.
# For use behind a load balancer.
# Values
# Enable: 1
# Disable: 0
# Default: 1
# Required: No
#
GATEWAY_PROXY_PROTOCOL=0
# Define the next-hop destination and port, supports FQDN and IPV4 address
# Values
# Not defined/Commented out - Final delivery by MX
# GATEWAY_TRANSPORT_MAPS=*=>[Next hop FQDN]:port
# Default: Not defined/Commented out - Final delivery by MX
# Required: No
#
# Examples:
#
# Gmail Relay
# GATEWAY_TRANSPORT_MAPS=*=>[smtp-relay.gmail.com]:587
#
# Office 365
# GATEWAY_TRANSPORT_MAPS=*=>[MX Record]:25
#
# Custom
# GATEWAY_TRANSPORT_MAPS=*=>[1.1.1.1]:25
#
$gwOutboundRelay
# The mode for the Gateway.
# Values
# decrypt-everything
# encrypt-everything
# dlp - Use rules defined on Virtru Dashboard (https://secure.virtru.com/dashboard)
# Default: encrypt-everything
# Required: Yes
#
GATEWAY_MODE=$gwMode
# Topology of the gateway.
# Values
# outbound
# inbound
# Default: outbound
# Required: Yes
GATEWAY_TOPOLOGY=$gwTopology
# URL to Virtru's ACM service.
# Required: Yes
# Note: Do not change this.
#
GATEWAY_ACM_URL=https://api.virtru.com/acm
# URL to Virtru's Accounts service.
# Required: Yes
# Note: Do not change this.
#
GATEWAY_ACCOUNTS_URL=https://api.virtru.com/accounts
# The base URL for remote content.
# Required: Yes
# Note: Do not change unless directed by Virtru. If Custom Secure Reader URL is in use the URL should match.
#
GATEWAY_REMOTE_CONTENT_BASE_URL=https://secure.virtru.com/start
# DKIM certificate information
# Values
# Not defined/Commented out - Gateway will not perform any DKIM signing
# Complete record for DKIM signing
# Required: No
# Example:
# GATEWAY_DKIM_DOMAINS=gw._domainkey.example.com
#
# GATEWAY_DKIM_DOMAINS=$gwDkimSelector._domainkey.$gwDomain
# HMAC Token Name to connect to Virtru services such as Accounts and ACM.
# Values
# Value provided by Virtru
# Required: Yes
# Note:Contact Virtru Support for getting your token Name.
#
GATEWAY_API_TOKEN_NAME=$gwHmacName
# HMAC Token Secret to connect to Virtru services such as Accounts and ACM.
# Values
# Value provided by Virtru
# Required: Yes
# Note:Contact Virtru Support for getting your Token Secret.
#
GATEWAY_API_TOKEN_SECRET=$gwHmacSecret
# Amplitude Token to connect to the Virtru Events platform
# Values
# Value provided by Virtru
# Required: Yes
# Note:Contact Virtru Support for getting your Token.
#
GATEWAY_AMPLITUDE_API_KEY=$gwAmplitudeToken
# Consider a message as undeliverable, when delivery fails with a temporary error, and the time in the queue
# has reached the maximal_queue_lifetime limit.
# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is d (days).
# Postfix default is '5d'. Set this ENV variable if default does not work.
# Values
# NumberUnits
# Default: 5d
# Required: No
# Note: Specify 0 when mail delivery should be tried only once.
#
MAX_QUEUE_LIFETIME=5m
# The maximal time between attempts to deliver a deferred message.
# Values
# NumberUnits
# Default: 4000s
# Required: No
# Note: Set to a value greater than or equal to MIN_BACKOFF_TIME
#
MAX_BACKOFF_TIME=45s
# The minimal time between attempts to deliver a deferred message
# Values
# NumberUnits
# Default: 300s
# Required: No
# Note: Set to a value greater than or equal to MIN_BACKOFF_TIME
#
MIN_BACKOFF_TIME=30s
# The time between deferred queue scans by the queue manager
# Values
# NumberUnits
# Default: 300s
# Required: No
#
QUEUE_RUN_DELAY=30s
# Gateway Inbound
# Enable Inbound TLS to the Gateway.
# Values
# 1 Enabled
# 0 Disabled
# Default: 1
# Required: No
#
GATEWAY_SMTPD_USE_TLS=1
# TLS Compliance Level for upstream (inbound) connections.
# This sets TLS version and cipher list accordingly.
# Customer is still responsible for following other NIST and/or OWASP recommendations,
# notably making sure certificates are signed and keys are rotated regularly.
# Values:
# LOW
# MEDIUM
# HIPPA_2018
# PCI_321
# HIGH
#
# Default: N/A
# Required: No
# Note: If any level above LOW, you must set:
# GATEWAY_SMTPD_SECURITY_LEVEL= mandatory
# GATEWAY_SMTPD_USE_TLS=1
#
#
$gwSmtpdTlsCompliance
# Gateway Inbound
# TLS level for inbound connections
# Values
# none
# mandatory
# opportunistic
# Require: No
# Note: Only used when:
# GATEWAY_SMTPD_USE_TLS=1
#
$gwSmtpdSecurityLevel
# Gateway Outbound
# Enable TLS at the Gateway.
# Values
# 1 Enabled