Advertisement
Guest User

/etc/postfix/master.cf

a guest
Jun 25th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 13.92 KB | None | 0 0
  1. #
  2. # Postfix master process configuration file.  For details on the format
  3. # of the file, see the master(5) manual page (command: "man 5 master" or
  4. # on-line: http://www.postfix.org/master.5.html).
  5. #
  6. # Do not forget to execute "postfix reload" after editing this file.
  7. #
  8. # ==========================================================================
  9. # service type  private unpriv  chroot  wakeup  maxproc command + args
  10. #               (yes)   (yes)   (no)    (never) (100)
  11. # ==========================================================================
  12. #smtp      inet  n       -       y       -       1       postscreen
  13. #smtpd     pass  -       -       y       -       -       smtpd
  14. dnsblog   unix  -       -       y       -       0       dnsblog
  15. tlsproxy  unix  -       -       y       -       0       tlsproxy
  16. #submission inet n       -       y       -       -       smtpd
  17. #  -o syslog_name=postfix/submission
  18. #  -o smtpd_tls_security_level=encrypt
  19. #  -o smtpd_sasl_auth_enable=yes
  20. #  -o smtpd_tls_auth_only=yes
  21. #  -o smtpd_reject_unlisted_recipient=no
  22. #  -o smtpd_client_restrictions=$mua_client_restrictions
  23. #  -o smtpd_helo_restrictions=$mua_helo_restrictions
  24. #  -o smtpd_sender_restrictions=$mua_sender_restrictions
  25. #  -o smtpd_recipient_restrictions=
  26. #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  27. #  -o milter_macro_daemon_name=ORIGINATING
  28. #smtps     inet  n       -       y       -       -       smtpd
  29. #  -o syslog_name=postfix/smtps
  30. #  -o smtpd_tls_wrappermode=yes
  31. #  -o smtpd_sasl_auth_enable=yes
  32. #  -o smtpd_reject_unlisted_recipient=no
  33. #  -o smtpd_client_restrictions=$mua_client_restrictions
  34. #  -o smtpd_helo_restrictions=$mua_helo_restrictions
  35. #  -o smtpd_sender_restrictions=$mua_sender_restrictions
  36. #  -o smtpd_recipient_restrictions=
  37. #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  38. #  -o milter_macro_daemon_name=ORIGINATING
  39. #628       inet  n       -       y       -       -       qmqpd
  40. #smtp       inet  n       -       -       -       -       smtpd
  41. pickup     unix  n       -       n       60      1       pickup
  42. cleanup    unix  n       -       n       -       0       cleanup
  43. #qmgr     unix  n       -       n       300     1       oqmgr
  44. qmgr       unix  n       -       n       300     1       qmgr
  45. tlsmgr     unix  -       -       n       1000?   1       tlsmgr
  46. rewrite    unix  -       -       n       -       -       trivial-rewrite
  47. bounce     unix  -       -       n       -       0       bounce
  48. defer      unix  -       -       n       -       0       bounce
  49. trace      unix  -       -       n       -       0       bounce
  50. verify     unix  -       -       n       -       1       verify
  51. flush      unix  n       -       n       1000?   0       flush
  52. proxymap   unix  -       -       n       -       -       proxymap
  53. proxywrite unix  -       -       n       -       1       proxymap
  54. smtp       unix  -       -       n       -       -       smtp
  55. #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
  56. relay      unix  -       -       n       -       -       smtp
  57.     -o syslog_name=postfix/$service_name
  58. showq      unix  n       -       n       -       -       showq
  59. error      unix  -       -       n       -       -       error
  60. retry      unix  -       -       n       -       -       error
  61. discard    unix  -       -       n       -       -       discard
  62. local      unix  -       n       n       -       -       local
  63. virtual    unix  -       n       n       -       -       virtual
  64. lmtp       unix  -       -       n       -       -       lmtp
  65. anvil      unix  -       -       n       -       1       anvil
  66. #
  67. # ====================================================================
  68. # Interfaces to non-Postfix software. Be sure to examine the manual
  69. # pages of the non-Postfix software to find out what options it wants.
  70. #
  71. # Many of the following services use the Postfix pipe(8) delivery
  72. # agent.  See the pipe(8) man page for information about ${recipient}
  73. # and other message envelope options.
  74. # ====================================================================
  75. #
  76. # maildrop. See the Postfix MAILDROP_README file for details.
  77. # Also specify in main.cf: maildrop_destination_recipient_limit=1
  78. #
  79. scache     unix  -       -       n       -       1       scache
  80. #
  81. # ====================================================================
  82. #
  83. # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
  84. #
  85. # Specify in cyrus.conf:
  86. #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
  87. #
  88. # Specify in main.cf one or more of the following:
  89. #  mailbox_transport = lmtp:inet:localhost
  90. #  virtual_transport = lmtp:inet:localhost
  91. #
  92. # ====================================================================
  93. #
  94. # Cyrus 2.1.5 (Amos Gouaux)
  95. # Also specify in main.cf: cyrus_destination_recipient_limit=1
  96. #
  97. #cyrus     unix  -       n       n       -       -       pipe
  98. #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
  99. #
  100. # ====================================================================
  101. # Old example of delivery via Cyrus.
  102. #
  103. #old-cyrus unix  -       n       n       -       -       pipe
  104. #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
  105. #
  106. # ====================================================================
  107. #
  108. # See the Postfix UUCP_README file for configuration details.
  109. #
  110. maildrop   unix  -       n       n       -       -       pipe flags=DRhu
  111.     user=vmail argv=/usr/bin/maildrop -d ${recipient}
  112. #
  113. # Other external delivery methods.
  114. #
  115. uucp       unix  -       n       n       -       -       pipe flags=Fqhu
  116.     user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
  117. ifmail     unix  -       n       n       -       -       pipe flags=F user=ftn
  118.     argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
  119. bsmtp      unix  -       n       n       -       -       pipe flags=Fq.
  120.     user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
  121. scalemail-backend unix - n       n       -       2       pipe flags=R
  122.     user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop}
  123.     ${user} ${extension}
  124.  
  125. mailman    unix  -       n       n       -       -       pipe flags=FR
  126.     user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop}
  127.     ${user}
  128. # Submission, port 587, force TLS connection.
  129. #submission inet n       -       n       -       -       smtpd
  130. #  -o syslog_name=postfix/submission
  131. #  -o smtpd_tls_security_level=encrypt
  132. #  -o smtpd_sasl_auth_enable=yes
  133. #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  134.   -o content_filter=smtp-amavis:[127.0.0.1]:10026
  135.  
  136. # Use dovecot's `deliver` program as LDA.
  137. dovecot unix    -       n       n       -       -      pipe
  138.     flags=DRh user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${domain} -m ${extension}
  139.  
  140. # mlmmj - mailing list manager
  141. # ${nexthop} is '%d/%u' in transport ('mlmmj:%d/%u')
  142. mlmmj   unix  -       n       n       -       -       pipe
  143.     flags=ORhu user=mlmmj:mlmmj argv=/usr/bin/mlmmj-amime-receive -L /var/vmail/mlmmj/${nexthop}
  144.  
  145. # Amavisd integration.
  146. smtp-amavis unix -  -   n   -   8  smtp
  147.     -o syslog_name=postfix/amavis
  148.     -o smtp_data_done_timeout=1200
  149.     -o smtp_send_xforward_command=yes
  150.     -o disable_dns_lookups=yes
  151.     -o max_use=20
  152.  
  153. 127.0.0.1:10025 inet n  -   n   -   -  smtpd
  154.     -o syslog_name=postfix/10025
  155.     -o content_filter=
  156.     -o mynetworks_style=host
  157.     -o mynetworks=127.0.0.0/8
  158.     -o local_recipient_maps=
  159.     -o relay_recipient_maps=
  160.     -o strict_rfc821_envelopes=yes
  161.     -o smtp_tls_security_level=none
  162.     -o smtpd_tls_security_level=none
  163.     -o smtpd_restriction_classes=
  164.     -o smtpd_delay_reject=no
  165.     -o smtpd_client_restrictions=permit_mynetworks,reject
  166.     -o smtpd_helo_restrictions=
  167.     -o smtpd_sender_restrictions=
  168.     -o smtpd_recipient_restrictions=permit_mynetworks,reject
  169.     -o smtpd_end_of_data_restrictions=
  170.     -o smtpd_error_sleep_time=0
  171.     -o smtpd_soft_error_limit=1001
  172.     -o smtpd_hard_error_limit=1000
  173.     -o smtpd_client_connection_count_limit=0
  174.     -o smtpd_client_connection_rate_limit=0
  175.     -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
  176.  
  177. #Local
  178. 127.0.0.1:smtp      inet  n       -       -       -       1       postscreen
  179.   -o syslog_name=postfix/local
  180.   -o smtpd_service_name=smtpd_local
  181. 192.168.11.104:smtp      inet  n       -       -       -       1       postscreen
  182.   -o syslog_name=postfix/local
  183.   -o smtpd_service_name=smtpd_local
  184. smtpd_local     pass  -       -       -       -       -       smtpd
  185. #  -o myhostname=mail.test.com
  186. #  -o myorigin=mail.test.com
  187. #  -o mydomain=mail.test.com
  188. #  -o smtp_helo_name=mail.test.com
  189.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_com.key
  190.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_com.crt
  191.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_com.crt
  192.   -o smtp_bind_address=192.168.11.104
  193. 192.168.11.104:submission inet n       -       n       -       -       smtpd
  194. #  -o myhostname=mail.test.com
  195. # -o myorigin=mail.test.com
  196. #  -o mydomain=mail.test.com
  197. #  -o smtp_helo_name=mail.test.com
  198.   -o syslog_name=postfix/submission
  199.   -o smtpd_tls_security_level=encrypt
  200.   -o smtpd_sasl_auth_enable=yes
  201.   -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  202.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_com.key
  203.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_com.crt
  204.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_com.crt
  205.   -o smtp_bind_address=192.168.11.104
  206.   -o content_filter=smtp-amavis:[127.0.0.1]:10026
  207. 127.0.0.1:submission inet n       -       n       -       -       smtpd
  208.   -o syslog_name=postfix/submission
  209.   -o smtpd_tls_security_level=encrypt
  210.   -o smtpd_sasl_auth_enable=yes
  211.   -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  212.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_com.key
  213.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_com.crt
  214.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_com.crt
  215.   -o smtp_bind_address=192.168.11.104
  216.   #-o content_filter=smtp-amavis:[127.0.0.1]:10026
  217.  
  218. #out_ru     unix -       -       n       -       -       smtp
  219. #    -o smtp_bind_address=192.168.11.104
  220. #    -o smtp_helo_name=mail.test.com
  221. #    -o syslog_name=postfix/out_ru
  222.  
  223. # RU
  224. 192.168.11.207:smtp      inet  n       -       -       -       1       postscreen
  225.   -o syslog_name=postfix/ru
  226.   -o smtpd_service_name=smtpd_ru
  227. smtpd_ru     pass  -       -       -       -       -       smtpd
  228.   -o myhostname=mail.test.com
  229.   -o myorigin=mail.test.com
  230.   -o mydomain=mail.test.com
  231.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_com.key
  232.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_com.crt
  233.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_com.crt
  234.   -o smtp_bind_address=192.168.11.207
  235. 192.168.11.207:submission inet n       -       n       -       -       smtpd
  236.   -o myhostname=mail.test.com
  237.   -o myorigin=mail.test.com
  238.   -o mydomain=mail.test.com
  239.   -o syslog_name=postfix/submission
  240.   -o smtpd_tls_security_level=encrypt
  241.   -o smtpd_sasl_auth_enable=yes
  242.   -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  243.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_com.key
  244.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_com.crt
  245.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_com.crt
  246.   -o smtp_bind_address=192.168.11.207
  247.   -o content_filter=smtp-amavis:[127.0.0.1]:10026
  248.  
  249. out_ru     unix -       -       n       -       -       smtp
  250.     -o smtp_bind_address=192.168.11.207
  251.     -o smtp_helo_name=mail.test.com
  252.     -o syslog_name=postfix/out_ru
  253.  
  254. # UK
  255. 192.168.11.205:smtp      inet  n       -       -       -       1       postscreen
  256.   -o syslog_name=postfix/uk
  257.   -o smtpd_service_name=smtpd_uk
  258. smtpd_uk     pass  -       -       -       -       -       smtpd
  259.   -o myhostname=mail.test.uk
  260.   -o myorigin=mail.test.uk
  261.   -o mydomain=mail.test.uk
  262.   -o smtp_helo_name=mail.test.uk
  263.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_uk.key
  264.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_uk.crt
  265.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_uk.crt
  266.   -o smtp_bind_address=192.168.11.205
  267. 192.168.11.205:submission inet n       -       n       -       -       smtpd
  268.   -o myhostname=mail.test.uk
  269.   -o myorigin=mail.test.uk
  270.   -o mydomain=mail.test.uk
  271.   -o smtp_helo_name=mail.test.uk
  272.   -o syslog_name=postfix/submission
  273.   -o smtpd_tls_security_level=encrypt
  274.   -o smtpd_sasl_auth_enable=yes
  275.   -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  276.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_uk.key
  277.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_uk.crt
  278.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_uk.crt
  279.   -o smtp_bind_address=192.168.11.205
  280.   #-o content_filter=smtp-amavis:[127.0.0.1]:10026
  281.  
  282. out_uk     unix -       -       n       -       -       smtp
  283.     -o smtp_bind_address=192.168.11.205
  284.     -o smtp_helo_name=mail.test.uk
  285.     -o syslog_name=postfix/out_uk
  286.  
  287. # HK
  288. 192.168.11.204:smtp      inet  n       -       -       -       1       postscreen
  289.   -o syslog_name=postfix/hk
  290.   -o smtpd_service_name=smtpd_hk
  291. smtpd_hk     pass  -       -       -       -       -       smtpd
  292.   -o myhostname=mail.test.hk
  293.   -o myorigin=mail.test.hk
  294.   -o mydomain=mail.test.hk
  295.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_hk.key
  296.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_hk.crt
  297.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_hk.crt
  298.   -o smtp_bind_address=192.168.11.204
  299. 192.168.11.204:submission inet n       -       n       -       -       smtpd
  300.   -o myhostname=mail.test.hk
  301.   -o myorigin=mail.test.hk
  302.   -o mydomain=mail.test.hk
  303.   -o syslog_name=postfix/submission
  304.   -o smtpd_tls_security_level=encrypt
  305.   -o smtpd_sasl_auth_enable=yes
  306.   -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  307.   -o smtpd_tls_key_file=/etc/nginx/ssl/test_hk.key
  308.   -o smtpd_tls_cert_file=/etc/nginx/ssl/test_hk.crt
  309.   -o smtpd_tls_CAfile=/etc/nginx/ssl/test_hk.crt
  310.   -o smtp_bind_address=192.168.11.204
  311.   -o content_filter=smtp-amavis:[127.0.0.1]:10026
  312.  
  313. out_hk     unix -       -       n       -       -       smtp
  314.     -o smtp_bind_address=192.168.11.204
  315.     -o smtp_helo_name=mail.test.hk
  316.     -o syslog_name=postfix/out_hk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement