Re: [exim] multiple dummy domains

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Mike Brudenell
Datum:  
To: Exim-Users Mailing List
Betreff: Re: [exim] multiple dummy domains
Hi, Gary -

There are several ways of doing it, with the most general perhaps being to
do lookups in text files — perhaps one per domain — to see if the address
is one to rewrite and, if so, what it should be rewritten to.

However the really simple way is to take a look at the *Address
Rewriting* chapter
in the Exim specification:

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-address_rewriting.html


This feature lets you rewrite any or all of the normal message headers
and/or the envelope. So you could rewrite the Envelope To ("env-to") in
order to change the recipient the message is delivered to. (Alone, this
would leave the visible To header showing the original address, but you
could rewrite this as well if you wished.)

Of course you shouldn't blindly rewrite *every* domain's addresses! You'll
first want to check if the domain is one of yours and that you need to
rewrite it. You could do this using an lsearch of a text file to see if the
domain is listed in it. Or maybe consider using a database instead if you
have loads of domains.

See the section *Rewriting patterns* in that chapter for a database lookup
using "partial-dbm" in the match-pattern to give you some ideas.

Cheers,
Mike Brudenell

On 28 June 2016 at 17:12, Gary Stainburn <gary.stainburn@???>
wrote:

> We have a number of domains that are registered for multiple web sites.
> The
> web sites are managed by a third party but I need to host the emails.
>
> However, but don't want to have to go to the trouble of configuring EXIM to
> work for all of these domains, and then setting up multiple forwarding
> aliases.
>
> Is there an easy way to change these domains to work on one of my existing
> domains? Each one of these domains will have the same four localparts
>
> sales@
> orders@
> quotes@
> deliveries@
>
> I have already set up these addresses for @existing_domain.com
>
> Is there a quick way to make all
>
> <whatever>@websitedomain.com go to <whatever>@existingdomain.com
>
> I've got 4x localpart for upwards of 4 domains.
>
> --
> ## 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