Want more features on Pastebin? Sign Up, it's FREE!
Guest

tinom

By: a guest on Dec 13th, 2008  |  syntax: None  |  size: 8.33 KB  |  views: 53  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # main.cf specific for phamm
  2. queue_directory = /var/spool/postfix
  3. command_directory = /usr/local/sbin
  4. daemon_directory = /usr/local/libexec/postfix
  5. data_directory = /var/db/postfix
  6. #mail_owner = postfix
  7.  
  8.  
  9. #  Copyright (c) 2005 Alessandro De Zorzi, Mirko Grava
  10. #                               <phamm@rhx.it> http://phamm.rhx.it/
  11. #
  12. #  Permission is granted to copy, distribute and/or modify this document
  13. #  under the terms of the GNU Free Documentation License, Version 1.2
  14. #  or any later version published by the Free Software Foundation;
  15. #  A copy of the license in DOCS.LICENSE file.
  16.  
  17. #ldap_bind_dn = cn=phamm,o=hosting,dc=mysite,dc=com
  18. #ldap_bind_pw = pHaMm
  19. #ldap_search_base = o=hosting,dc=mysite,dc=com
  20. #ldap_domain = dc=mysite,dc=com
  21. #ldap_server_host = 192.168.1.7
  22. #ldap_server_port = 389
  23. #ldap_version = 3
  24.  
  25. bind_dn = cn=phamm,o=hosting,dc=mysite,dc=com
  26. bind_pw = pHaMm
  27. search_base = o=hosting,dc=mysite,dc=com
  28. domain = dc=mysite,dc=com
  29. server_host = 192.168.1.7
  30. server_port = 389
  31. version = 3
  32.  
  33. # transports
  34. #transport_server_host = $ldap_server_host
  35. #transport_search_base = $ldap_search_base
  36. transport_server_host = $server_host
  37. transport_search_base = $search_base
  38. transport_query_filter = (&(&(vd=%s)(objectClass=VirtualDomain))(accountActive=TRUE)(delete=FALSE))
  39. transport_result_attribute = postfixTransport
  40. transport_cache = no
  41. transport_bind = yes
  42. transport_scope = one
  43. #transport_bind_dn = $ldap_bind_dn
  44. #transport_bind_pw = $ldap_bind_pw
  45. #transport_version = $ldap_version
  46. transport_bind_dn = $bind_dn
  47. transport_bind_pw = $bind_pw
  48. transport_version = $version
  49.  
  50. # aliases
  51. #aliases_server_host = $ldap_server_host
  52. #aliases_search_base = $ldap_search_base
  53. aliases_server_host = $server_host
  54. aliases_search_base = $search_base
  55. aliases_query_filter = (&(&(objectClass=VirtualMailAlias)(mail=%s))(accountActive=TRUE))
  56. aliases_result_attribute = maildrop
  57. aliases_bind = yes
  58. aliases_cache = no
  59. #aliases_bind_dn = $ldap_bind_dn
  60. #aliases_bind_pw = $ldap_bind_pw
  61. #aliases_version = $ldap_version
  62. aliases_bind_dn = $bind_dn
  63. aliases_bind_pw = $bind_pw
  64. aliases_version = $version
  65.  
  66. # VirtualForward
  67. #virtualforward_server_host = $ldap_server_host
  68. #virtualforward_search_base = $ldap_search_base
  69. virtualforward_server_host = $server_host
  70. virtualforward_search_base = $search_base
  71. virtualforward_query_filter = (&(&(objectClass=VirtualMailAccount)(mail=%s))(vacationActive=FALSE)(forwardActive=TRUE)(accountActive=TRUE)(delete=FALSE))
  72. virtualforward_result_attribute = maildrop
  73. virtualforward_bind = yes
  74. virtualforward_cache = no
  75. #virtualforward_bind_dn = $ldap_bind_dn
  76. #virtualforward_bind_pw = $ldap_bind_pw
  77. #virtualforward_version = $ldap_version
  78. virtualforward_bind_dn = $bind_dn
  79. virtualforward_bind_pw = $bind_pw
  80. virtualforward_version = $version
  81.  
  82. # Accounts
  83. accounts_server_host = $server_host
  84. accounts_search_base = $search_base
  85. accounts_query_filter = (&(&(objectClass=VirtualMailAccount)(mail=%s))(forwardActive=FALSE)(accountActive=TRUE)(delete=FALSE))
  86. accounts_result_attribute = mailbox
  87. accounts_cache = no
  88. accounts_bind = yes
  89. accounts_bind_dn = $bind_dn
  90. accounts_bind_pw = $bind_pw
  91. accounts_version = $version
  92.  
  93. accountsmap_server_host = $server_host
  94. accountsmap_search_base = $search_base
  95. accountsmap_query_filter = (&(&(objectClass=VirtualMailAccount)(mail=%s))(forwardActive=FALSE)(accountActive=TRUE)(delete=FALSE))
  96. accountsmap_result_attribute = mail
  97. accountsmap_cache = no
  98. accountsmap_bind = yes
  99. accountsmap_bind_dn = $bind_dn
  100. accountsmap_bind_pw = $bind_pw
  101. accountsmap_version = $version
  102.  
  103. # virtual quota
  104. quota_server_host = $server_host
  105. quota_search_base = $search_base
  106. quota_query_filter = (&(&(objectClass=VirtualMailAccount)(mail=%s))(accountActive=TRUE)(delete=FALSE))
  107. quota_result_attribute = quota
  108. quota_cache = no
  109. quota_bind = yes
  110. quota_bind_dn = $bind_dn
  111. quota_bind_pw = $bind_pw
  112. quota_version = $version
  113.  
  114. # Mail to reply for gnarwl and mail to forward during vacation
  115. recipient_bcc_maps = ldap:vfm
  116. vfm_server_host = $server_host
  117. vfm_search_base = $search_base
  118. vfm_query_filter = (&(&(objectClass=VirtualMailAccount)(mail=%s))(vacationActive=TRUE)(forwardActive=FALSE)(accountActive=TRUE)(delete=FALSE))
  119. vfm_result_attribute = mailAutoreply
  120. vfm_cache = no
  121. vfm_bind = yes
  122. vfm_bind_dn = $bind_dn
  123. vfm_bind_pw = $bind_pw
  124. vfm_version = $version
  125.  
  126. # transport_maps
  127. maildrop_destination_concurrency_limit = 2
  128. maildrop_destination_recipient_limit = 1
  129. gnarwl_destination_concurrency_limit = 1
  130. gnarwl_destination_recipient_limit = 1
  131. transport_maps = hash:/usr/local/etc/postfix/transport, ldap:transport
  132. mydestination = $transport_maps, localhost, $myhostname, localhost.$mydomain, $mydomain
  133. virtual_alias_maps = hash:/usr/local/etc/postfix/virtual, ldap:virtualforward, ldap:aliases, ldap:accountsmap
  134.  
  135. # virtual accounts for delivery
  136. virtual_transport = dovecot
  137. virtual_mailbox_base = /home/vmail/domaines/
  138. virtual_mailbox_maps = ldap:accounts
  139. virtual_mailbox_domains = ldap:domains
  140. virtual_minimum_uid = 1001
  141. virtual_uid_maps = static:1001
  142. virtual_gid_maps = static:1001
  143.  
  144. local_recipient_maps = proxy:unix:passwd.byname, $alias_maps, $virtual_mailbox_maps
  145.  
  146. #Gestion SLL(TLS)
  147. # ---------------------- SASL PART START ----------------------
  148. smtpd_sasl_auth_enable          = yes
  149. #smtpd_sasl_local_domain        = $myhostname
  150. smtpd_sasl_exceptions_networks  = $mynetworks
  151. smtpd_sasl_security_options     = noanonymous
  152. broken_sasl_auth_clients        = yes
  153. smtpd_sasl_type                 = dovecot
  154. # Can be an absolute path, or relative to $queue_directory
  155. smtpd_sasl_path                 = private/auth
  156. # ---------------------- SASL PART END ----------------------
  157. # ---------------------- TLS PART START ----------------------
  158. smtpd_use_tls = yes
  159. #smtpd_tls_auth_only = yes
  160. smtp_tls_key_file = /data/certificats/mail.mysite.com/mail.mysite.com.key
  161. smtp_tls_cert_file = /data/certificats/mail.mysite.com/mail.mysite.com.crt
  162. smtp_tls_CAfile = /data/certificats/RTHAcacert.pem
  163. smtp_tls_security_level = may
  164. smtp_tls_session_cache_database = btree:/var/spool/postfix/smtp_tls_session_cache
  165. smtpd_tls_key_file = /data/certificats/mail.mysite.com/mail.mysite.com.key
  166. smtpd_tls_cert_file = /data/certificats/mail.mysite.com/mail.mysite.com.crt
  167. smtpd_tls_CAfile = /data/certificats/RTHAcacert.pem
  168. smtpd_tls_security_level = may
  169. smtpd_tls_loglevel = 3
  170. smtpd_tls_received_header = yes
  171. smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_session_cache
  172. smtpd_tls_session_cache_timeout = 3600s
  173. tls_random_source = dev:/dev/urandom
  174. # ---------------------- TLS PART END ----------------------
  175. #----------------------Partie SECURITE----------------------
  176. smtpd_helo_required             = yes
  177. disable_vrfy_command            = yes
  178. non_fqdn_reject_code            = 450
  179. invalid_hostname_reject_code    = 450
  180. maps_rbl_reject_code            = 450
  181. smtpd_recipient_restrictions =
  182.         permit_mynetworks
  183.         permit_sasl_authenticated
  184.         permit_tls_clientcerts
  185.         reject_unauth_destination
  186.         reject_invalid_helo_hostname
  187.         warn_if_reject reject_non_fqdn_helo_hostname
  188.         warn_if_reject reject_unknown_helo_hostname
  189.         warn_if_reject reject_unknown_client
  190.         reject_non_fqdn_sender
  191.         reject_non_fqdn_recipient
  192.         reject_unknown_sender_domain
  193.         reject_unknown_recipient_domain
  194.         warn_if_reject reject_unverified_sender
  195.         reject_unverified_recipient
  196.         reject_rbl_client cbl.abuseat.org
  197.         reject_rbl_client list.dsbl.org
  198.         reject_rbl_client opm.blitzed.org
  199.         reject_rbl_client sbl.spamhaus.org
  200.         reject_rbl_client bl.spamcop.net
  201.         reject_rbl_client dnsbl.sorbs.net=127.0.0.2
  202.         reject_rbl_client dnsbl.sorbs.net=127.0.0.3
  203.         reject_rbl_client dnsbl.sorbs.net=127.0.0.4
  204.         reject_rbl_client dnsbl.sorbs.net=127.0.0.5
  205.         reject_rbl_client dnsbl.sorbs.net=127.0.0.7
  206.         reject_rbl_client dnsbl.sorbs.net=127.0.0.9
  207.         reject_rbl_client dnsbl.sorbs.net=127.0.0.11
  208.         reject_rbl_client dnsbl.sorbs.net=127.0.0.12
  209.         warn_if_reject reject_rhsbl_sender dsn.rfc-ignorant.org
  210.         warn_if_reject reject_rhsbl_sender abuse.rfc-ignorant.org
  211.         warn_if_reject reject_rhsbl_sender whois.rfc-ignorant.org
  212.         warn_if_reject reject_rhsbl_sender bogusmx.rfc-ignorant.org
  213.         warn_if_reject reject_rhsbl_sender postmaster.rfc-ignorant.org
  214.         permit
  215. smtpd_data_restrictions =
  216.         reject_unauth_pipelining,
  217.         reject_multi_recipient_bounce,
  218.         permit
  219. mailbox_command = /usr/local/libexec/dovecot/deliver
  220. mailbox_transport = dovecot
  221. dovecot_destination_recipient_limit = 1
clone this paste RAW Paste Data