public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Trace
data/conf/postfix/main.cf
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
# --------------------------------------------------------------------------
2
# Please create a file "extra.cf" for persistent overrides to main.cf
3
# --------------------------------------------------------------------------
4
biff = no
5
append_dot_mydomain = no
6
smtpd_tls_cert_file = /etc/ssl/mail/cert.pem
7
smtpd_tls_key_file = /etc/ssl/mail/key.pem
8
tls_server_sni_maps = hash:/opt/postfix/conf/sni.map
9
smtpd_tls_received_header = yes
10
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
11
smtpd_relay_restrictions = permit_mynetworks,
12
permit_sasl_authenticated,
13
defer_unauth_destination
14
smtpd_forbid_bare_newline = yes
15
# alias maps are auto-generated in postfix.sh on startup
16
alias_maps = hash:/etc/aliases
17
alias_database = hash:/etc/aliases
18
relayhost =
19
mynetworks_style = subnet
20
mailbox_size_limit = 0
21
recipient_delimiter = +
22
inet_interfaces = all
23
inet_protocols = all
24
bounce_queue_lifetime = 1d
25
broken_sasl_auth_clients = yes
26
disable_vrfy_command = yes
27
maximal_backoff_time = 1800s
28
maximal_queue_lifetime = 5d
29
delay_warning_time = 4h
30
message_size_limit = 104857600
31
milter_default_action = tempfail
32
milter_protocol = 6
33
minimal_backoff_time = 300s
34
plaintext_reject_code = 550
35
postscreen_access_list = permit_mynetworks,
36
cidr:/opt/postfix/conf/custom_postscreen_whitelist.cidr,
37
cidr:/opt/postfix/conf/postscreen_access.cidr,
38
tcp:127.0.0.1:10027
39
postscreen_bare_newline_enable = no
40
postscreen_denylist_action = drop
41
postscreen_cache_cleanup_interval = 24h
42
postscreen_cache_map = proxy:btree:$data_directory/postscreen_cache
43
postscreen_dnsbl_action = enforce
44
postscreen_dnsbl_threshold = 6
45
postscreen_dnsbl_ttl = 5m
46
postscreen_greet_action = enforce
47
postscreen_greet_banner = $smtpd_banner
48
postscreen_greet_ttl = 2d
49
postscreen_greet_wait = 3s
50
postscreen_non_smtp_command_enable = no
51
postscreen_pipelining_enable = no
52
proxy_read_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_transport_maps.cf,
53
proxy:mysql:/opt/postfix/conf/sql/mysql_mbr_access_maps.cf,
54
proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf,
55
$sender_dependent_default_transport_maps,
56
$smtp_tls_policy_maps,
57
$local_recipient_maps,
58
$mydestination,
59
$virtual_alias_maps,
60
$virtual_alias_domains,
61
$virtual_mailbox_maps,
62
$virtual_mailbox_domains,
63
$relay_recipient_maps,
64
$relay_domains,
65
$canonical_maps,
66
$sender_canonical_maps,
67
$sender_bcc_maps,
68
$recipient_bcc_maps,
69
$recipient_canonical_maps,
70
$relocated_maps,
71
$transport_maps,
72
$mynetworks,
73
$smtpd_sender_login_maps,
74
$smtp_sasl_password_maps
75
queue_run_delay = 300s
76
relay_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf
77
relay_recipient_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_relay_recipient_maps.cf
78
sender_dependent_default_transport_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sender_dependent_default_transport_maps.cf
79
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
80
smtp_tls_cert_file = /etc/ssl/mail/cert.pem
81
smtp_tls_key_file = /etc/ssl/mail/key.pem
82
smtp_tls_loglevel = 1
83
smtp_dns_support_level = dnssec
84
smtp_tls_security_level = dane
85
smtpd_data_restrictions = reject_unauth_pipelining, permit
86
smtpd_delay_reject = yes
87
smtpd_error_sleep_time = 10s
88
smtpd_forbid_bare_newline = yes
89
smtpd_hard_error_limit = ${stress?1}${stress:5}
90
smtpd_helo_required = yes
91
smtpd_proxy_timeout = 600s
92
smtpd_recipient_restrictions = check_recipient_mx_access proxy:mysql:/opt/postfix/conf/sql/mysql_mbr_access_maps.cf,
93
permit_sasl_authenticated,
94
permit_mynetworks,
95
check_recipient_access proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf,
96
reject_invalid_helo_hostname,
97
reject_unauth_destination
98
smtpd_sasl_auth_enable = yes
99
smtpd_sasl_authenticated_header = yes
100
smtpd_sasl_path = inet:dovecot:10001
101
smtpd_sasl_type = dovecot
102
smtpd_sender_login_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_sender_acl.cf
103
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch,
104
permit_mynetworks,
105
permit_sasl_authenticated,
106
reject_unlisted_sender,
107
reject_unknown_sender_domain
108
smtpd_soft_error_limit = 3
109
smtpd_tls_auth_only = yes
110
smtpd_tls_exclude_ciphers = ECDHE-RSA-RC4-SHA, RC4, aNULL, DES-CBC3-SHA, ECDHE-RSA-DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA
111
smtpd_tls_loglevel = 1
113
# Mandatory protocols and ciphers are used when a connections is enforced to use TLS
114
# Does _not_ apply to enforced incoming TLS settings per mailbox
115
smtp_tls_mandatory_protocols = >=TLSv1.2
116
lmtp_tls_mandatory_protocols = >=TLSv1.2
117
smtpd_tls_mandatory_protocols = >=TLSv1.2
118
smtpd_tls_mandatory_ciphers = high
120
smtp_tls_protocols = >=TLSv1.2
121
lmtp_tls_protocols = >=TLSv1.2
122
smtpd_tls_protocols = >=TLSv1.2
124
smtpd_tls_security_level = may
125
tls_preempt_cipherlist = yes
126
tls_ssl_options = NO_COMPRESSION, NO_RENEGOTIATION
127
virtual_alias_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_maps.cf,
128
proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_resource_maps.cf,
129
proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_spamalias_maps.cf,
130
proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_domain_maps.cf
131
virtual_gid_maps = static:5000
132
virtual_mailbox_base = /var/vmail/
133
virtual_mailbox_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_domains_maps.cf
134
# -- moved to rspamd on 2021-06-01
135
#recipient_bcc_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_bcc_maps.cf
136
#sender_bcc_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sender_bcc_maps.cf
137
recipient_canonical_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_canonical_maps.cf
138
recipient_canonical_classes = envelope_recipient
139
virtual_mailbox_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf
140
virtual_minimum_uid = 104
141
virtual_transport = lmtp:inet:dovecot:24
142
virtual_uid_maps = static:5000
143
smtpd_milters = inet:rspamd:9900
144
non_smtpd_milters = inet:rspamd:9900
145
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
146
mydestination = localhost.localdomain, localhost
147
smtp_address_preference = any
148
smtp_sender_dependent_authentication = yes
149
smtp_sasl_auth_enable = yes
150
smtp_sasl_password_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_sender_dependent.cf
151
smtp_sasl_security_options =
152
smtp_sasl_mechanism_filter = plain, login
153
smtp_tls_policy_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_tls_policy_override_maps.cf socketmap:inet:postfix-tlspol:8642:QUERY
154
smtp_header_checks = pcre:/opt/postfix/conf/anonymize_headers.pcre
155
mail_name = Postcow
156
# local_transport map catches local destinations and prevents routing local dests when the next map would route "*"
157
# Use custom_transport.pcre for custom transports
158
transport_maps = pcre:/opt/postfix/conf/custom_transport.pcre,
159
pcre:/opt/postfix/conf/local_transport,
160
proxy:mysql:/opt/postfix/conf/sql/mysql_relay_ne.cf,
161
proxy:mysql:/opt/postfix/conf/sql/mysql_transport_maps.cf
162
smtp_sasl_auth_soft_bounce = no
163
postscreen_discard_ehlo_keywords = chunking, silent-discard, smtputf8, dsn
164
smtpd_discard_ehlo_keywords = chunking, silent-discard, smtputf8
165
compatibility_level = 3.7
166
# Define protocols for SMTPS and submission service
167
submission_smtpd_tls_mandatory_protocols = >=TLSv1.2
168
smtps_smtpd_tls_mandatory_protocols = >=TLSv1.2
169
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,qmqpd_authorized_clients
170
# This Option is added to correctly set the X-Original-To Header when mails are send to lmtp (dovecot)
171
lmtp_destination_recipient_limit=1
173
# DO NOT EDIT ANYTHING BELOW #
174
# Overrides #