Re: Editing Mail Headers...
On Mon, Nov 29, 1999 at 04:41:16PM -0800, Mark Wagnon wrote
> Hi all:
>
> I have exim set up to call a filter that changes my address in the
> From: header from my local address to the one assigned to me by my
> ISP. Apparently this changes only the From: content, however, the
> >From (no colon) heading still shows my local email address.
>
> This has caused some confusion with some people at school. They see
> the From address, but not the From: address.
>
> Is there a way to change the From address also? Here is the script I
> use (stolen from LG#43):
>
> #!/usr/bin/perl
> $address = 'mwagnon1@home.com';
> while (<>) {
> if (/^From /) { s/<.*>/<$address>/; print; last; }
> # I added the above to see if it would change the address, but
> # it doesn't
> if (/^From: /) { s/<.*>/<$address>/; print; last; }
> print; }
> while (<>) { print; }
>
> Is changing the From possible/allowed?
>
Yes, but not that way. The From address is not part of the body
of the mail message like most headers; it is an *envelope address*,
and is intended mainly for use by MTAs. You can ask Exim to
re-write envelope and other headers for you, in /etc/exim.conf;
for instance, I use
*@huiac.localnet ${1}@huiac.apana.org.au Ffr
to replace my local, non-routable domain with an MX'd mail name
in envelope From headers and in "From:" and "Reply-to" headers.
Look in the exim-doc package's info pages for "Address Rewriting" for
details.
John P.
--
huiac@camtech.net.au
john@huiac.apana.org.au
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark
Reply to: