Your message dated Sat, 9 Sep 2006 00:43:56 +0200 with message-id <[EMAIL PROTECTED]> has caused the Debian Bug report #315686, regarding maildrop: doesn't honor empty MAIL FROM to be marked as having been forwarded to the upstream software author(s) Sam Varshavchik <[EMAIL PROTECTED]>.
(NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database)
--- Begin Message ---Hi, I'm forwarding another bug report, see below. I actually noticed this myself a long time ago, but I thought that it was something of a normal behaviour and never bothered to ask about it. The bug report initially sounded to me like a violation of RFC 2821 (the part which says that whenever a message leaves the SMTP session, it needs to get its return-path replaced), but thinking about it now, it's not necessarily so. If the user explicitly wants to generate a bounce and runs maildrop with -f "", they should be allowed to do so. Otherwise, the patch leaves alone the current process of filling in the FROM variable. I'm only not sure what happens to messages that actually do arrive at <MAILER-DAEMON> somehow - they would get their FROM emptied upon leaving maildrop. Maybe a more special string should be used instead, in case someone actually has such a semi-broken MTA set up. The patch should still apply, if with an offset, to version 2.0.2. TIA. ----- Forwarded message from Ond?ej Sur?? <[EMAIL PROTECTED]> ----- Date: Fri, 24 Jun 2005 21:48:13 +0000 Subject: Bug#315686: maildrop: doesn't honor empty MAIL FROM Package: maildrop Version: 1.5.3-1.1 Severity: normal Manpage of maildrop rc says: FROM Message envelope sender. This is usually the same address as what appears in the From: header, but may not be. This information may or may not be available to maildrop on your system. The message envelope sender is usually specified with the -f option to maildrop. 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 messages. but the last line is not true, because maildrop just overrides empty mailfrom with current logged user. This is especially annoying when you use maildrop to forwards mails. You can easily create mailloop when forwarding bounce to some other mailbox with error: Example: Setup mailbox [EMAIL PROTECTED] to forward mails to [EMAIL PROTECTED] [EMAIL PROTECTED] doesn't accept mails 1. send mail from=<[EMAIL PROTECTED]> to=<[EMAIL PROTECTED]> 2. mail is forwarded from=<[EMAIL PROTECTED]> to=<[EMAIL PROTECTED]> 3. mail is bounce from=<> [EMAIL PROTECTED] 4. mail is forwarded from=<[EMAIL PROTECTED]> to=<[EMAIL PROTECTED]> Usually users don't include '@', but you can achieve same setup by using outgoing rewritting, etc. Or you can easily test it by issuing: # cat > maildroprc << EOF echo $FROM EOF < somemail maildrop -f "" someaddress it will print you current user and not "" (empty string). Attached is patch which adds detection of empty argument and uses magic string "MAILER-DAEMON" to correctly fill in $FROM variable with empty string. Ondrej -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-2-686 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C) Versions of packages maildrop depends on: ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libgcc1 1:4.0.0-9 GCC support library ii libgdbm3 1.8.3-2 GNU dbm database routines (runtime ii libstdc++5 1:3.3.6-6 The GNU Standard C++ Library v3 ii ssmtp [mail-transport-agent 2.61-3 extremely simple MTA to get mail o maildrop recommends no packages. -- no debconf information ----- End forwarded message ----- -- 2. That which causes joy or happiness.diff --exclude '*~' -urN maildrop-1.5.3~/maildrop/main.C maildrop-1.5.3/maildrop/main.C --- maildrop-1.5.3~/maildrop/main.C 2005-06-24 23:30:23.121638608 +0200 +++ maildrop-1.5.3/maildrop/main.C 2005-06-24 23:29:50.795552920 +0200 @@ -500,6 +500,8 @@ if (!*optarg && argn < argc) optarg=argv[argn++]; if (*optarg) from=optarg; + else + from="MAILER-DAEMON"; break; case 'w': if (!*optarg && argn < argc) optarg=argv[argn++]; @@ -867,7 +869,11 @@ name="FROM"; value=maildrop.msginfo.fromname; - SetVar(name, value); + if (!strcmp(value,"MAILER-DAEMON")) { + SetVar(name, ""); + } else { + SetVar(name, value); + } if (VerboseLevel() > 1) {
--- End Message ---

