spacepaste

  1.  
  2. primary_hostname = smtp.dom.ain
  3. hide mysql_servers = localhost/exim/exim/45hrVjdgZkJGY
  4. domainlist local_domains = ${lookup mysql{SELECT `domain` \
  5. FROM `domain` WHERE \
  6. `domain`='${quote_mysql:$domain}' AND \
  7. `active`='1'}}
  8. domainlist relay_to_domains = ${lookup mysql{SELECT `domain` \
  9. FROM `domain` WHERE \
  10. `domain`='${quote_mysql:$domain}' AND \
  11. `active`='1'}}
  12. tls_certificate = /etc/exim/tls/fullchain.pem
  13. tls_privatekey = /etc/exim/tls/privkey.pem
  14. tls_on_connect_ports = 465
  15. tls_advertise_hosts = *
  16. hostlist relay_from_hosts = localhost:127.0.0.0/8
  17. acl_smtp_rcpt = acl_check_rcpt
  18. acl_smtp_data = acl_check_data
  19. acl_not_smtp = acl_not_smtp
  20. qualify_domain = dom.ain
  21. qualify_recipient = dom.ain
  22. allow_domain_literals = false
  23. exim_user = exim
  24. exim_group = exim
  25. never_users = root
  26. rfc1413_query_timeout = 0s
  27. sender_unqualified_hosts = +relay_from_hosts
  28. recipient_unqualified_hosts = +relay_from_hosts
  29. ignore_bounce_errors_after = 45m
  30. timeout_frozen_after = 15d
  31. helo_accept_junk_hosts = 192.168.1.0/24
  32. auto_thaw = 1h
  33. smtp_banner = "$primary_hostname, ESMTP EXIM $version_number"
  34. smtp_accept_max = 50
  35. smtp_accept_max_per_connection = 25
  36. smtp_connect_backlog = 30
  37. smtp_accept_max_per_host = 20
  38. split_spool_directory = true
  39. remote_max_parallel = 15
  40. return_size_limit = 70k
  41. message_size_limit = 64M
  42. helo_allow_chars = _
  43. smtp_enforce_sync = true
  44. log_selector = \
  45. +all_parents \
  46. +connection_reject \
  47. +incoming_interface \
  48. +lost_incoming_connection \
  49. +received_sender \
  50. +received_recipients \
  51. +smtp_confirmation \
  52. +smtp_syntax_error \
  53. +smtp_protocol_error \
  54. +queue_run
  55. syslog_timestamp = no
  56. begin acl
  57. acl_not_smtp:
  58. deny message = Sender rate overlimit - $sender_rate / $sender_rate_period
  59. ratelimit = 30 / 1h / strict
  60. accept
  61. acl_check_rcpt:
  62. accept hosts = :
  63. deny message = "incorrect symbol in address"
  64. domains = +local_domains
  65. local_parts = ^[.] : ^.*[@%!/|]
  66. deny message = "incorrect symbol in address"
  67. domains = !+local_domains
  68. local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  69. accept local_parts = postmaster
  70. domains = +local_domains
  71. deny message = "HELO/EHLO required by SMTP RFC"
  72. condition = ${if eq{$sender_helo_name}{}{yes}{no}}
  73. accept authenticated = *
  74. deny !authenticated = *
  75. sender_domains = +local_domains : +relay_to_domains
  76. message = "Warning! Authentication required!"
  77. deny message = "Your IP in HELO - access denied!"
  78. hosts = * : !+relay_from_hosts : !81-196.point.local
  79. condition = ${if eq{$sender_helo_name}\
  80. {$sender_host_address}{true}{false}}
  81. deny condition = ${if eq{$sender_helo_name}\
  82. {$interface_address}{yes}{no}}
  83. hosts = !127.0.0.1 : !localhost : *
  84. message = "My IP in your HELO! Access denied!"
  85. deny condition = ${if match{$sender_helo_name}\
  86. {\N^\d+$\N}{yes}{no}}
  87. hosts = !127.0.0.1 : !localhost : *
  88. message = "Incorrect HELO string"
  89. warn
  90. set acl_m0 = 30s
  91. warn
  92. hosts = +relay_from_hosts:4.3.2.1/32:192.168.1.0/24 #disable waits for 'friendly' hosts
  93. set acl_m0 = 0s
  94. warn
  95. logwrite = Delay $acl_m0 for $sender_host_name \
  96. [$sender_host_address] with HELO=$sender_helo_name. Mail \
  97. from $sender_address to $local_part@$domain.
  98. delay = $acl_m0
  99. accept domains = +local_domains
  100. endpass
  101. message = "No such user"
  102. verify = recipient
  103. accept domains = +relay_to_domains
  104. endpass
  105. message = "i don't know how to relay to this address"
  106. verify = recipient
  107. deny message = "you in blacklist - $dnslist_domain \n $dnslist_text"
  108. dnslists = opm.blitzed.org : \
  109. cbl.abuseat.org : \
  110. bl.csma.biz
  111. accept hosts = +relay_from_hosts
  112. deny message = "Homo hominus lupus est"
  113. acl_check_data:
  114. accept
  115. begin routers
  116. dnslookup:
  117. driver = dnslookup
  118. domains = ! +local_domains
  119. transport = remote_smtp
  120. ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  121. no_more
  122. system_aliases:
  123. driver = redirect
  124. allow_fail
  125. allow_defer
  126. data = ${lookup mysql{SELECT `goto` FROM `alias` WHERE \
  127. `address`='${quote_mysql:$local_part@$domain}' OR \
  128. `address`='${quote_mysql:@$domain}'}}
  129. dovecot_user:
  130. driver = accept
  131. condition = ${lookup mysql{SELECT `goto` FROM \
  132. `alias` WHERE \
  133. `address`='${quote_mysql:$local_part@$domain}' OR \
  134. `address`='${quote_mysql:@$domain}'}{yes}{no}}
  135. transport = dovecot_delivery
  136. begin transports
  137. remote_smtp:
  138. driver = smtp
  139. dkim_domain = ${lc:${domain:$h_from:}}
  140. dkim_selector = x
  141. dkim_private_key = /etc/exim/dkim/private.key
  142. dkim_canon = relaxed
  143. dovecot_delivery:
  144. driver = pipe
  145. command = /usr/libexec/dovecot/deliver -d $local_part@$domain
  146. message_prefix =
  147. message_suffix =
  148. delivery_date_add
  149. envelope_to_add
  150. return_path_add
  151. log_output
  152. user = exim
  153. address_pipe:
  154. driver = pipe
  155. return_output
  156. address_reply:
  157. driver = autoreply
  158. begin retry
  159. * * F,2h,15m; G,16h,1h,1.5; F,4d,6h
  160. begin rewrite
  161. begin authenticators
  162. auth_plain:
  163. driver = plaintext
  164. public_name = LOGIN
  165. server_prompts = Username:: : Password::
  166. server_condition = "${if crypteq{$2}{${lookup mysql{SELECT `password` FROM `mailbox` WHERE `username` = '${quote_mysql:$1}'}}}{yes}{no}}"
  167. server_set_id = $1
  168. auth_login:
  169. driver = plaintext
  170. public_name = PLAIN
  171. server_condition = "${if crypteq{$3}{${lookup mysql{SELECT `password` FROM `mailbox` WHERE `username` = '${quote_mysql:$2}'}}}{yes}{no}}"
  172. server_prompts = :
  173. server_set_id = $2
  174.