Advertisement
Guest User

Untitled

a guest
Feb 1st, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.59 KB | None | 0 0
  1. # See /usr/share/postfix/main.cf.dist for a commented, more complete version
  2.  
  3.  
  4. # Debian specific: Specifying a file name will cause the first
  5. # line of that file to be used as the name. The Debian default
  6. # is /etc/mailname.
  7. #myorigin = /etc/mailname
  8.  
  9. smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
  10. biff = no
  11.  
  12. # appending .domain is the MUA's job.
  13. append_dot_mydomain = no
  14.  
  15. # Uncomment the next line to generate "delayed mail" warnings
  16. #delay_warning_time = 4h
  17.  
  18. readme_directory = /usr/share/doc/postfix
  19.  
  20. # TLS parameters
  21. smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
  22. smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
  23. smtpd_use_tls = no
  24. smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  25. smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  26.  
  27. # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
  28. # information on enabling SSL in the smtp client.
  29.  
  30. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
  31. myhostname = my.domain.com
  32. alias_maps = hash:/etc/aliases
  33. alias_database = hash:/etc/aliases
  34. myorigin = /etc/mailname
  35. mydestination = $myhostname, localhost, localhost.localdomain
  36. relayhost =
  37. mynetworks = 127.0.0.0/8
  38. mailbox_size_limit = 0
  39. recipient_delimiter = +
  40. inet_interfaces = all
  41. inet_protocols = all
  42. html_directory = /usr/share/doc/postfix/html
  43. message_size_limit = 256000
  44. virtual_alias_domains =
  45. virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
  46. virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
  47. smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
  48. virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
  49. proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
  50. virtual_mailbox_base = /home/vmail
  51. virtual_uid_maps = static:5000
  52. virtual_gid_maps = static:5000
  53. smtpd_sasl_type = dovecot
  54. smtpd_sasl_path = private/auth
  55. smtpd_sasl_auth_enable = yes
  56. broken_sasl_auth_clients = yes
  57. smtpd_sasl_authenticated_header = yes
  58. virtual_create_maildirsize = yes
  59. virtual_maildir_extended = yes
  60. virtual_transport = dovecot
  61. dovecot_destination_recipient_limit = 1
  62.  
  63. #
  64. # Postfix master process configuration file. For details on the format
  65. # of the file, see the master(5) manual page (command: "man 5 master" or
  66. # on-line: http://www.postfix.org/master.5.html).
  67. #
  68. # Do not forget to execute "postfix reload" after editing this file.
  69. #
  70. # ==========================================================================
  71. # service type private unpriv chroot wakeup maxproc command + args
  72. # (yes) (yes) (no) (never) (100)
  73. # ==========================================================================
  74. smtp inet n - y - - smtpd
  75. #smtp inet n - y - 1 postscreen
  76. #smtpd pass - - y - - smtpd
  77. #dnsblog unix - - y - 0 dnsblog
  78. #tlsproxy unix - - y - 0 tlsproxy
  79. #submission inet n - y - - smtpd
  80. # -o syslog_name=postfix/submission
  81. # -o smtpd_tls_security_level=encrypt
  82. # -o smtpd_sasl_auth_enable=yes
  83. # -o smtpd_reject_unlisted_recipient=no
  84. # -o smtpd_client_restrictions=$mua_client_restrictions
  85. # -o smtpd_helo_restrictions=$mua_helo_restrictions
  86. # -o smtpd_sender_restrictions=$mua_sender_restrictions
  87. # -o smtpd_recipient_restrictions=
  88. # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  89. # -o milter_macro_daemon_name=ORIGINATING
  90. #smtps inet n - y - - smtpd
  91. # -o syslog_name=postfix/smtps
  92. # -o smtpd_tls_wrappermode=yes
  93. # -o smtpd_sasl_auth_enable=yes
  94. # -o smtpd_reject_unlisted_recipient=no
  95. # -o smtpd_client_restrictions=$mua_client_restrictions
  96. # -o smtpd_helo_restrictions=$mua_helo_restrictions
  97. # -o smtpd_sender_restrictions=$mua_sender_restrictions
  98. # -o smtpd_recipient_restrictions=
  99. # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  100. # -o milter_macro_daemon_name=ORIGINATING
  101. #628 inet n - y - - qmqpd
  102. pickup unix n - y 60 1 pickup
  103. cleanup unix n - y - 0 cleanup
  104. qmgr unix n - n 300 1 qmgr
  105. #qmgr unix n - n 300 1 oqmgr
  106. tlsmgr unix - - y 1000? 1 tlsmgr
  107. rewrite unix - - y - - trivial-rewrite
  108. bounce unix - - y - 0 bounce
  109. defer unix - - y - 0 bounce
  110. trace unix - - y - 0 bounce
  111. verify unix - - y - 1 verify
  112. flush unix n - y 1000? 0 flush
  113. proxymap unix - - n - - proxymap
  114. proxywrite unix - - n - 1 proxymap
  115. smtp unix - - y - - smtp
  116. relay unix - - y - - smtp
  117. # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
  118. showq unix n - y - - showq
  119. error unix - - y - - error
  120. retry unix - - y - - error
  121. discard unix - - y - - discard
  122. local unix - n n - - local
  123. virtual unix - n n - - virtual
  124. lmtp unix - - y - - lmtp
  125. anvil unix - - y - 1 anvil
  126. scache unix - - y - 1 scache
  127. #
  128. # ====================================================================
  129. # Interfaces to non-Postfix software. Be sure to examine the manual
  130. # pages of the non-Postfix software to find out what options it wants.
  131. #
  132. # Many of the following services use the Postfix pipe(8) delivery
  133. # agent. See the pipe(8) man page for information about ${recipient}
  134. # and other message envelope options.
  135. # ====================================================================
  136. #
  137. # maildrop. See the Postfix MAILDROP_README file for details.
  138. # Also specify in main.cf: maildrop_destination_recipient_limit=1
  139. #
  140. maildrop unix - n n - - pipe
  141. flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
  142. #
  143. # ====================================================================
  144. #
  145. # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
  146. #
  147. # Specify in cyrus.conf:
  148. # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
  149. #
  150. # Specify in main.cf one or more of the following:
  151. # mailbox_transport = lmtp:inet:localhost
  152. # virtual_transport = lmtp:inet:localhost
  153. #
  154. # ====================================================================
  155. #
  156. # Cyrus 2.1.5 (Amos Gouaux)
  157. # Also specify in main.cf: cyrus_destination_recipient_limit=1
  158. #
  159. #cyrus unix - n n - - pipe
  160. # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
  161. #
  162. # ====================================================================
  163. # Old example of delivery via Cyrus.
  164. #
  165. #old-cyrus unix - n n - - pipe
  166. # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
  167. #
  168. # ====================================================================
  169. #
  170. # See the Postfix UUCP_README file for configuration details.
  171. #
  172. uucp unix - n n - - pipe
  173. flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
  174. #
  175. # Other external delivery methods.
  176. #
  177. ifmail unix - n n - - pipe
  178. flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
  179. bsmtp unix - n n - - pipe
  180. flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
  181. scalemail-backend unix - n n - 2 pipe
  182. flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
  183. mailman unix - n n - - pipe
  184. flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  185. ${nexthop} ${user}
  186.  
  187. dovecot unix - n n - - pipe
  188. flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
  189.  
  190. root@server:/# echo "message" | mailx -s "subject" mail@my.domain.com
  191. root@server:/#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement