master.cf 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. # inter-mx with postscreen on 25/tcp
  2. smtp inet n - n - 1 postscreen
  3. 10025 inet n - n - 1 postscreen
  4. -o postscreen_upstream_proxy_protocol=haproxy
  5. -o syslog_name=haproxy
  6. smtpd pass - - n - - smtpd
  7. -o smtpd_sasl_auth_enable=no
  8. -o smtpd_sender_restrictions=permit_mynetworks,reject_unlisted_sender,reject_unknown_sender_domain
  9. # smtpd tls-wrapped (smtps) on 465/tcp
  10. # TLS protocol can be modified by setting smtps_smtpd_tls_mandatory_protocols in extra.cf
  11. smtps inet n - n - - smtpd
  12. -o smtpd_tls_wrappermode=yes
  13. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  14. -o smtpd_tls_mandatory_protocols=$smtps_smtpd_tls_mandatory_protocols
  15. -o tls_preempt_cipherlist=yes
  16. -o cleanup_service_name=smtp_sender_cleanup
  17. -o syslog_name=postfix/smtps
  18. 10465 inet n - n - - smtpd
  19. -o smtpd_upstream_proxy_protocol=haproxy
  20. -o smtpd_tls_wrappermode=yes
  21. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  22. -o smtpd_tls_mandatory_protocols=$smtps_smtpd_tls_mandatory_protocols
  23. -o tls_preempt_cipherlist=yes
  24. -o cleanup_service_name=smtp_sender_cleanup
  25. -o syslog_name=postfix/smtps-haproxy
  26. # smtpd with starttls on 587/tcp
  27. # TLS protocol can be modified by setting submission_smtpd_tls_mandatory_protocols in extra.cf
  28. submission inet n - n - - smtpd
  29. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  30. -o smtpd_enforce_tls=yes
  31. -o smtpd_tls_security_level=encrypt
  32. -o smtpd_tls_mandatory_protocols=$submission_smtpd_tls_mandatory_protocols
  33. -o tls_preempt_cipherlist=yes
  34. -o cleanup_service_name=smtp_sender_cleanup
  35. -o syslog_name=postfix/submission
  36. 10587 inet n - n - - smtpd
  37. -o smtpd_upstream_proxy_protocol=haproxy
  38. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  39. -o smtpd_enforce_tls=yes
  40. -o smtpd_tls_security_level=encrypt
  41. -o smtpd_tls_mandatory_protocols=$submission_smtpd_tls_mandatory_protocols
  42. -o tls_preempt_cipherlist=yes
  43. -o cleanup_service_name=smtp_sender_cleanup
  44. -o syslog_name=postfix/submission-haproxy
  45. # used by SOGo
  46. # smtpd_sender_restrictions should match main.cf, but with check_sasl_access prepended for login-as-mailbox-user function
  47. 588 inet n - n - - smtpd
  48. -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  49. -o smtpd_tls_auth_only=no
  50. -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
  51. -o cleanup_service_name=smtp_sender_cleanup
  52. -o syslog_name=postfix/sogo
  53. # used to reinject quarantine mails
  54. 590 inet n - n - - smtpd
  55. -o smtpd_helo_restrictions=
  56. -o smtpd_client_restrictions=permit_mynetworks,reject
  57. -o smtpd_tls_auth_only=no
  58. -o smtpd_milters=
  59. -o non_smtpd_milters=
  60. -o syslog_name=postfix/quarantine
  61. # used to send bcc mails
  62. 591 inet n - n - - smtpd
  63. -o smtpd_helo_restrictions=
  64. -o smtpd_client_restrictions=permit_mynetworks,reject
  65. -o smtpd_tls_auth_only=no
  66. -o smtpd_milters=
  67. -o non_smtpd_milters=
  68. -o syslog_name=postfix/bcc
  69. # enforced smtp connector
  70. smtp_enforced_tls unix - - n - - smtp
  71. -o smtp_tls_security_level=encrypt
  72. -o syslog_name=enforced-tls-smtp
  73. -o smtp_delivery_status_filter=pcre:/opt/postfix/conf/smtp_dsn_filter
  74. # smtp connector used, when a transport map matched
  75. # this helps to have different sasl maps than we have with sender dependent transport maps
  76. smtp_via_transport_maps unix - - n - - smtp
  77. -o smtp_sasl_password_maps=proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_transport_maps.cf
  78. tlsproxy unix - - n - 0 tlsproxy
  79. dnsblog unix - - n - 0 dnsblog
  80. pickup fifo n - n 60 1 pickup
  81. cleanup unix n - n - 0 cleanup
  82. qmgr fifo n - n 300 1 qmgr
  83. tlsmgr unix - - n 1000? 1 tlsmgr
  84. rewrite unix - - n - - trivial-rewrite
  85. bounce unix - - n - 0 bounce
  86. defer unix - - n - 0 bounce
  87. trace unix - - n - 0 bounce
  88. verify unix - - n - 1 verify
  89. flush unix n - n 1000? 0 flush
  90. proxymap unix - - n - - proxymap
  91. proxywrite unix - - n - 1 proxymap
  92. smtp unix - - n - - smtp
  93. relay unix - - n - - smtp
  94. showq unix n - n - - showq
  95. error unix - - n - - error
  96. retry unix - - n - - error
  97. discard unix - - n - - discard
  98. local unix - n n - - local
  99. virtual unix - n n - - virtual
  100. lmtp unix - - n - - lmtp flags=O
  101. anvil unix - - n - 1 anvil
  102. scache unix - - n - 1 scache
  103. maildrop unix - n n - - pipe flags=DRhu
  104. user=vmail argv=/usr/bin/maildrop -d ${recipient}
  105. # used to anonymize sender IP
  106. smtp_sender_cleanup unix n - y - 0 cleanup
  107. -o header_checks=$smtp_header_checks
  108. # start whitelist_fwd
  109. 127.0.0.1:10027 inet n n n - 0 spawn user=nobody argv=/usr/local/bin/whitelist_forwardinghosts.sh
  110. # end whitelist_fwd
  111. # start watchdog-specific
  112. # logs to local7 (hidden)
  113. 589 inet n - n - - smtpd
  114. -o smtpd_client_restrictions=permit_mynetworks,reject
  115. -o syslog_name=watchdog
  116. -o syslog_facility=local7
  117. -o smtpd_milters=
  118. -o cleanup_service_name=watchdog_cleanup
  119. -o non_smtpd_milters=
  120. watchdog_cleanup unix n - n - 0 cleanup
  121. -o syslog_name=watchdog
  122. -o syslog_facility=local7
  123. -o queue_service_name=watchdog_qmgr
  124. watchdog_qmgr fifo n - n 300 1 qmgr
  125. -o syslog_facility=local7
  126. -o syslog_name=watchdog
  127. -o rewrite_service_name=watchdog_rewrite
  128. watchdog_rewrite unix - - n - - trivial-rewrite
  129. -o syslog_facility=local7
  130. -o syslog_name=watchdog
  131. -o local_transport=watchdog_discard
  132. watchdog_discard unix - - n - - discard
  133. -o syslog_facility=local7
  134. -o syslog_name=watchdog
  135. # end watchdog-specific