Re: [exim] Need help with exim.

Top Page
Delete this message
Reply to this message
Author: mkp_71
Date:  
To: exim-users
Subject: Re: [exim] Need help with exim.

I still have trouble with mail delivery failed spam. My exim.conf now is:

primary_hostname = mail.domain.com
domainlist local_domains = domain.com
domainlist domains_we_reject = *.*.*.ru:*.*.ru:*.ru:*.br:*.in:*.cn:*.rus
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1: 192.168.0.0/16
log_file_path = syslog
message_size_limit = 30M
smtp_receive_timeout=5m
smtp_accept_queue = 100
smtp_accept_max = 40
smtp_accept_max_per_host = 5
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
av_scanner = clamd:/var/run/clamav/clamd.sock
spamd_address = /var/run/spamd.sock
#spamd_address = 127.0.0.1 783
never_users = root
#host_lookup =
host_lookup = 0.0.0.0/0
host_lookup_order = byaddr
rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 1d
errors_reply_to = postmaster@???
timeout_frozen_after = 3d
helo_try_verify_hosts = !+relay_from_hosts
helo_allow_chars =
begin acl
acl_check_rcpt:
check_recipient:
# stop bounce from us, lets do it by sender's server
accept domains = +local_domains
endpass
message = unknown user
verify = recipient

accept hosts = :

  deny
          log_message = match in spam list
          dnslists = bl.spamcop.net:sbl.spamhaus.org
  deny    sender_domains = +domains_we_reject
          message = Unknown users
  deny    message       = Restricted characters in address
          domains       = +local_domains
          local_parts   = ^[.] : ^.*[@%!/|]
  deny    message       = Restricted characters in address
          domains       = !+local_domains
          local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  accept  local_parts   = postmaster
          domains       = +local_domains
  require verify        = sender
  accept  domains       = +local_domains
          endpass
          verify        = recipient
  accept  hosts         = +relay_from_hosts
          control       = submission
          domains               = !+local_domains
  accept  authenticated = *
          control       = submission
  accept  domains       = +relay_to_domains
          endpass
          verify        = recipient
  deny    message       = relay not permitted


acl_check_data:

  deny message = Serious MIME defect detected ($demime_reason)
  demime = *
  deny    message   = This message contains a virus ($malware_name) and has
been rejected.
        # skip virus check when message is larger than 1MB
        condition = ${if <{$message_size}{1m}{1}{0}}
        demime = *
        malware = *


# Messages larger than 150k are accepted without spam scanning to reduce
spamd load

accept condition = ${if >{$message_size}{150k}{true}}

    warn    message = X-SA-Report: $spam_report
               spam = mail:true
       condition = ${if >{$spam_score_int}{0}{1}{0}}
    warn    message = X-SA-Status: Yes
               spam = mail:true
       condition = ${if >{$spam_score_int}{40}{1}{0}}
    deny    message = This message scored $spam_score spam points.
               spam = mail:true
       condition = ${if >{$spam_score_int}{120}{1}{0}}




#      warn message   = X-Spam_score: $spam_score\n\
#                       X-Spam_score_int: $spam_score_int:\n\
#                       X-Spam_bar: $spam_bar\n\
#                       X-Spam_report: $spam_report
#                       X-Spam_flag: Yes
#                 condition = ${if <{$message_size}{500k}{1}{0}}
#                     spam      = mail:true
#      deny message = This message was classified as SPAM
#                  condition = ${if >{$spam_score_int}{55}}


accept

begin routers


spamassassin_router:
        driver = accept
        transport = spamassassin
        condition = ${if eq {$received_protocol}{smtp}{}}
     no_verify
    no_more


first_liases:
        driver = redirect
        domains = +local_domains
        data = ${lookup{$local_part@$domain}lsearch{/etc/aliases}}
        user = mail
        file_transport = address_file
        pipe_transport = address_pipe
        allow_fail
        allow_defer



localuser:
        driver = accept
        domains = +local_domains
        check_local_user
        address_data = "spam_score=40 use_spam_folder=1 mark_spam_prio=1"
        transport = local_delivery
        cannot_route_message = Unknown user
    no_more


dnslookup:
        driver = dnslookup
        domains = ! +local_domains
        transport = remote_smtp
        ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
    no_more


last_fail:
        driver = redirect
        allow_fail
        data = :fail:No such user $local_part at $domain
        no_more


begin transports


# This transport is used for delivering messages over SMTP connections.

remote_smtp:
driver = smtp

local_delivery:
driver = appendfile
user = $local_part
group = mail
maildir_format
delivery_date_add
envelope_to_add
return_path_add
mode = 0660
headers_remove=${if
and{{MARK_SPAM}{or{{IS_SPAM}{IS_LOW_PRIO}}}}{X-MSMail-Priority:X-Priority}{}}
headers_add = ${if and{{MARK_SPAM}{IS_SPAM}}{X-MSMail-Priority: Low}{}}
directory = $home/Maildir${if and{{IS_SPAM}{USE_SPAM_FLDR}}{/.SPAM}{}}
address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply



antivirus:
driver = pipe
batch_max = 200
command = /bin/nice -19 /inet/src/scan/ph ${pipe_addresses}
return_output = false
return_path_add = false
user = mail
group = mail

spamassassin:
driver = pipe
use_bsmtp = true
command = /usr/exim/bin/exim -bS -oMr sa-checked
transport_filter = /usr/bin/spamc -f
home_directory = /tmp
current_directory = /tmp
user = mail
group = mail
log_output = true
return_fail_output = true

begin retry

begin rewrite


begin authenticators

dovecot_plain:
        driver = dovecot
        public_name = LOGIN
        #server_prompts = "Username:: : Password::"
        server_socket = /var/run/dovecot/auth-client
-- 
View this message in context: http://old.nabble.com/Need-help-with-exim.-tp26373475p26776563.html
Sent from the Exim Users mailing list archive at Nabble.com.