Re: [exim] Spamassassin scanning Delivery Failure Reports&R…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Onur Güngören
Ημερομηνία:  
Προς: Exim-users
Καινούρια Θέματα: Re: [exim] Spamassassin scanning Delivery Failure Reports
Αντικείμενο: Re: [exim] Spamassassin scanning Delivery Failure Reports&References=47ECB3D2.1050008@linuxwan.net&In-Reply-To=47ECB3D2.1050008@linuxwan.net&Body=On 2008-03-28 08:59, Ted Cooper wrote:> Onur Güngör
Hi Ted,

thanks for your response. You are right was my fault, no excat conf or
debug output. Here is my used confi - file (cutted the retry config part)



primary_hostname = domain.dom
local_interfaces = <; 0.0.0.0.25 ; 127.0.0.1.10025
smtp_accept_queue_per_connection = 100
smtp_accept_max = 100


domainlist local_domains = dbm;/usr/local/exim/etc/localdomains.db
domainlist relay_to_domains = dbm;/usr/local/exim/etc/relaydomains.db
hostlist relay_from_hosts = 127.0.0.1 :
net-dbm;/usr/local/exim/etc/relayfromhosts.db

domainlist spamcheck_domains = dbm;/usr/local/exim/etc/spamcheckdomains.db
domainlist viruscheck_domains =
dbm;/usr/local/exim/etc/viruscheckdomains.db

domainlist route_domains = dbm;/usr/local/exim/etc/routedomains.db

acl_smtp_rcpt = acl_check_rcpt;
acl_smtp_data = acl_check_data;

qualify_domain = domain.dom
never_users = root
host_lookup = *

rfc1413_hosts = *
rfc1413_query_timeout = 1s


ignore_bounce_errors_after = 2d
timeout_frozen_after = 3d

######################################################################
#                       ACL CONFIGURATION                            #
#         Specifies access control lists for incoming SMTP mail      #
######################################################################


begin acl

# This access control list is used for every RCPT command in an incoming
# SMTP message. The tests are run in order until the address is either
# accepted or denied.

acl_check_rcpt:

  accept  hosts = :
  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%!]


  deny    message       = rejected because $sender_host_address is in a
black list at $dnslist_domain\n$dnslist_text
          dnslists      =
dnsbl.njabl.org:sbl.spamhaus.org:bl.spamcop.net:cbl.abuseat.org
  require verify        = sender


  accept  hosts         = +relay_from_hosts
          control       = submission
  accept  authenticated = *
          control       = submission


  accept  domains       = +local_domains
          endpass
          verify        = recipient


  accept  domains       = +route_domains
          endpass
          message       = Recipient could not be verified
          verify        = recipient/callout=10s


  accept  domains       = +relay_to_domains
          endpass
          verify        = recipient


  require message = relay not permitted
          domains = +local_domains : +relay_to_domains


  require verify = recipient
  deny    message       = relay not permitted


acl_check_data:

accept



######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
#     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
# An address is passed to each router in turn until it is accepted.  #
######################################################################


begin routers

amavis:
        no_verify
        driver = manualroute
        # if scanning incoming mails, uncomment the following line and
        condition = "${if or {{eq {$interface_port}{10025}} \
                          {eq {$received_protocol}{spam-scanned}} \
                          {eq {$sender_address}{}} \
                         }{0}{1}}"


        # change local_domains accordingly
        # domains = +local_domains
        domains = +viruscheck_domains
        transport = amavis
        route_list = "* localhost byname"
        self = send


#SpamAssassin
spamcheck_router:
no_verify
#check_local_user
# When to scan a message :
# - it isn't already flagged as spam
# - it isn't already scanned
domains = +spamcheck_domains
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}}} {1}{0}}"
transport = spamcheck
driver = accept

redirect_user:
    driver = redirect
    data = ${lookup {$local_part@$domain} dbm
{/usr/local/exim/etc/redirect.db}}


redirect_domains:
    driver = redirect
    data = ${lookup {$domain} dbm{/usr/local/exim/etc/redirect.db}}


manualrouting:
    driver = manualroute
    transport = remote_smtp
    route_data = ${lookup {$domain} dbm
{/usr/local/exim/etc/routedomains.db}}}}


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

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
# user = exim
file_transport = address_file
pipe_transport = address_pipe

userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
# allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply

localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user



######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################


begin transports

remote_smtp:
driver = smtp

local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
# group = mail
# mode = 0660

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply


#SpamAssassin
spamcheck:
    driver = pipe
    command = /usr/local/exim/bin/exim -oMr spam-scanned -bS
    use_bsmtp = true
#    transport_filter = /usr/local/spamassassin/bin/spamc
    transport_filter = /usr/bin/spamc
    home_directory = "/tmp"
    current_directory = "/tmp"
    # must use a privileged user to set $received_protocol on the way back
in!}
    user = exim
    group = exim
    log_output = true
    return_fail_output = true
    return_path_add = false
    message_prefix =
    message_suffix =


amavis:
       driver = smtp
       port = 10024
       allow_localhost



Hope this helps.