Autor: Phil Pennock Data: Para: Matthew Daubenspeck CC: exim-users Assunto: Re: [Exim] Rewriting addresses
On 2002-04-02 at 22:17 -0500, Matthew Daubenspeck wrote: > As far as I can read, all of the rewriting rules that I see (in the Exim
> O'Reilly manual as well as FAQS) are all for incoming messages. Is there
> anyway to rewrite OUTGOING messages?
I can see where the confusion is coming from. Since you're reading the
book, I'll pick the Exim 3 spec.txt:
-----------------------------< cut here >-------------------------------
3. HOW EXIM DELIVERS MAIL
3.2 Message reception
Address rewriting that is specified in the rewrite section of the configur-
ation (see chapter 34) is done once and for all on incoming addresses, both in
the header and the envelope, at the time the message is received. If during
the course of delivery additional addresses are generated (for example, via
aliasing), these new addresses get rewritten as soon as they are generated. At
the time a message is actually delivered (transported) further rewriting can
take place; because this is a transport option, it can be different for
different forms of delivery. It is also possible to specify the addition or
removal of certain headers at the time the message is delivered (see chapters
14 and 20).
-----------------------------< cut here >-------------------------------
Here, "incoming" is "as Exim receives it", whether that's via SMTP or
via "local", or whatever. _Not_ "as it comes into my system from
outside".
So just set up the rewriting rules and run some tests. You should find
them being applied to messages being sent out.
After all, if you're receiving mails from the Big Wide Internet, most
people don't have a need to rewrite arbitrary senders and stuff. Not
unless you're gatewaying into another environment.
Note too that the Exim Way is not to use rewriting for delivery logic.
If you're trying to do so, take a closer look at the "smartuser"
Director.
--
Decrypt (n & v.t.): The basement of a Jamaican church.