Re: [Exim] How to distinguish between mail to be relayed and…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Dominik Ruf
Date:  
À: exim-users
Sujet: Re: [Exim] How to distinguish between mail to be relayed and locally delivered email in ACLs?
* Eli <eli-list@???> [2004-01-10 00:40]:
> I just realized after setting up exiscan to scan emails for spam, that I
> would be scanning both emails that my users are sending out to remote hosts,
> and also emails that are to be accepted locally. Now, there's nothing
> really wrong with that, except that I would like to have emails scanned only
> if they are being sent to a local address (ie, not a user sending outbound
> email).


You're also encountering the problem that at DATA time you can't
tell for sure how many recipients there are. What would you do
if one would be local and the other one external?

Therefor you couldn't deside this questions by looking at the
recipient. But you may decide it by looking at the MAIL FROM
sender because there's only one in each transaction.

> I figured that'd be simple enough with just checking the authenticated
> setting since all my users musth auth - except then I remembered that


Oh... you already saw this possibility... :-)

> there's my relay_to_domains and relay_from_hosts lists which (although
> currently empty) may contain other users which I may not want to scan email
> for either if it's to be relayed out.
>
> Is there any sure-fire way to (in a DATA ACL) tell if a message is locally
> or remotely bound?


No (see above: there could be one RCPT local and one remote in one
email).

> I thought of testing domains or recipient or something,
> but I believe those are valid only during the RCPT ACL?


Yes. Have a look at
http://duncanthrax.net/exiscan-acl/exiscan-acl-examples.txt

6. A multi-profile configuration for sites where different
"customers" (or users) have different content scanning
preferences.

Dominik