Last active 1752644425

Revision a25e6d68e4159e3493656e86a8dd872201dbb19e

main.cf Raw
1# See /usr/share/postfix/main.cf.dist for a commented, more complete version
2
3# Debian specific: Specifying a file name will cause the first
4# line of that file to be used as the name. The Debian default
5# is /etc/mailname.
6#myorigin = /etc/mailname
7
8smtpd_banner = peppermint.node.swee.codes
9biff = no
10
11# appending .domain is the MUA's job.
12append_dot_mydomain = no
13
14# Uncomment the next line to generate "delayed mail" warnings
15#delay_warning_time = 4h
16
17readme_directory = no
18
19# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
20# fresh installs.
21compatibility_level = 2
22
23# TLS parameters
24smtpd_tls_cert_file=/etc/letsencrypt/live/peppermint.node.swee.codes/fullchain.pem
25smtpd_tls_key_file=/etc/letsencrypt/live/peppermint.node.swee.codes/privkey.pem
26smtpd_use_tls=yes
27smtpd_tls_auth_only = yes
28smtp_tls_security_level = may
29smtpd_tls_security_level = may
30smtpd_sasl_security_options = noanonymous, noplaintext
31smtpd_sasl_tls_security_options = noanonymous
32
33# Authentication
34smtpd_sasl_type = dovecot
35smtpd_sasl_path = private/auth
36smtpd_sasl_auth_enable = yes
37
38# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
39# information on enabling SSL in the smtp client.
40
41# Restrictions
42smtpd_helo_restrictions =
43 permit_mynetworks,
44 permit_sasl_authenticated,
45 reject_invalid_helo_hostname,
46 reject_non_fqdn_helo_hostname
47smtpd_recipient_restrictions =
48 permit_mynetworks,
49 permit_sasl_authenticated,
50 reject_non_fqdn_recipient,
51 reject_unknown_recipient_domain,
52 reject_unlisted_recipient,
53 reject_unauth_destination
54smtpd_sender_restrictions =
55 permit_mynetworks,
56 permit_sasl_authenticated,
57 reject_non_fqdn_sender,
58 reject_unknown_sender_domain
59smtpd_relay_restrictions =
60 permit_mynetworks,
61 permit_sasl_authenticated,
62 defer_unauth_destination
63
64# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
65# information on enabling SSL in the smtp client.
66
67myhostname = peppermint.node.swee.codes
68alias_maps = hash:/etc/aliases
69alias_database = hash:/etc/aliases
70mydomain = swee.codes
71myorigin = swee.codes
72mydestination = localhost
73relayhost =
74mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
75mailbox_size_limit = 0
76recipient_delimiter = +
77inet_interfaces = all
78inet_protocols = all
79
80# Handing off local delivery to Dovecot's LMTP, and telling it where to store mail
81virtual_transport = lmtp:unix:private/dovecot-lmtp
82
83# Virtual domains, users, and aliases
84virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
85virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
86virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,
87 mysql:/etc/postfix/mysql-virtual-email2email.cf
88
89# Even more Restrictions and MTA params
90disable_vrfy_command = yes
91strict_rfc821_envelopes = yes
92#smtpd_etrn_restrictions = reject
93#smtpd_reject_unlisted_sender = yes
94#smtpd_reject_unlisted_recipient = yes
95smtpd_delay_reject = yes
96smtpd_helo_required = yes
97smtp_always_send_ehlo = yes
98#smtpd_hard_error_limit = 1
99smtpd_timeout = 30s
100smtp_helo_timeout = 15s
101smtp_rcpt_timeout = 15s
102smtpd_recipient_limit = 40
103minimal_backoff_time = 180s
104maximal_backoff_time = 3h
105
106# Reply Rejection Codes
107invalid_hostname_reject_code = 550
108non_fqdn_reject_code = 550
109unknown_address_reject_code = 550
110unknown_client_reject_code = 550
111unknown_hostname_reject_code = 550
112unverified_recipient_reject_code = 550
113unverified_sender_reject_code = 550
114milter_protocol = 2
115milter_default_action = accept
116smtpd_milters = inet:localhost:12301
117non_smtpd_milters = inet:localhost:12301
118spamassassin_destination_recipient_limit = 1