[Pkg-exim4-users] ACL to verify recipients based on alias file for multiple domains

Bas Couwenberg bas at itd.net
Tue Sep 6 11:47:38 UTC 2005

Hi list,

I maintain an email gateway running exim4 on Debian Sarge. It is
configured with an alias file for each domain it accepts mail for.

The alias files are used to forward incoming emails to the correct
mailserver as the exim4 server does not handle any accounts, it only
routes and does an intial virus and spam check.

Currently when exim4 receives an email it forwards it to amavisd-new
which checks it for virusses and spam. After this is completed the
recipient is looked up in the alias files.

95% of all the spam and virusses we receive are addressed to users which
don't exist (in the alias files). So I would like to create an ACL which
checks if the recipient addressed in an incoming mail actually exists in
the alias file of the domain addressed before it gets forwarded to

I've read the documentation on ACLs at exim.org, but am not quite sure
how I would accomplish this.

I presume that the code needs to be placed in the file
/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt, as that seems to be
the ACL for incoming RCPT headers, but I have no idea how to verify the
recipients based on the alias files. I tried playing around with the
lookup code used in the router section[1], but that didn't work.

Could someone help out with this configuration?

PS. Please CC me as I'm not on this list


Bas Couwenberg


At present the alias files per domain are handled by the following
router section:

bas at asgard:~$ cat /etc/exim4/conf.d/router/350_exim4-config_vdom_aliases
        driver = redirect
        domains = dsearch;/etc/mail/virtual
        data =
        pipe_transport = address_pipe
        file_transport = address_file

More information about the Pkg-exim4-users mailing list