Advertisement
Syn-McJ

exim.conf

Oct 8th, 2012
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.63 KB | None | 0 0
  1. log_selector = \
  2. +all_parents \
  3. +lost_incoming_connection \
  4. +received_sender \
  5. +received_recipients \
  6. +tls_cipher +tls_peerdn \
  7. +smtp_confirmation \
  8. +smtp_syntax_error \
  9. +smtp_protocol_error
  10.  
  11. primary_hostname = otdvtest.ru
  12. domainlist local_domains = @ : lsearch;/etc/exim4/domains
  13. hostlist relay_from_hosts = 127.0.1.1 : 10.0.0.0/24
  14.  
  15. local_interfaces = 0.0.0.0
  16.  
  17. domainlist relay_to_domains = @ : lsearch;/etc/exim4/domains
  18. exim_user = Debian-exim
  19. exim_group = Debian-exim
  20. trusted_users = www-data
  21.  
  22. never_users = root
  23. host_lookup = *
  24. rfc1413_hosts = *
  25. rfc1413_query_timeout = 0s
  26. ignore_bounce_errors_after = 1d
  27. timeout_frozen_after = 1d
  28. smtp_accept_max = 500
  29.  
  30. allow_mx_to_ip = true
  31.  
  32. acl_smtp_rcpt = acl_check_rcpt
  33. acl_smtp_data = acl_check_data
  34. acl_smtp_mail = acl_check_sender
  35.  
  36.  
  37. sender_unqualified_hosts = +relay_from_hosts
  38. recipient_unqualified_hosts = +relay_from_hosts
  39.  
  40. begin acl
  41. acl_check_rcpt:
  42. accept hosts = :
  43.  
  44. deny message = Restricted characters in address
  45. domains = +local_domains
  46. local_parts = ^[.] : ^.*[@%!/|]
  47.  
  48. deny message = Restricted characters in address
  49. domains = !+local_domains
  50. local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  51.  
  52. accept local_parts = postmaster
  53. verify = recipient
  54. domains = +local_domains
  55. #require verify = sender
  56.  
  57. accept hosts = +relay_from_hosts
  58. control = submission
  59.  
  60. accept authenticated = *
  61. condition = ${if eq{${extract{5}{:}{${lookup{$authenticated_id}lsearch{/etc/exim4/passwd}}}}}{no} {yes}{no}}
  62. condition = ${if eq{${extract{3}{:}{${lookup{${domain:$authenticated_id}}lsearch{/etc/exim4/domains}}}}}{no} {yes}{no}}
  63. control = submission/domain=
  64.  
  65. deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\\n$dnslist_text
  66. dnslists = ${readfile {/etc/exim4/dnsblist}{:}}
  67.  
  68. require message = relay not permitted
  69. domains = +local_domains : +relay_to_domains
  70.  
  71. require verify = recipient
  72.  
  73. accept
  74.  
  75. acl_check_data:
  76. accept
  77.  
  78. acl_check_sender:
  79. accept
  80.  
  81. begin routers
  82. dnslookup:
  83. driver = dnslookup
  84. transport = remote_smtp
  85. #ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  86. #ignore_target_hosts = 0.0.0.0 : !+relay_from_hosts
  87. self = pass
  88. no_more
  89.  
  90. disabled_domains:
  91. driver = redirect
  92. condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
  93. allow_fail = yes
  94. data = :fail: Domain disabled
  95. no_more
  96.  
  97. disabled_users:
  98. driver = redirect
  99. condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
  100. allow_fail = yes
  101. data = :fail: User disabled
  102. no_more
  103.  
  104. local_domains:
  105. driver = redirect
  106. data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
  107. cannot_route_message = Unknown user
  108. no_more
  109.  
  110. group_aliases:
  111. driver = redirect
  112. data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}
  113. condition = ${if and{\
  114. {exists{/etc/exim4/aliases}}\
  115. {eq {${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}} {group} }\
  116. } {yes} {no} }
  117. redirect_router = a_dnslookup
  118.  
  119. aliases:
  120. driver = redirect
  121. data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}
  122. condition = ${if exists{/etc/exim4/aliases} {yes} {no} }
  123.  
  124. aliases_pipe:
  125. driver = accept
  126. transport = aliases_pipe
  127. condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/pipe-aliases} {yes} {no} }
  128.  
  129. local_users:
  130. driver = redirect
  131. condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/passwd} {yes} {no} }
  132. data = $local_part@$domain
  133. redirect_router = autoreplay
  134.  
  135. catchall_for_domains:
  136. driver = redirect
  137. headers_add = X-redirected: yes
  138. data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
  139. file_transport = local_delivery
  140.  
  141. unknown_users:
  142. driver = redirect
  143. allow_fail = yes
  144. data = :fail: Unknown user
  145. no_more
  146.  
  147. autoreplay:
  148. driver = accept
  149. condition = ${if exists{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}/message.txt} {yes} {no}}
  150. retry_use_local_part
  151. transport = address_reply
  152. unseen
  153.  
  154. localuser:
  155. driver = accept
  156. transport = local_delivery
  157.  
  158. # Same routers without autoreplay
  159.  
  160. a_dnslookup:
  161. driver = dnslookup
  162. transport = remote_smtp
  163. ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  164. self = pass
  165. no_more
  166.  
  167. a_disabled_domains:
  168. driver = redirect
  169. condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
  170. allow_fail = yes
  171. data = :fail: Domain disabled
  172. no_more
  173.  
  174. a_disabled_users:
  175. driver = redirect
  176. condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
  177. allow_fail = yes
  178. data = :fail: User disabled
  179. no_more
  180.  
  181. a_local_domains:
  182. driver = redirect
  183. data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
  184. cannot_route_message = Unknown user
  185. redirect_router = a_dnslookup
  186. no_more
  187.  
  188. a_aliases:
  189. driver = redirect
  190. data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}
  191. condition = ${if exists{/etc/exim4/aliases} {yes} {no} }
  192. redirect_router = a_dnslookup
  193.  
  194. a_aliases_pipe:
  195. driver = accept
  196. transport = aliases_pipe
  197. condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/pipe-aliases} {yes} {no} }
  198.  
  199. a_local_users:
  200. driver = accept
  201. transport = local_delivery
  202. condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/passwd} {yes} {no} }
  203.  
  204. a_catchall_for_domains:
  205. driver = redirect
  206. headers_add = X-redirected: yes
  207. data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
  208. file_transport = local_delivery
  209. redirect_router = a_dnslookup
  210.  
  211. begin transports
  212. remote_smtp:
  213. driver = smtp
  214.  
  215. local_delivery:
  216. driver = appendfile
  217. file = ${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}/mbox
  218. delivery_date_add
  219. envelope_to_add
  220. return_path_add
  221. mode = 0660
  222. quota = ${extract{3}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}M
  223. quota_warn_threshold = 75%
  224. use_lockfile = no
  225. no_mode_fail_narrower
  226. user = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
  227. group = ${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
  228.  
  229. address_pipe:
  230. driver = pipe
  231. return_output
  232.  
  233. aliases_pipe:
  234. driver = pipe
  235. command = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/pipe-aliases}}}}
  236. use_shell
  237.  
  238. address_reply:
  239. driver = autoreply
  240. headers = ${readfile{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}/message.txt}}
  241. to = $sender_address
  242. begin retry
  243. * * F,2h,15m; G,16h,1h,1.5; F,4d,6h
  244.  
  245. begin rewrite
  246.  
  247. begin authenticators
  248.  
  249. login:
  250. driver = dovecot
  251. public_name = LOGIN
  252. server_socket = /var/run/dovecot/auth-client
  253. server_set_id = $1
  254.  
  255. plain:
  256. driver = dovecot
  257. public_name = PLAIN
  258. server_socket = /var/run/dovecot/auth-client
  259. server_set_id = $1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement