Re: [exim] Redirect the emails from domain2 to domain1

Góra strony
Delete this message
Reply to this message
Autor: Mike Brudenell
Data:  
Dla: Exim Users
Temat: Re: [exim] Redirect the emails from domain2 to domain1
Greetings -

I guess you can do it in either…

- In Exim it's easy: you would rewrite the address(es) from the old
domain to the new one. Read the chapter on rewriting in the *Exim
Specification*.
- In Dovecot I guess you'd just modify the *password_query* construct to
see if the *domain* was either the old or new domain.

Something to think about is the effect of secretly rewriting the old domain
to new domain in addresses. If you do then, depending which address(es) you
rewrite, recipients might not be able to tell whether someone sent to the
old domain name or the new one, so can't tell the sender to start using
their new address instead.

It depends on whether you plan to run both domains indefinitely, or want to
phase the old one out eventually.

Cheers,
Mike B-)

On 7 November 2016 at 00:35, Quaquaraquà <nuquaquaraqua@???> wrote:

> Dear Dovecot and Exim users,
>
> I have a VPS using these two applications. I am transitioning from a
> domain_old to a domain_new. I'd like to redirect all the emails from
> domain_old to the local mailboxes of users @ domain_new. In exim I've
> assumed that it is enough to add domain_old to the list of local domains:
>
> domainlist local_domains = @ : domain_new : domain_old
> ...
> begin routers
> ...
> local_users:
> debug_print = "R: local_user for $local_part@$domain"
> driver = accept
> domains = +local_domains
> transport = dovecot_lmtp
> cannot_route_message = Unknown user
>
> However in Dovecot I'm checking both the username and the domain to
> perform the authentication:
> auth_username_format = %Lu
> passdb { driver = sql ; }
> password_query = SELECT username, domain, password FROM users WHERE
> username = '%n' AND domain = '%d'
>
> To have this system to work, I wish some special rule that rewrites the
> domain from domain_old to domain_new. But I'm not sure whether this needs
> to be done in exim or dovecot and how to add it?
>
> - Quaquaraqua'
>
>
> --
> ## 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/





--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm