Advertisement
Guest User

postfix_dovecot

a guest
Mar 19th, 2023
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.86 KB | None | 0 0
  1.  
  2. ######################## /etc/postfix/main.cf #############################
  3.  
  4. compatibility_level = 2
  5. queue_directory = /var/spool/postfix
  6. command_directory = /usr/sbin
  7. daemon_directory = /usr/libexec/postfix
  8. data_directory = /var/lib/postfix
  9. mail_owner = postfix
  10. myhostname = mydomain.ru
  11. mydomain = mydomain.ru
  12. myorigin = $mydomain
  13. inet_interfaces = all
  14. inet_protocols = all
  15. mydestination = $myhostname, localhost.$mydomain, localhost
  16. unknown_local_recipient_reject_code = 550
  17. alias_maps = hash:/etc/aliases
  18. alias_database = hash:/etc/aliases
  19. home_mailbox = Maildir/
  20. debug_peer_level = 2
  21. debugger_command =
  22. PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
  23. ddd $daemon_directory/$process_name $process_id & sleep 5
  24.  
  25. sendmail_path = /usr/sbin/sendmail.postfix
  26. newaliases_path = /usr/bin/newaliases.postfix
  27. mailq_path = /usr/bin/mailq.postfix
  28. setgid_group = postdrop
  29. html_directory = no
  30. manpage_directory = /usr/share/man
  31. sample_directory = /usr/share/doc/postfix/samples
  32. readme_directory = /usr/share/doc/postfix/README_FILES
  33. smtpd_tls_cert_file = /etc/pki/tls/certs/postfix.pem
  34. smtpd_tls_key_file = /etc/pki/tls/private/postfix.key
  35. smtp_tls_CApath = /etc/pki/tls/certs
  36. smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
  37. meta_directory = /etc/postfix
  38. shlib_directory = /usr/lib64/postfix
  39.  
  40. smtpd_sasl_auth_enable = yes
  41. smtpd_sasl_type = dovecot
  42. smtpd_sasl_path = private/auth
  43. smtpd_tls_security_level = encrypt
  44. smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
  45.  
  46.  
  47. ####################### /etc/postfix/master.cf #################################
  48.  
  49. mtp inet n - n - - smtpd
  50.  
  51. submission inet n - n - - smtpd
  52. -o smtpd_tls_security_level=encrypt
  53. -o smtpd_sasl_auth_enable=yes
  54. -o smtpd_sasl_type=dovecot
  55. -o smtpd_sasl_path=private/auth
  56. -o smtpd_sasl_security_options=noanonymous
  57. -o smtpd_sasl_local_domain=$mydomain
  58. -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  59. -o smtpd_sender_login_maps=hash:/etc/postfix/virtual
  60. -o smtpd_sender_restrictions=reject_sender_login_mismatch
  61. -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
  62.  
  63. pickup unix n - n 60 1 pickup
  64. cleanup unix n - n - 0 cleanup
  65. qmgr unix n - n 300 1 qmgr
  66. tlsmgr unix - - n 1000? 1 tlsmgr
  67. rewrite unix - - n - - trivial-rewrite
  68. bounce unix - - n - 0 bounce
  69. defer unix - - n - 0 bounce
  70. trace unix - - n - 0 bounce
  71. verify unix - - n - 1 verify
  72. flush unix n - n 1000? 0 flush
  73. proxymap unix - - n - - proxymap
  74. proxywrite unix - - n - 1 proxymap
  75. smtp unix - - n - - smtp
  76. relay unix - - n - - smtp
  77. -o syslog_name=postfix/$service_name
  78. showq unix n - n - - showq
  79. error unix - - n - - error
  80. retry unix - - n - - error
  81. discard unix - - n - - discard
  82. local unix - n n - - local
  83. virtual unix - n n - - virtual
  84. lmtp unix - - n - - lmtp
  85. anvil unix - - n - 1 anvil
  86. scache unix - - n - 1 scache
  87. postlog unix-dgram n - n - 1 postlogd
  88.  
  89. ######################## /etc/dovecot/dovecot.conf ############################
  90.  
  91. protocols = imap pop3
  92.  
  93.  
  94. dict {
  95. }
  96.  
  97. !include conf.d/*.conf
  98.  
  99.  
  100. ######################### /etc/dovecot/conf.d/10-auth.conf ###########################
  101.  
  102. auth_mechanisms = plain login
  103.  
  104.  
  105. !include auth-system.conf.ext
  106.  
  107. ######################### /etc/dovecot/conf.d/10-master.conf ##########################
  108.  
  109.  
  110.  
  111. service imap-login {
  112. inet_listener imap {
  113. }
  114. inet_listener imaps {
  115. }
  116. }
  117.  
  118. service pop3-login {
  119. inet_listener pop3 {
  120. }
  121. inet_listener pop3s {
  122. }
  123. }
  124.  
  125. service submission-login {
  126. inet_listener submission {
  127. }
  128. }
  129.  
  130. service lmtp {
  131. unix_listener lmtp {
  132. }
  133. }
  134.  
  135. service imap {
  136. }
  137.  
  138. service pop3 {
  139. }
  140.  
  141. service submission {
  142. }
  143.  
  144. service auth {
  145. unix_listener auth-userdb {
  146. }
  147.  
  148. unix_listener /var/spool/postfix/private/auth {
  149. mode = 0666
  150. user = postfix
  151. group = postfix
  152. }
  153. }
  154.  
  155. service auth-worker {
  156. }
  157.  
  158. service dict {
  159. unix_listener dict {
  160. }
  161. }
  162.  
  163. ###############################################################################
  164.  
  165.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement