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

Christian Schmidt christian.schmidt at chemie.uni-hamburg.de
Wed Sep 7 21:42:37 UTC 2005


Hello Bas,

Bas Couwenberg, 06.09.2005 (d.m.y):

> 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.

Why don't you do it the other way around? From my pomt of view there
is no need to scan an email for spam and/or viri without knowing  that
it is addressed to _valid_ users "living" on your systems.

> 95% of all the spam and virusses we receive are addressed to users which
> don't exist (in the alias files).

That's what I mean.

> 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
> amavisd-new.
u 
> 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?


Take a look at how exim does lookups in "normal" alias files:
(From the system_aliases router:)
  data = ${lookup{$local_part}lsearch{/etc/aliases}}

Placing a corresponding entry in your check_rcpt acl should do the
job.

hth,
Christian 

-- 
Untergangspropheten, die vom Pessimismus leben - und gar nicht
schlecht - empfinden jede Art von Zuversicht zwangsläufig als
Existenzbedrohung.
		-- Bob Hope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-exim4-users/attachments/20050907/99fc347e/attachment.pgp


More information about the Pkg-exim4-users mailing list