Date: Mon, 5 Jan 1998 08:30:45 -0800 (PST) From: "Jonathan M. Bresler" <jmb> To: fbsdlist@federation.addy.com (Cliff Addy) Cc: freebsd-questions@freebsd.org Subject: Re: Rewriting the "Received:" header in email Message-ID: <199801051630.IAA15528@hub.freebsd.org> In-Reply-To: <Pine.BSF.3.95q.980105095500.23305A-100000@federation.addy.com> from "Cliff Addy" at Jan 5, 98 10:01:23 am
next in thread | previous in thread | raw e-mail | index | archive | help
Cliff Addy wrote:
>
> Is there a way to rewrite the Received line in email sent out by sendmail?
> For example, email received by others looks like:
>
> Received: from a1schip.kph.uni-mainz.de (a1schip.kph.uni-mainz.de
> [134.93.133.63]) by federation.addy.com (8.8.5/8.6.12) with SMTP id
> FAA07077
>
> I'd like to rewrite the "federation.addy.com" to the virtual host sending
> the email, e.g. if account "abc" is sending the email, I want the line to
> say the email came from their domain "alphabet.com"
<off the top of my head, you might be able to......>
in either your .mc file or your /etc/sendmail.cf you can
control the information that your mailhost puts in the the
Received: line that it adds to the email message.
so, if you have each virtual host use its own /etc/sendmail.cf
file you can replace the "$j" in the "by $j ($v/$Z)" below
by the hostname you want to appear.
for instance "by alphabet.com ($v/$Z)".
(i dont believe that you can redefine $j on the fly,
someone please check sendmail 2nd ed......)
to get each virtual host to have its own /etc/sendmail.cf,
you will have to run sendmail out fo /etc/inetd.conf
(ouch....performance hit) or have a mail proxy accept the
mail and relay it to the virtual host's sendmail which is
running on a different port.
or use ipfw's divert rule to reroute the packets to sendmail
running on a different port. (thank you archie cobbs ;)
examples from hub.freebsd.org.
hub.mc
define(`confRECEIVED_HEADER', `$?sfrom $s $.$?_($?s$|from $.$_)
$.by $j ($v/$Z)$?r with $r$. id $i$?u
for $u; $|;
$.$b$?g
(envelope-from $g)$.')dnl$|;$.
/etc/sendmail.cf:
HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
$.by $j ($v/$Z)$?r with $r$. id $i$?u
for $u; $|;
$.$b$?g
(envelope-from $g)$.
jmb
--
Jonathan M. Bresler FreeBSD Core Team, Postmaster jmb@FreeBSD.ORG
FreeBSD--The Power to Serve JMB193 http://www.freebsd.org/
PGP 2.6.2 Fingerprint: 31 57 41 56 06 C1 40 13 C5 1C E3 E5 DC 62 0E FB
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801051630.IAA15528>
