lorenzo tombini <[email protected]> (Mo 26 Sep 2016 16:08:45 CEST):
> hi all,
> i'm really new in exim.
> 
> I'd like to configure to forward different account, belonging to the same
> domain, to different server.
> I mean,
> 1) when exim gets an email for [email protected], it must be forwarded to
> [email protected] (server X)
> 2) when exim gets an email for [email protected], it must be forwarded to
> [email protected] (server Y)
> 
> How can i do that?
> could some one let me know the correct way?

There Is More Than One Way To Do It.
The most simple way is using aliases, in case routing for x.example.com
and y.example.com just works on your box.

If you serve example.com only and nothing else, you may just put
them into your /etc/aliases (provided that your Exim is set up as
usual).

    # /etc/aliases
    bill:   [email protected]
    rose:   [email protected]

If you serve several distinct domains, you can use an extra file per
domain (or put them alltogether into one single file)

Insert a new router in the proper place in your routers chain:

    <some name>:
        driver = redirect
        file = <config dir>/virtual/$domain.alias
        data = ${lookup{$local_part}lsearch{<config 
dir>/virtual/$domain.aliases}}

Now you can maintain a distinct alias file for every domain you serve.
Alternativly

    <some name>:
        driver = redirct
        data = ${expand:${lookup{$local_part@$domain}lsearch*@{<config 
dir>/virtual.aliases}}}

if you want to maintain a single alias file for all your forwardings:

    # virtual.aliases
    [email protected]:   [email protected]
    *@example.com:      [email protected]

But please consider this mail as a hint only, consult the spec.txt for
more information and for completness. My hints may be even wrong.


    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -

Attachment: signature.asc
Description: Digital signature

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to