Package: maildrop

----- 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, [EMAIL PROTECTED]
Subject: bad change to maildrop to "[EMAIL PROTECTED]" 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>
 
-static const char rcsid[]="$Id: deliver.C,v 1.13 2005/01/30 14:50:37 mrsam Exp 
$";
+static const char rcsid[]="$Id: deliver.C,v 1.14 2005/05/12 14:45:57 mrsam Exp 
$";
 
 ///////////////////////////////////////////////////////////////////////////
 //
@@ -64,7 +64,7 @@
 
                        cmdbuf=sendmail;
 
-                       cmdbuf += ' ';
+                       cmdbuf += " -f '' ";
                        cmdbuf += mailbox+1;
                }
                else

:( Can you please document these kinds of changes in the future?

I recommend that this is reverted, because it doesn't seem to make much
sense - the old behaviour, where the return-path is set to the user
generating this new mail, can't be flawed so much that we'd have to make
all such messages bounces.

The system processing the maildrop filter file containing such a setting
already has the ability to run maildrop and $SENDMAIL, so the assumption
that it can also receive bounces for mails it sends out isn't far-fetched.

Even if you were really keen on undoing that assumption, the proper way to
do so would be to make the behaviour configurable, rather than disabling
the old way completely.

-- 
     2. That which causes joy or happiness.

----- 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, [EMAIL PROTECTED]
Subject: Re: bad change to maildrop to "[EMAIL PROTECTED]" behaviour

On Mon, Feb 04, 2008 at 07:57:39PM -0500, Sam Varshavchik wrote:
> Josip Rodin writes:
> 
> >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 find nothing in maildropfilter(5) that indicates that FROM gets preserved 
> for forwarded mail.

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.

> There's really no answer here that will make everyone happy. Preserving the 
> original return address in other situations may result in a mail loop, or 
> other issues.
> 
> You can always specify everything yourself:
> 
> to '| $SENDMAIL -f "$FROM" [EMAIL PROTECTED]'

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...

-- 
     2. That which causes joy or happiness.

----- End forwarded message -----



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to