[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Rewriting message headers for a smarthost relay using exim



Hi,

	I connect to the internet via a dialup connection, so while
installing exim, I selected the "smarthost" relay option (which is the
recommended option, I believe) during the configuration. 

	I want my MUA to spool up mail into the mail queue, and when
connected, the SMTP server that I run should deliver the mail to my ISP's
mail server for delivery across the internet. My local domain name (on my
private network) is megadodo.umb . My ISP connects me to an ibm.net
domain, and their SMTP server refuses to accept mail with an envelope FROM
field having a non ibm.net address (DNS lookup fails for them - only
natural). Hence, my desire to rewrite this header field to my ISP mail
account address - lets call it a@ibm.net .

	For this purpose, I added the following lines in exim.conf :

 *@marvin.megadodo.umb    ${lookup{$1}lsearch{/etc/email-addresses}\
                          {$value}fail}@ibm.net F

	And this works correctly and rewrites the correct header field.
All is well, except for the fact that the envelope now gets rewritten for
local deliveries too. Thus, if local user x@marvin.megadodo.umb is mapped
to a@ibm.net, when I send mail from x@marvin to y@marvin, the mail showing
up in y@marvin 's mailbox says that it was sent by a@ibm.net . This is
most certainly NOT what I want. Is there a way to force header rewriting
only for non-local deliveries?

Thanks in advance,
Jor-el 


Reply to: