Advertisement
Guest User

mailer.conf_exim_477

a guest
Jul 9th, 2013
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.78 KB | None | 0 0
  1. sendmail         /usr/local/sbin/exim
  2. send-mail       /usr/local/sbin/exim
  3. mailq          /usr/local/sbin/exim -bp
  4. newaliases     /usr/local/sbin/exim -bi
  5. hoststat        /usr/local/sbin/exim
  6. purgestat      /usr/local/sbin/exim
  7. Настраиваем Exim
  8. # cat /usr/local/etc/exim/configure | grep -v '#'
  9. primary_hostname = mail.domain.pp.ua
  10. domainlist local_domains = @
  11. domainlist relay_to_domains =
  12. hostlist   relay_from_hosts = localhost:127.0.0.0/8:10.10.1.0/24
  13. acl_smtp_rcpt = acl_check_rcpt
  14. acl_smtp_data = acl_check_data
  15. av_scanner = clamd:/var/run/clamav/clamd
  16. qualify_domain = domain.pp.ua
  17. qualify_recipient = mail.domain.pp.ua
  18. allow_domain_literals = false
  19. exim_user = mailnull
  20. exim_group = mail
  21. never_users = root
  22. rfc1413_query_timeout = 0s
  23. sender_unqualified_hosts = +relay_from_hosts
  24. recipient_unqualified_hosts = +relay_from_hosts
  25. ignore_bounce_errors_after = 45m
  26. timeout_frozen_after = 15d
  27. helo_accept_junk_hosts = 10.10.1.0/24
  28. auto_thaw = 1h
  29. smtp_banner = "$primary_hostname, ESMTP EXIM $version_number"
  30. smtp_accept_max = 50
  31. smtp_accept_max_per_connection = 25
  32. smtp_connect_backlog = 30
  33. smtp_accept_max_per_host = 20
  34. split_spool_directory = true
  35. remote_max_parallel = 15
  36. return_size_limit = 70k
  37. message_size_limit = 64M
  38. helo_allow_chars = _
  39. smtp_enforce_sync = true
  40. log_selector = \
  41.    +all_parents \
  42.    +connection_reject \
  43.    +incoming_interface \
  44.    +lost_incoming_connection \
  45.    +received_sender \
  46.    +received_recipients \
  47.    +smtp_confirmation \
  48.    +smtp_syntax_error \
  49.    +smtp_protocol_error \
  50.    -queue_run
  51. syslog_timestamp = no
  52. begin acl
  53. acl_check_rcpt:
  54. accept  hosts = :
  55. deny    message       = "incorrect symbol in address"
  56.        domains       = +local_domains
  57.        local_parts   = ^[.] : ^.*[@%!/|]
  58. deny    message       = "incorrect symbol in address"
  59.        domains       = !+local_domains
  60.        local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  61. accept  local_parts   = postmaster
  62.        domains       = +local_domains
  63. deny    message       = "HELO/EHLO require by SMTP RFC"
  64.        condition     = ${if eq{$sender_helo_name}{}{yes}{no}}
  65. accept  authenticated = *      
  66. deny    message       = "Your IP in HELO - access denied!"
  67.        hosts         =  * : !+relay_from_hosts : !81-196.adsl.com
  68.        condition     = ${if eq{$sender_helo_name}\
  69.  
  70. {$sender_host_address}{true}{false}}
  71.  
  72. deny    condition     = ${if eq{$sender_helo_name}\
  73.  
  74. {$interface_address}{yes}{no}}
  75.  
  76.        hosts         = !127.0.0.1 : !localhost : *
  77.        message       = "main IP in your HELO! Access denied!"
  78. deny    condition     = ${if match{$sender_helo_name}\
  79.  
  80. {\N^\d+$\N}{yes}{no}}
  81.  
  82.        hosts         = !127.0.0.1 : !localhost : *
  83.        message       = "can not be only number in HELO!"
  84. deny    message       = "your hostname is bad (adsl, poll, ppp & etc)."
  85.        condition     = ${if match{$sender_host_name} \
  86.                        {adsl|dialup|pool|peer|dhcp} \
  87.                        {yes}{no}}        
  88.  warn
  89.         set acl_m0 = 30s
  90.  warn
  91.        hosts = +relay_from_hosts:80.15.42.0/24:81.23.17.0/24:10.10.1.0/24
  92.        set acl_m0 = 0s
  93.  warn
  94.        logwrite = Delay $acl_m0 for $sender_host_name \
  95.  
  96. [$sender_host_address] with HELO=$sender_helo_name. Mail \ from $sender_address to $local_part@$domain.
  97.  
  98.        delay = $acl_m0
  99. accept  domains       = +local_domains
  100.        endpass
  101.        message       = "In my mailserver not stored this user"
  102.        verify        = recipient   
  103. accept  domains       = +relay_to_domains
  104.        endpass
  105.        message       = "main server not know how relay to this address"
  106.        verify        = recipient
  107. deny    message       = "you in blacklist - $dnslist_domain --> $dnslist_text"
  108.        dnslists      = opm.blitzed.org : \
  109.                        cbl.abuseat.org
  110.  
  111. accept  hosts         = +relay_from_hosts
  112. deny    message       = "relay not permitted"                        
  113.  
  114. acl_check_data:
  115. deny malware = *
  116. message = "In e-mail found VIRUS - $malware_name"
  117. accept
  118.  
  119. begin routers
  120.  
  121. dnslookup:
  122.  driver = dnslookup
  123.  domains = ! +local_domains
  124.  transport = remote_smtp
  125.  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  126.  no_more
  127.  
  128. system_aliases:
  129.  driver = redirect
  130.  allow_fail
  131.  allow_defer
  132.  data = ${lookup{$local_part}lsearch{/etc/aliases}}
  133.  user = mailnull
  134.  group = mail
  135.  file_transport = address_file
  136.  pipe_transport = address_pipe
  137.  
  138. userforward:
  139.  driver = redirect
  140.  check_local_user
  141. # local_part_suffix = +* : -*
  142. # local_part_suffix_optional
  143.  file = $home/.forward
  144. # allow_filter
  145.  no_verify
  146.  no_expn
  147.  check_ancestor
  148.  file_transport = address_file
  149.  pipe_transport = address_pipe
  150.  reply_transport = address_reply
  151.  condition = ${if exists{$home/.forward} {yes} {no} }
  152.  
  153. localuser:
  154.  driver = accept
  155.  check_local_user
  156. # local_part_suffix = +* : -*
  157. # local_part_suffix_optional
  158.  transport = local_delivery
  159.  cannot_route_message = Unknown user
  160.  
  161. begin transports
  162.  
  163. remote_smtp:
  164.  driver = smtp
  165.  
  166. local_delivery:
  167.  driver = appendfile
  168.  file = /var/mail/$local_part
  169.  delivery_date_add
  170.  envelope_to_add
  171.  return_path_add
  172.  group = mail
  173.  user = $local_part
  174.  mode = 0660
  175.  no_mode_fail_narrower
  176.  
  177. address_pipe:
  178.  driver = pipe
  179.  return_output
  180.  
  181. address_file:
  182.  driver = appendfile
  183.  delivery_date_add
  184.  envelope_to_add
  185.  return_path_add
  186.  
  187. address_reply:
  188.  driver = autoreply
  189.  
  190. begin retry
  191.      *                    *       F,2h,15m; G,16h,1h,1.5; F,4d,6h
  192. begin rewrite
  193. begin authenticators
  194.  
  195. plain:
  196.  driver = plaintext
  197.  public_name = PLAIN
  198.  server_condition = ${if saslauthd{{$1}{$2}}{1}{0}}
  199.  server_set_id = $2
  200.  
  201. login:
  202.  driver = plaintext
  203.  public_name = LOGIN
  204.  server_prompts = "Username:: : Password::"
  205.  server_condition = ${if saslauthd{{$1}{$2}}{1}{0}}
  206.  server_set_id = $1
  207.  
  208. #cram_md5:
  209. #  driver = cram_md5
  210. #  public_name = CRAM-MD5
  211. #  server_secret = "тут кондишен :)"
  212. #  server_set_id = $1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement