[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rewriting headers
> The normal behaviour of the Zmailer is to rewrite things in the header
> section of the messages when it recognices the domain in the "From"
> header as a localname. I want that the behaviour of the Zmailer with
> these kind of messages was the same as domains listed as "allow relay"
> in the policy rules.
> That is, no rewrite at all, and log them in the maillog with the original
> domain, not with the domain of the Zmailer relay machine. But we want to
> continue accepting mail for these domains...
> I don't know if this is possible hacking the configuration files.
That is where the hacking needs to happen, but now I can't
find the place where the envelope from is rewritten, while
header From: is not touched.
I will try to have a deeper look at it.
while testing it at my workstation and claiming "false"
source identity I see following result from router:
$ /usr/lib/sendmail -v -firstname.lastname@example.org email@example.com
$ router processed message 92176-21431
s local firstname.lastname@example.org email@example.com 2
r local firstname.lastname@example.org mea 99
headers rewritten using 'internet' function:
Received: by mea.tmt.tele.fi id <92176-21431>; Mon, 16 Feb 1998 10:43:27 +0200
Date: Mon, 16 Feb 1998 10:43:27 +0200
router done processing 92176-21431
Ok, so why the sender address is as it is ?
Turns out, the problem is in crossbar.cf file,
in location where it starts address rewriting
by extracting $from address.. Altering that by
following way will help on this problem:
- tmp="$(smtproute "$(user $from)")"
+ case "$(channel $from)" in
+ # This looks weird, doesn't it ?
+ # the 'host' component contains FQDN form of
+ # address on 'local' channels, others have it
+ # also in the 'user' part.
+ tmp="$(smtproute "$(host $from)")"
+ tmp="$(smtproute "$(user $from)")"
The source address was 4-tuple:
local email@example.com mea ...
in which the components are referred as:
channel host user attributes
/Matti Aarnio <firstname.lastname@example.org>