----- Forwarded message from Josip Rodin <joy> -----
Date: Tue, 5 Feb 2008 00:13:26 +0100
From: Josip Rodin <joy>
To: Sam Varshavchik
Cc: Andres Salomon, maildrop@packages.qa
Subject: bad change to maildrop to "!other@address" behaviour
Hi,
Recently I noticed that a newer version of maildrop started forwarding
all mails to me from one particular filter setup using 'to !myaddress'
as - bounces.
I checked the $SENDMAIL and $FROM variables, and they are both all right
(/usr/sbin/sendmail -oi and the username, respectively). Yet, the log says
that maildrop passed the message to /usr/sbin/sendmail -oi -f ''
[recipients].
I went to look at the code, and maildrop/deliver.C says it's hardcoded:
if (*mailbox == '!')
{
b="SENDMAIL";
const char *sendmail=GetVarStr(b);
cmdbuf=sendmail;
cmdbuf += " -f '' ";
cmdbuf += mailbox+1;
}
The maildropfilter(5) manual page showed no relevant change - it still
says that if everything is all right with $SENDMAIL and $FROM, the mail
should get forwarded normally.
I went looking for information in the changelog and CVS, and all I found was:
revision 1.14
date: 2005/05/12 14:45:57; author: mrsam; state: Exp; lines: +2 -2
Version 1.8.1
Index: deliver.C
===================================================================
RCS file: /cvsroot/courier/courier/maildrop/maildrop/deliver.C,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- deliver.C 30 Jan 2005 14:50:37 -0000 1.13
+++ deliver.C 12 May 2005 14:45:57 -0000 1.14
@@ -30,7 +30,7 @@
#endif
#include <errno.h>
----- End forwarded message -----
----- Forwarded message from Josip Rodin <joy> -----
Date: Tue, 5 Feb 2008 09:48:44 +0100
From: Josip Rodin
To: Sam Varshavchik
Cc: Andres Salomon, maildrop@packages.qa
These parts:
FROM Message envelope sender. [...]
If the -f option is not given, maildrop looks for
the From_ line in the message. As the last resort, FROM defaults
to the userid which invoked maildrop. Note that FROM may be
empty - the message envelope sender is empty for bounce mes-
sages.
SENDMAIL
The mail delivery agent. When maildrop is instructed to deliver
the message to a mailbox whose name begins with the ! character,
this is interpreted as a request to forward the message. The
SENDMAIL command is executed to forward the message.
It doesn't say anywhere that forwarding mails will change the message
envelope sender to an empty one.
Yes, but that forces the change from ! to |. With the old system, at least
the other group (those who *wanted* to generate bounces) wasn't as
disadvantaged - they could just explicitly set FROM to '' themselves
and have things work according to the manual.
Honouring the contents of the documented FROM variable sounds like the
way to go...
----- End forwarded message -----