Re: [Exim] Delivering mail for users with no account

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Greg Ward
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [Exim] Delivering mail for users with no account
On 15 March 2002, Andy Hawthorn said:
> I?m trying to get Exim to deliver all mail for which there is no local
> account for to a single account.


Are you *sure*? Any time someone mistypes an address in your domain,
then 1) you (or someone) will be seeing mail not destined for them, and
2) the original sender will never find out about their typo. Bad on
both counts.

> The way I?ve thought of to do this (and
> perhaps this is way off the mark) is by having a director that catches
> addresses not picked up on by other directors. My new director would
> then pass the message to an appropriate transport for my catch-all
> account.


If you're still going to go ahead with this, that sounds right.

> I also need the destination addresses of the messages to be
> preserved so that my catch-all accounts messages can be downloaded to
> another MTA which will sort out the messages based on their original
> addresses.


Make sure you set the "envelope_to_add" option on the transport, then.

> I tried putting a director at the end of the list with no driver but
> Exim didn't like this.


Right, every director must have a driver -- the driver is just the type
of director. The "catch-all" director was called smartuser in Exim 3.
In Exim 4, directors are no more, and it's now the "accept" router.

> I?m a little confused about the whole concept of
> the driver to be honest. Presumably the driver is the actual condition
> that causes the address to be caught and ?directed? but how would I go
> about writing one myself?


No. There are many options that set the condition for a director to
match: local_part, suffix, prefix, domain, condition itself, etc. You
might want to see chapter 20 of the Exim 3 spec for the options common
to all directors and routers.

However, a catch-all director by its very nature won't have any
conditions. This should do the trick (Exim 3):

  catchall:
    driver = smartuser
    transport = catchall


Then, up in your transports section, something like this:

  catchall:
    driver = appendfile
    envelope_to_add = true
    file = /var/mail/catchall


Untested, off-the-top-of-my-head, YMMV, etc.

Again, I don't think this is a good idea. But if your heart is set on
it, it shouldn't be hard to do with Exim.

        Greg
--
Greg Ward - software developer                gward@???
MEMS Exchange                            http://www.mems-exchange.org