[Exim] exim amavisd-new trouble

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Markus Eckerl
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] exim amavisd-new trouble
Hallo,

I am running exim-4.30 with the mySQL backend and amavisd-new. Everything is working fine but unfortunatelly exim is receiving and queueing all mail. I think I made a little mistake - configuring exim the wrong way.
The scenario should work the following way:
1. exim listens on port 25 for mail.
2. if new mail arrives exim searches weather the receiver and the sender address are valid.
3. if the addresses are valid exim delivers the mail.

now my scenario:
1. exim listens on port 25 for mail.
2. if new mail arrives exim delivers it to amavisd-new!
This is extremly bad because there are several bounces and exim will delay email for the specific domains!

Whats wrong with my config?
Here are the parts from my exim configuration:

begin acl

acl_check_rcpt:

    accept  hosts = :
    accept  authenticated = *
    require verify      = sender
    require verify      = recipient
    deny    domains     = +local_domains
    local_parts         = ^[.] : ^.*[@%!/|]
    deny    domains     = !+local_domains
    local_parts         = ^[./|] : ^.*[@%!] : ^.*/\\.\\./



    accept  local_parts = postmaster
    domains             = +local_domains
    require verify      = sender
    require verify      = recipient



    accept  domains     = +local_domains
    endpass
    require verify      = sender
    require verify      = recipient



    accept  domains     = +relay_to_domains
    endpass
    require verify      = sender
    require verify      = recipient



    accept  hosts       = +relay_from_hosts



    deny    message     = relay not permitted, are you authenticated?\n Please contact the technical support!


check_message:
    require verify = header_syntax
    warn message = X-Authenticated: $authenticated_id
    condition = ${if !def:h_X-Authenticated: {yes}{no}}
    authenticated = *
    require verify        = header_sender
    accept  senders       = !:
    require verify        = header_sender
    accept


begin routers

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


# virenscanner -- alles was noch nicht gescannt wurde wird auf viren gecheckt!
amavis:
    driver = manualroute
    check_local_user
    domains = ! +local_domains
    condition = "${if or {{eq {$interface_port}{10025}} {eq {$received_protocol}{spam-scanned}} {eq {$sender_address}{}} }{0}{1}}"
    retry_use_local_part
    transport = amavis
    route_list = "* localhost byname"
    self = send


# router for local aliases --> postmaster
system_aliases:
    driver = redirect
    allow_fail
    allow_defer
    data = ${lookup{$local_part}lsearch{/etc/aliases}}
    domains = LOCAL_DOMAINS
    retry_use_local_part
    file_transport = address_file
    pipe_transport = address_pipe


# router for local user mailboxes
localuser:
    driver = accept
    check_local_user
    domains = LOCAL_DOMAINS
    transport = local_delivery
    cannot_route_message = Unknown user


# router for virtual user and av-scanning
mysqluser_amavis:
    driver = manualroute
    domains = +local_domains
    condition = "${if or {{eq {$interface_port}{10025}} {eq {$received_protocol}{spam-scanned}} {eq {$sender_address}{}} }{0}{1}}"
    route_list = "* localhost byname"
    retry_use_local_part
    transport = amavis
    self = send


# autoresponders from the db
mysql_autorespond:
    driver = accept
    condition = ${if eq{} {${lookup mysql{SELECT autoresponder FROM emails WHERE autoresponder='yes' AND username='$local_part' AND
    no_verify
    no_expn
    unseen
    transport = address_mysql


# usercheck -- if real (in mysql database)
virtual_local_user:
    driver = accept
    condition = ${if eq{} {${lookup mysql{SELECT id FROM emails WHERE username='$local_part' AND domain='$domain' AND status='1'}}}{
    domains = ${lookup mysql {MYSQL_USER}{$value}}
    retry_use_local_part
    transport = virtual_delivery


# usercheck -- if alias (in mysql database)
virtual_aliases:
    driver = redirect
    allow_defer
    allow_fail
    data = ${lookup mysql {MYSQL_ALIAS}}
    retry_use_local_part
# wild card match '@'@domain (in mysql database)


virtual_all_alias:
    driver = redirect
    allow_defer
    allow_fail
    data = ${lookup mysql {MYSQL_ALL_ALIAS}}
    retry_use_local_part




begin transports

# SMTP transport Exim -> amavisd
amavis:
    driver = smtp
    port = 10024
    allow_localhost
    # for debugging change return_output to true
    no_return_path_add


# transport for delivering over SMTP
remote_smtp:
    driver = smtp


# local delivery to user mailboxes
local_delivery:
    driver = appendfile
    file = /var/spool/virtual_mail/postbox/${domain}/${local_part}
    delivery_date_add
    envelope_to_add
    return_path_add
    group = mail
    mode = 0660
    user = mail
    quota = ${lookup mysql{SELECT quota FROM emails WHERE username='$local_part' AND domain='$domain'}{$value}{25M}}
    quota_warn_threshold = ${lookup mysql{SELECT quotawarn FROM emails WHERE username='$local_part' AND domain='$domain'}{$value}{80
%}}
    quota_warn_message = "\
    To: $local_part@$domain\n\
    Subject: Your mailbox\n\n\
    Diese Email wurde automatisch erstellt.\n\n\
    Die Groesse Ihrer Mailbox hat \
    einen festgelegten Schwellwert \n\
    ueberschritten. Bitte rufen Sie ihre Emails ab!\n"


# virtual delivery to user mailboxes
virtual_delivery:
    driver = appendfile
    file = /var/spool/virtual_mail/postbox/${domain}/${local_part}
    group = mail
    mode = 0660
    user = mail


# transport for autoresponders
address_mysql:
    driver   = autoreply
    reply_to = "${local_part}@${domain}"
    from     = "${local_part}@${domain}"
    to       = "${sender_address}"
    subject  = "${lookup mysql{SELECT arsubject FROM emails WHERE username='$local_part' AND domain='$domain'}{$value} {Automatic re
ply from ${local_part}@${domain}}}"
    text     = "${lookup mysql{SELECT artext FROM emails WHERE username='$local_part' AND domain='$domain'}{$value}}"




who can help me please?

Bye
Markus