Re: [exim] forward single users to another mta

Pàgina inicial
Delete this message
Reply to this message
Autor: Oli
Data:  
A: Stefan Lubitz
CC: exim-users
Assumpte: Re: [exim] forward single users to another mta
Hi Stefan,

I can't give you too many specifics below offhand, I'd have to study the
(fantastic) documentation at exim.org, but here's an outline of how it
should work.

If we assume that there is no pattern to the usernames where they should
be forwarded, then somehow you need to look up their destination.

Exim can handle several different kinds of lookup - file, database.

Essentially, you need to set up different routers for the purpose and
set conditions on those routers.

The local deliveries should be allowed to fall all the way through the
routers until they reach your 'accept' router, tied to an appendfile
transport.

The ones which are to be remote need to be swallowed by one of the first
routers - probably using 'redirect' to change the domain of the email
manually, tied to a 'remote_smtp' transport to forward it to the other
mailserver, which would have to have DNS set and accept mail for this
subdomain.

A 'condition' on the router would decide whether it swallows that mail,
something like:

condition = ${lookup mysql {FORWARDTHIS}{$value}}

Where FORWARDTHIS is previously defined as something like:

FORWARDTHIS=SELECT 1 FROM emailtable WHERE
domain='{$quite_mysql:$domain}' AND
localpart='${quote_mysql:$local_part}' AND
acceptfor!='${quote_mysql:mymailservername}

(I can't remember the exact lookup var for the local mailserver name
offhand)

Or, if you don't want to set up a DB, you could instead move the home
dirs of those you are migrating to a subtly different location and use
the router condition to break apart the user home path and test this.

HTH,

-Oli



Stefan Lubitz wrote:
> Hello all,
>
> I try to find a way to forward E-Mails per User to another MTA (like a
> transport map in postfix).
> The reason for this is, that I need to migrate to another Server (exchange)
> and I can't move all Users at once.
> What I would like to implement is the following:
> 1. exim Server receives the mail for mydomain.com
> 2. if the recipient is whatever@??? the mail should be forwarded to
> exchange
> 3. if the recipient is somethingelse@??? it should be delivered
> local.
>
> Is this possible? If yes, what needs to be configured?
>
> Regards,
> Stefan
>
> --
> Stefan Lubitz
> Head of IT
> System Administrator
> ___________________________________________________________________________
> MACKEVISION
> Medien Design GmbH, Stuttgart
> Forststraße 7
> D - 70174 Stuttgart
>
>
>


--
Oli Comber
Systems Developer
3aIT Limited - Official Corporate Sponsor of the British Bobsleigh Team

4-10 Barttelot Rd Horsham West Sussex RH12 1DQ
M: +44 (0)77255 82405 T: +44 (0)870 881 5097 F: +44 (0)870 116 0793

3aIT Limited is a company registered in England and Wales.
CoReg: 3866698 VATReg: 771388600


Visit www.3aIT.co.uk for Design, Systems, Support

Disclaimer:
The information contained within this email is confidential and may be
legally privileged. It is intended solely for the addressee. If you are
not the intended recipient, any disclosure, copying or distribution of
this email is prohibited and may be unlawful. The content of this email
represents the views of the individual and not necessarily 3aIT Limited.
3aIT Limited reserves the right to monitor the content of all emails in
accordance with lawful business practice. Whilst every effort is made to
ensure that attachments are free from computer viruses before
transmission, 3aIT Limited does not accept any liability in respect of
any virus that is not detected.
3aIT Limited