master.cf 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # inter-mx with postscreen on 25/tcp
  2. smtp inet n - n - 1 postscreen
  3. smtpd pass - - n - - smtpd
  4. -o smtpd_helo_restrictions=permit_mynetworks,reject_non_fqdn_helo_hostname
  5. -o smtpd_sasl_auth_enable=no
  6. -o smtpd_sender_restrictions=permit_mynetworks,reject_unlisted_sender,reject_unknown_sender_domain
  7. # smtpd tls-wrapped (smtps) on 465/tcp
  8. smtps inet n - n - - smtpd
  9. -o smtpd_tls_wrappermode=yes
  10. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  11. -o smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
  12. -o tls_preempt_cipherlist=yes
  13. # smtpd with starttls on 587/tcp
  14. submission inet n - n - - smtpd
  15. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  16. -o smtpd_enforce_tls=yes
  17. -o smtpd_tls_security_level=encrypt
  18. -o smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
  19. -o tls_preempt_cipherlist=yes
  20. # used by SOGo
  21. # smtpd_sender_restrictions should match main.cf, but with check_sasl_access prepended for login-as-mailbox-user function
  22. 588 inet n - n - - smtpd
  23. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  24. -o smtpd_tls_auth_only=no
  25. -o smtpd_sender_restrictions=check_sasl_access,regexp:/opt/postfix/conf/allow_mailcow_local.regexp,reject_authenticated_sender_login_mismatch,permit_mynetworks,permit_sasl_authenticated,reject_unlisted_sender,reject_unknown_sender_domain
  26. # used to reinject quarantine mails
  27. 590 inet n - n - - smtpd
  28. -o smtpd_client_restrictions=permit_mynetworks,reject
  29. -o smtpd_tls_auth_only=no
  30. -o smtpd_milters=
  31. -o non_smtpd_milters=
  32. # enforced smtp connector
  33. smtp_enforced_tls unix - - n - - smtp
  34. -o smtp_tls_security_level=encrypt
  35. -o syslog_name=enforced-tls-smtp
  36. -o smtp_delivery_status_filter=pcre:/opt/postfix/conf/smtp_dsn_filter
  37. # smtp connector used, when a transport map matched
  38. # this helps to have different sasl maps than we have with sender dependent transport maps
  39. smtp_via_transport_maps unix - - n - - smtp
  40. -o smtp_sasl_password_maps=proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_transport_maps.cf
  41. tlsproxy unix - - n - 0 tlsproxy
  42. dnsblog unix - - n - 0 dnsblog
  43. pickup fifo n - n 60 1 pickup
  44. cleanup unix n - n - 0 cleanup
  45. qmgr fifo n - n 300 1 qmgr
  46. tlsmgr unix - - n 1000? 1 tlsmgr
  47. rewrite unix - - n - - trivial-rewrite
  48. bounce unix - - n - 0 bounce
  49. defer unix - - n - 0 bounce
  50. trace unix - - n - 0 bounce
  51. verify unix - - n - 1 verify
  52. flush unix n - n 1000? 0 flush
  53. proxymap unix - - n - - proxymap
  54. proxywrite unix - - n - 1 proxymap
  55. smtp unix - - n - - smtp
  56. relay unix - - n - - smtp
  57. showq unix n - n - - showq
  58. error unix - - n - - error
  59. retry unix - - n - - error
  60. discard unix - - n - - discard
  61. local unix - n n - - local
  62. virtual unix - n n - - virtual
  63. lmtp unix - - n - - lmtp
  64. anvil unix - - n - 1 anvil
  65. scache unix - - n - 1 scache
  66. maildrop unix - n n - - pipe flags=DRhu
  67. user=vmail argv=/usr/bin/maildrop -d ${recipient}
  68. # start whitelist_fwd
  69. 127.0.0.1:10027 inet n n n - 0 spawn user=nobody argv=/usr/local/bin/whitelist_forwardinghosts.sh
  70. # end whitelist_fwd
  71. # start watchdog-specific
  72. # logs to local7 (hidden)
  73. 589 inet n - n - - smtpd
  74. -o smtpd_client_restrictions=permit_mynetworks,reject
  75. -o syslog_name=watchdog
  76. -o syslog_facility=local7
  77. -o smtpd_milters=
  78. -o cleanup_service_name=watchdog_cleanup
  79. -o non_smtpd_milters=
  80. watchdog_cleanup unix n - n - 0 cleanup
  81. -o syslog_name=watchdog
  82. -o syslog_facility=local7
  83. -o queue_service_name=watchdog_qmgr
  84. watchdog_qmgr fifo n - n 300 1 qmgr
  85. -o syslog_facility=local7
  86. -o syslog_name=watchdog
  87. -o rewrite_service_name=watchdog_rewrite
  88. watchdog_rewrite unix - - n - - trivial-rewrite
  89. -o syslog_facility=local7
  90. -o syslog_name=watchdog
  91. -o local_transport=watchdog_discard
  92. watchdog_discard unix - - n - - discard
  93. -o syslog_facility=local7
  94. -o syslog_name=watchdog
  95. # end watchdog-specific