[exim] ACL Drop Issue

Top Page
Delete this message
Reply to this message
Author: paulcormack@gmail.com
Date:  
To: exim-users
Subject: [exim] ACL Drop Issue
Hello list,

I have a simple drop in the /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt
file which should deliver mail to a list of users, dropping all other
messages.

drop
    log_message = Not a member of recipients_allow.list
    recipients = !lsearch;/etc/exim4/filters/recipients_allow.list


On testing the result it seems to work, sending from root@localhost to
me@???

# exim -bh 127.0.0.1
**** SMTP testing session as if from host 127.0.0.1
**** but without any ident (RFC 1413) callback.
**** This is not for real!

>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? yes (matched "*")
>>> looking up host name for 127.0.0.1
>>> IP address lookup yielded localhost
>>> gethostbyname2 looked up these IP addresses:
>>> name=localhost address=::1
>>> name=localhost address=127.0.0.1
>>> checking addresses for localhost
>>> ::1
>>> 127.0.0.1 OK
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)

220 server.example.com ESMTP Exim 4.71 Tue, 14 Sep 2010 10:56:37 +0100
HELO arrrrrgh
250 server.example.com Hello localhost [127.0.0.1]
MAIL FROM: root@localhost
>>> using ACL "acl_check_mail"
>>> processing "accept"
>>> accept: condition test succeeded

250 OK
RCPT TO: me@???
>>> using ACL "acl_check_rcpt"
>>> processing "accept"
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed
>>> processing "drop"
>>> check recipients = !lsearch;/etc/exim4/filters/recipients_allow.list
>>> me@??? in "!lsearch;/etc/exim4/filters/recipients_allow.list"?

yes (end of list)
>>> drop: condition test succeeded

550 Administrative prohibition
LOG: H=localhost (arrrrrgh) [127.0.0.1] F=<root@localhost> rejected RCPT
me@???: Not a member of recipients_allow.list

The acl test comes back with a "drop: condition test succeeded", saying the
address me@??? is not in the recipients_allow.list and writes to the
log. If I run mail (echo "testing exim acl" | mail -v -s "test email"
me@???) the message is delivered, even if the recipient is not in
the allowed list. Any idea as to why the tests work but when I use the mail
command the message goes into the exim queue and is delivered? Any help is
appreciated!