From owner-freebsd-questions Mon Jan 5 08:30:50 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA15548 for questions-outgoing; Mon, 5 Jan 1998 08:30:50 -0800 (PST) (envelope-from owner-freebsd-questions) Received: (from jmb@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA15528; Mon, 5 Jan 1998 08:30:46 -0800 (PST) (envelope-from jmb) From: "Jonathan M. Bresler" Message-Id: <199801051630.IAA15528@hub.freebsd.org> Subject: Re: Rewriting the "Received:" header in email To: fbsdlist@federation.addy.com (Cliff Addy) Date: Mon, 5 Jan 1998 08:30:45 -0800 (PST) Cc: freebsd-questions@freebsd.org In-Reply-To: from "Cliff Addy" at Jan 5, 98 10:01:23 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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" 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