Re: [Exim] Revised question: How to send all incoming mail t…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Sergei Gerasenko
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] Revised question: How to send all incoming mail to a single user?
> relay server. It receives msgs from other machines in a single domain, and
> passes them to their external recipients, anywhere in the world. What
> we need, for testing, is a way to take all msgs that are sent to this
> server for relaying, and send them to a single local user, instead of
> passing them on.
>
> Can someone explain how to do this? Thanks again!


Somebody correct me if I'm wrong but I think this can be done by doing
the following. First on the relay server create a domainlist router that
explicitly routes all remote messages (both incoming and outgoing --
provided their domains are not in the list of local hosts. That is those
message are for incoming or outgoing relaying) to a specific local host:

domain_list_router:
    ...
    route_list = * local_host by_dns_a


On that local host, you say that whatever the domain part is, it should
be considered local. To do that, in your local_domains option in the
exim configuration on the local host, you probably need to say:

local_domains = *

Then, create a smartuser director on that local host and place it first
in the list of the directors.

smart_user:
    driver = smartuser
    new_user = postmaster


One complication I can see is that your relay server may be doing both
incoming and outgoing relaying. In that case, you will need to make sure
you distinguish between incoming and outgoing messages. If you place
more specific rules in the domainlist router first and the catchall "*"
rule last, more specific rules will take precedence. If your relay server
does only outgoing relaying, than you don't have to worry about
distinguishing the types of relaying.

At any rate, you know what parts of documentation to look at now.

Cheers,
    Sergei