[exim] Unseen routers and catch-all

Top Page
Delete this message
Reply to this message
Author: Alan Pinder
Date:  
To: exim-users
Subject: [exim] Unseen routers and catch-all
Hi,

First-time poster to this list, please be gentle :)

Currently we have 3 main routers: alias (for forwarders), mailbox and
catch_all (for all other ones - this performs different actions
depending on the domain configuration).

We recently had some customers asking us whether they could have the
same e-mail address for both mailboxes and forwarders - so the message
gets delivered to a mailbox as well as being forwarded to seperate
destinations. Looking through the Exim documentation, I noticed the
`unseen` directive - and added this to tbe bottom of the alias router.

The worked well in that messages were delivered to both the mailbox and
the forwarders, however this has the unfortunate side-effect of also
running the catch-all router for the e-mail (causing a bounce message to
be sent back in certain cases!).

I temporarily resolved this by copying the alias router and placing this
just above the catch-all router:

alias_blackhole_router:
        driver = redirect
        condition = <condition>
        data = :blackhole:  


Our router system now goes: alias -> mailbox -> alias_blackhole -> catchall

This technique seems like a such a `hack` however - running the same
router twice, just to blackhole a message?

Can anybody in the Exim community recommend a better way of doing this?
For example, is there a way to retrieve a flag saying whether delivery
has actually been attempted for this mail (even from an `unseen` router).

Kind regards,

Alan Pinder