Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # What networks are mine/will I send mail from
- mynetworks = 192.168.1.0/24, 192.168.2.0/24
- # What is my IP
- relay_domains = mindlesstux.com
- # I dont map anything for store'n'forward
- relay_recipient_maps =
- virtual_alias_domains =
- virtual_mailbox_domains =
- # Send all mail to:
- # https://www.postfix.org/postconf.5.html#best_mx_transport
- best_mx_transport = smtp:10.120.1.248:25
- # VPS DNS name
- smtp_helo_name = eos.mindlesstux.com
- # Do some basic things
- smtpd_helo_required = yes
- # Helo restrictions https://www.postfix.org/postconf.5.html#smtpd_helo_restrictions
- # ... Check local file for cidrs
- # ... reject_unauth_pipelining: Drop clients sending cmds out of sequence, probably does not need to be here
- # ... reject_non_fqdn_helo_hostname: Match HELO/EHLO domain, drop otherwise
- # ... reject_invalid_helo_hostname: Reject invaild HELO/EHLO syntax
- # ... reject_unknown_helo_hostname: Reject when HELO/EHLO have no A/MX DNS Record
- # ... reject_rhsbl_helo: Checks RBLs (Yes I check several)
- smtpd_helo_restrictions =
- check_helo_access cidr:/etc/postfix/checks/check_helo_access,
- reject_unauth_pipelining,
- reject_non_fqdn_helo_hostname,
- reject_invalid_helo_hostname,
- reject_unknown_helo_hostname,
- reject_rhsbl_helo zen.spamhaus.org
- reject_rhsbl_helo dnsbl.dronebl.org,
- reject_rhsbl_helo dnsbl.sorbs.net,
- reject_rhsbl_helo bl.spamcop.net,
- reject_rhsbl_helo cbl.abuseat.org,
- reject_rhsbl_helo b.barracudacentral.org,
- # Sender restrictions https://www.postfix.org/postconf.5.html#smtpd_sender_restrictions
- # ... Check local file for cidrs
- # ... reject_unauth_pipelining: Drop clients sending cmds out of sequence, probably does not need to be here
- # ... reject_non_fqdn_sender: If FROM is not up to RFC, drop
- # ... reject_unlisted_sender: If FROM is not listed in a list of valid recipients (domain(s))
- # ... reject_unknown_sender_domain: see man page, to long to summarize
- # ... reject_rhsbl_sender: Check RBLs
- # ... Check a blacklist file
- smtpd_sender_restrictions =
- check_sender_access cidr:/etc/postfix/checks/client_sender_checks,
- reject_unauth_pipelining,
- reject_non_fqdn_sender,
- reject_unlisted_sender,
- reject_unknown_sender_domain,
- reject_rhsbl_sender zen.spamhaus.org
- reject_rhsbl_sender dnsbl.dronebl.org,
- reject_rhsbl_sender dnsbl.sorbs.net,
- reject_rhsbl_sender bl.spamcop.net,
- reject_rhsbl_sender cbl.abuseat.org,
- reject_rhsbl_sender b.barracudacentral.org,
- check_sender_access hash:/etc/postfix/checks/blacklisted_recipient_domains,
- # Recipient Restrictions https://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions
- # ... permit_mynetworks: Allow my ip/cidrs and domain(s)
- # ... reject_unauth_pipelining: Drop clients sending cmds out of sequence, probably does not need to be here
- # ... reject_non_fqdn_recipient: Reject when RCPT TO is not in line with RFC
- # ... reject_invalid_hostname: HELO/EHLO hostname syntax check (older cfg thing, check version and man page)
- # ... reject_unauth_destination: Reject reasons, check man page
- # ... reject_rbl_client: Check RBLs
- # ... check_recipient_access: Check blacklist file
- # ... check_policy_service: Hand off to program to check SPF records (omit unless you have)
- smtpd_recipient_restrictions =
- permit_mynetworks,
- reject_unauth_pipelining,
- reject_non_fqdn_recipient,
- reject_invalid_hostname,
- reject_unauth_destination
- reject_rbl_client zen.spamhaus.org,
- reject_rbl_client dnsbl.sorbs.net,
- reject_rbl_client dnsbl.dronebl.org,
- reject_rbl_client bl.spamcop.net,
- reject_rbl_client cbl.abuseat.org,
- reject_rbl_client b.barracudacentral.org,
- check_recipient_access hash:/etc/postfix/checks/blacklisted_recipient_domains,
- check_policy_service unix:private/policyd-spf,
- # Client Restrictions https://www.postfix.org/postconf.5.html#smtpd_client_restrictions
- # ... permit_mynetworks: Allow my ip/cidrs and domain(s)
- # ... check_client_access: Check file for what clients could access
- # ... reject_unknown_reverse_client_hostname: Reject the request when the client IP address has no address->name mapping.
- # ... reject_unauth_pipelining: Drop clients sending cmds out of sequence, probably does not need to be here
- # ... Allow
- smtpd_client_restrictions =
- permit_mynetworks,
- check_client_access cidr:/etc/postfix/checks/client_sender_checks,
- reject_unknown_reverse_client_hostname,
- reject_unauth_pipelining
- permit
- # Relay Restrictions https://www.postfix.org/postconf.5.html#smtpd_relay_restrictions
- # ... permit_mynetworks: Match mynetworks
- # ... permit_sasl_authenticated: Permit when client is authenticated (I should probably drop this)
- # ... reject_unauth_destination: Reject unless... https://www.postfix.org/postconf.5.html#reject_unauth_destination
- smtpd_relay_restrictions =
- permit_mynetworks,
- permit_sasl_authenticated,
- reject_unauth_destination
- # SSL/TLS certificates (done via LE)
- smtp_tls_key_file = /etc/letsencrypt/live/mindlesstux.com/privkey.pem
- smtp_tls_cert_file = /etc/letsencrypt/live/mindlesstux.com/fullchain.pem
- #smtp_tls_CAfile = /etc/letsencrypt/live/mindlesstux.com/fullchain.pem
- smtp_tls_loglevel = 1
- smtp_tls_security_level = may
- smtp_tls_mandatory_protocols=!SSLv2,!SSLv3
- smtp_tls_protocols=!SSLv2,!SSLv3
- smtp_tls_note_starttls_offer = yes
- smtpd_tls_received_header = yes
- smtpd_delay_reject = yes
- smtpd_tls_key_file = /etc/letsencrypt/live/mindlesstux.com/privkey.pem
- smtpd_tls_cert_file = /etc/letsencrypt/live/mindlesstux.com/fullchain.pem
- #smtpd_tls_CAfile = /etc/letsencrypt/live/mindlesstux.com/fullchain.pem
- smtpd_tls_loglevel = 1
- smtpd_tls_security_level = may
- smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
- smtpd_tls_protocols=!SSLv2,!SSLv3
- # Send mail to other programs to handle mail filtering/checking
- # https://www.postfix.org/postconf.5.html#smtpd_milters
- smtpd_milters = inet:127.0.0.1:8891,inet:127.0.0.1:8893
- # https://www.postfix.org/postconf.5.html#milter_protocol
- milter_protocol = 6
- # https://www.postfix.org/postconf.5.html#non_smtpd_milters
- non_smtpd_milters = $smtpd_milters
- # https://www.postfix.org/postconf.5.html#milter_default_action
- milter_default_action = accept
Advertisement
Add Comment
Please, Sign In to add comment