Re: [EXIM] Use of header rewriting

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Michael Beattie
CC: exim-users
Subject: Re: [EXIM] Use of header rewriting
On Fri, 17 Jul 1998, Michael Beattie wrote:

> that works fine, but mail from "omnic@???" to
> "[user]@omnic.rumpus.net" gets the from header of:
>
> --From: Michael Beattie <mickyb@???>
>
> I would like this to be:
>
> --From: Michael Beattie <omnic@???>


I did say it was a trick question! The point is, what do you want to
do with a message that is addressed to "[user]@omnic.rumpus.net" AND
to "ph10@???" (for example)? Exim keeps only one copy of the
message; any rewriting applies to what is sent to all recipients.

The very first sentence of the Exim manual reads

Exim is a mail transfer agent (MTA) for Unix systems connected to the
Internet.

That's the world I live in, and I'm afraid I designed it that way,
expecting addresses to be universally valid. I am of course happy that
people are making use of Exim in other environments, but it can't always
easily be massaged into doing what is needed for them.

> To satisfy replying etc...
> In this way, any "local" mail (omnic.rumpus.net --> omnic.rumpus.net) I
> would like to keep its "@omnic.rumpus.net" and any remote mail
> (omnic.rumpus.net --> [REST OF WORLD]) I would like to be rewritten as per
> orders in my /etc/email-addresses file.


In order to do this you need to separate the message into separate
copies - internal and external. One way this can be done is to have a
separate host act as a gateway to the intranet so all mail to the
outside goes through it and can be rewritten, while internal mail
doesn't go near it.

If you are doing all this on a single host, you could make use of two
different copies of Exim. /usr/lib/sendmail with its default
configuration could be your "internal" exim, which sends all external
mail to its "smarthost", which could be a pipe to a
differently-configured Exim that does rewriting and delivers externally.
(Or you could write down a private SMTP port to such an Exim.)

This is becoming an FAQ. I am working on FAQ information at the moment.
Maybe I would save myself some effort if I explored the suggestion I
have just made in detail and came up with a sample configuration. I'll
think about it.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***