[exim] Query on address rewriting - can it be done in an ACL…

Inizio della pagina
Delete this message
Reply to this message
Autore: Ron White
Data:  
To: Exim Users
Oggetto: [exim] Query on address rewriting - can it be done in an ACL?
I'm aware of the 'don't accept mail for non-existent users' issue and
the caveats that go with it, but I have the need to set up a couple of
domains so they redirect any mail that does not have a valid recipient
to a catchall mailbox.

Looking at the docs it seems I can either do this by adding another
router or by using address rewriting.

Because of the diverse way I'm routing/sorting mail (multiple
quarantines, local and relay final destinations dependent of recipient)
adding another router would mean adding multiple additional routers plus
lots more conditions to cover a range of possible outcomes. So it's
probably not ideal for me.

Putting an SMTP Time rewrite rule in would probably do it, but the
addresses to 'not' match are held in a database - as is their 'catchall'
destination localpart. This would end up with two additional SQL lookups
for every single address coming in - so that's not really ideal for me.

Because it is unlikely that 99% of incoming mail will need to be
redirected to a catchall, I'd rather place conditional checks for it in
an ACL and then rewrite $local_part only if certain acl_m_variables are
set. I'd also like to add a header that says X-Originally-To: But from
what I can see I don't have this option?

I guess what I'm trying to ask is can I rewrite address conditionally
inline in an ACL?