Advertisement
Guest User

mail.conf

a guest
Nov 20th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. # Use TLS certs generated by acme-client
  2. pki mail-mx.example.com cert "/etc/ssl/mail-mx.example.com.fullchain.pem"
  3. pki mail-mx.example.com key "/etc/ssl/private/mail-mx.example.com.key"
  4.  
  5. # Checks for improperly/poorly set up mail servers and REJECTS them
  6. # filter check_dyndns phase connect match rdns regex { '.*\.dyn\..*', '.*\.dsl\..*' } disconnect "550 no residential connections"
  7. # filter check_rdns phase connect match !rdns disconnect "550 no rDNS is so 80s"
  8. # filter check_fcrdns phase connect match !fcrdns disconnect "550 no FCrDNS is so 80s"
  9. # Junk and blocks mails below a certain threshhold
  10. # filter senderscore proc-exec "filter-senderscore -blockBelow 10 -junkBelow 70 -slowFactor 5000"
  11.  
  12. # Checks for improperly/poorly set up mail servers and JUNKS them
  13. filter check_dyndns phase connect match rdns regex { '.*\.dyn\..*', '.*\.dsl\..*' } junk
  14. filter check_rdns phase connect match !rdns junk
  15. filter check_fcrdns phase connect match !fcrdns junk
  16. # Only junk below a certain threshhold, not block
  17. filter senderscore proc-exec "filter-senderscore -junkBelow 70 -slowFactor 5000"
  18.  
  19. filter rspamd proc-exec "filter-rspamd"
  20.  
  21. table aliases file:/etc/mail/aliases
  22. table domains file:/etc/mail/domains
  23. table virtuals file:/etc/mail/virtual
  24. table passwd file:/etc/mail/passwd
  25. table ipv4_addr { 155.138.222.150 }
  26.  
  27. listen on all tls pki mail-mx.example.com filter { check_dyndns, check_rdns, check_fcrdns, senderscore, rspamd }
  28. listen on all port submission tls-require pki mail-mx.example.com auth <passwd> filter rspamd mask-src
  29.  
  30. # action "local_mail" maildir junk alias <aliases>
  31. action "local_mail" lmtp "/var/dovecot/lmtp" rcpt-to alias <aliases>
  32. action "external_mail" lmtp "/var/dovecot/lmtp" rcpt-to virtual <virtuals>
  33. #action "external_mail" maildir junk virtual <virtuals>
  34. action "outbound" relay helo mail-mx.example.com
  35.  
  36. # Uncomment the following to accept external mail for domain "example.org"
  37. # match from any for domain "example.com" action "local_mail"
  38. match from any for domain <domains> action "external_mail"
  39. match for local action "local_mail"
  40.  
  41. match from any auth for any action "outbound"
  42. match for any action "outbound"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement