What's that Sender: header, and how do I make it go away?

The FAQ states, at http://fsck.com/rtfm/article.html?id=5#106

What's that Sender: header, and how do I make it go away?

[snip]

postfix and sender

Postfix shouldn't have this problem, as it adds a UID to the
Received header instead of setting Sender.

But this doesn’t seem to be I’m running postfix-1.1.3, and I see:

[snip]
Managed-BY: Request Tracker 2.0.11 (http://www.fsck.com/projects/rt/)
Precedence: bulk
MIME-Version: 1.0
Content-Transfer-Encoding: binary
Sender: Apache apache@polaris.dazza.org <----------WHA???
[snip]

Definitely an annoying Sender: header creeping its way in there.

Thoughts?

-Darren

[snip]
Managed-BY: Request Tracker 2.0.11 (http://www.fsck.com/projects/rt/)
Precedence: bulk
MIME-Version: 1.0
Content-Transfer-Encoding: binary
To: darren@dazza.org
Sender: Apache apache@polaris.dazza.org <----------WHA???
Date: Tue, 19 Feb 2002 21:09:35 -0800 (PST)
[snip]

Can you show us the full headers? I can’t get my postfix to insert a
Sender header.

(Of course, regarding making it “go away”: It’s accurate and
useful, and headers aren’t cosmetic. :slight_smile:

-Rich

Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------

“DN” == Darren Nickerson darren@dazza.org writes:

DN> Definitely an annoying Sender: header creeping its way in there.

The Mail::Internet module insists on inserting this header. Author is
not interested in changing it since others rely on it being there.
Perhaps if enough people tell him why it is bad, he’ll remove it.

You can always configure your postfix to strip out any Sender: header
using the header filter feature, but that’s really a big ugly hack.

“DN” == Darren Nickerson darren@dazza.org writes:

DN> Definitely an annoying Sender: header creeping its way in there.

The Mail::Internet module insists on inserting this header. Author is
not interested in changing it since others rely on it being there.
Perhaps if enough people tell him why it is bad, he’ll remove it.

Or use sendmailpipe as a delivery mechanism (see config.pm)

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

Bruce> On Wed, 20 Feb 2002, Vivek Khera wrote:

+> > >>>> “DN” == Darren Nickerson darren@dazza.org writes:

DN> Definitely an annoying Sender: header creeping its way in there.

+> The Mail::Internet module insists on inserting this header. Author is
+> not interested in changing it since others rely on it being there.
+> Perhaps if enough people tell him why it is bad, he’ll remove it.

Bruce> Or use sendmailpipe as a delivery mechanism (see config.pm)

Thanks for the feedback everyone. I needed to dig into this a bit deeper to
determine what was going on, as it turned out. To make a long story short, my
testbed was tainted by fetchmail, which was messing with headers. In the end,
using ‘sendmailpipe’ and Bruce suggested did the trick.

So the FAQ:

http://fsck.com/rtfm/article.html?id=5#109

Should probably be revised to:

------------------cut here------------
postfix and sender

As long as you’ve set the following in config.pm:

$MailCommand = 'sendmailpipe';
$SendmailArguments="-oi -t";

Postfix shouldn’t have this problem, as it adds a UID to the Received header instead of setting Sender. For example:

Received: by some.company.com (Postfix, from userid 99)

------------------cut here------------

In case anyone’s interested in the gory details, read below. Otherwise, we’re
finished here :wink:

-Darren

================ < GORY DETAILS > ====================

The first problem is that my testbed was tainted. Either fetchmail or my local
(older) copy of Postfix was eating the headers, and messing with the Sender:
line. Here’s how the messages looked in their pure form, on the imap spool:

| With:
|
| $MailCommand = ‘sendmail’;
| $SendmailArguments=“-oi”;

autoreply

Return-Path: nobody@polaris.dazza.org
X-Sieve: cmu-sieve 2.0
Received: from polaris.dazza.org (polaris.dazza.org [216.152.199.7])
by mail.company.com (Postfix) with ESMTP id 1708CB452A
for someone@company.com; Wed, 20 Feb 2002 12:46:49 -0500 (EST)
Received: by polaris.dazza.org (Postfix, from userid 99)
id 1C9EC254118; Wed, 20 Feb 2002 09:46:43 -0800 (PST)
Message-Id: <rt-10322-16743.13.9956445151888@TPC.INT Support>From: TPC.INT Support support@info.tpc.int
RT-Ticket: TPC.INT Support #10322
X-Mailer: Perl5 Mail::Internet v1.43
Reply-To: support@info.tpc.int
RT-Originator: someone@company.com
X-RT-Loop-Prevention: TPC.INT Support
Content-Disposition: inline
Content-Type: text/plain
Subject: [TPC.INT Support #10322] AutoReply: [no subject]
In-Reply-To: <rt-10322@TPC.INT Support>
Managed-BY: Request Tracker 2.0.11 (http://www.fsck.com/projects/rt/)
Precedence: bulk
MIME-Version: 1.0
Content-Transfer-Encoding: binary
To: someone@company.com
Sender: Nobody support_tpc@polaris.dazza.org
Date: Wed, 20 Feb 2002 09:46:43 -0800 (PST)

web transaction

Return-Path: apache@polaris.dazza.org
X-Sieve: cmu-sieve 2.0
Received: from polaris.dazza.org (polaris.dazza.org [216.152.199.7])
by mail.company.com (Postfix) with ESMTP id A9BA0B452A
for someone@company.com; Wed, 20 Feb 2002 12:53:37 -0500 (EST)
Received: by polaris.dazza.org (Postfix, from userid 48)
id B5A8B25411A; Wed, 20 Feb 2002 09:53:36 -0800 (PST)
Message-Id: <rt-10322-16745.2.86847596503279@TPC.INT Support>
From: Darren Nickerson via RT support@info.tpc.int
RT-Ticket: TPC.INT Support #10322
X-Mailer: Perl5 Mail::Internet v1.43
Reply-To: support@info.tpc.int
RT-Originator: tpcadmin@info.tpc.int
X-RT-Loop-Prevention: TPC.INT Support
Content-Disposition: inline
Content-Type: text/plain
Subject: [TPC.INT Support #10322] [no subject]
In-Reply-To: <rt-10322@TPC.INT Support>
Managed-BY: Request Tracker 2.0.11 (http://www.fsck.com/projects/rt/)
Precedence: bulk
MIME-Version: 1.0
Content-Transfer-Encoding: binary
To: someone@company.com
Sender: Apache apache@polaris.dazza.org
Date: Wed, 20 Feb 2002 09:53:36 -0800 (PST)

| With:
|
| $MailCommand = ‘sendmailpipe’;
| $SendmailArguments=“-oi -t”;

autoreply

Return-Path: nobody@polaris.dazza.org
X-Sieve: cmu-sieve 2.0
Received: from polaris.dazza.org (polaris.dazza.org [216.152.199.7])
by mail.company.com (Postfix) with ESMTP id C3E60B452A
for someone@company.com; Wed, 20 Feb 2002 12:55:56 -0500 (EST)
Received: by polaris.dazza.org (Postfix, from userid 99)
id 0AED4254120; Wed, 20 Feb 2002 09:55:55 -0800 (PST)
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Subject: [TPC.INT Support #10324] AutoReply: test
From: TPC.INT Support support@info.tpc.int
Reply-To: support@info.tpc.int
In-Reply-To: <rt-10324@TPC.INT Support>
Message-Id: <rt-10324-16748.10.2722692953371@TPC.INT Support>
Precedence: bulk
X-RT-Loop-Prevention: TPC.INT Support
RT-Ticket: TPC.INT Support #10324
Managed-BY: Request Tracker 2.0.11 (http://www.fsck.com/projects/rt/)
RT-Originator: someone@company.com
To: someone@company.com
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
Date: Wed, 20 Feb 2002 09:55:55 -0800 (PST)

web transaction

Return-Path: apache@polaris.dazza.org
X-Sieve: cmu-sieve 2.0
Received: from polaris.dazza.org (polaris.dazza.org [216.152.199.7])
by mail.company.com (Postfix) with ESMTP id 561EFB452A
for someone@company.com; Wed, 20 Feb 2002 12:56:56 -0500 (EST)
Received: by polaris.dazza.org (Postfix, from userid 48)
id 4498A25411A; Wed, 20 Feb 2002 09:56:55 -0800 (PST)
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Subject: [TPC.INT Support #10324] test
From: Darren Nickerson via RT support@info.tpc.int
Reply-To: support@info.tpc.int
In-Reply-To: <rt-10324@TPC.INT Support>
Message-Id: <rt-10324-16749.9.70088563374659@TPC.INT Support>
Precedence: bulk
X-RT-Loop-Prevention: TPC.INT Support
RT-Ticket: TPC.INT Support #10324
Managed-BY: Request Tracker 2.0.11 (http://www.fsck.com/projects/rt/)
RT-Originator: tpcadmin@info.tpc.int
To: someone@company.com
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
Date: Wed, 20 Feb 2002 09:56:55 -0800 (PST)

However, when they were fetched with fetchmail (delivering locally to an older
version of postfix), the Sender: headers became, for the 4 messages listed
above:

Sender: Nobody support_tpc@polaris.dazza.org
Sender: Apache apache@polaris.dazza.org
Sender: nobody@polaris.dazza.org
Sender: apache@polaris.dazza.org

You can see, that in the case of the ‘sendmailpipe’ tests (the last two), my
local mail fetching setup was adding a Sender:.

yeesh