procmail
[Top] [All Lists]

Re: Catching empty sender address

2002-02-13 06:36:18
In the previous episode (12.02.2002, 22:43:45), Philip Guenther
<guenther(_at_)gac(_dot_)edu> said:

the following mail slips thru my procmail recipes,
gets into my mailbox
and is not even mentioned in the log

If it's not mentioned in the log, then it's not being processed by
procmail.

yes, it is processed by procmail as we can see further below - and thats
what i find so strange. and no, it does not show in the log :(

Is it configured to deliver your mail using procmail?
again, yes.

okay, to test this again,
i sent the same mail 3 times to my address:

# sendmail -f generalp(_dot_)fault(_at_)gmx(_dot_)net censored < kisumatest
# sendmail -f '' censored < kisumatest
# sendmail -f generalp(_dot_)fault(_at_)gmx(_dot_)net censored < kisumatest

the postfix maillog shows that all 3 of them are processed by procmail:
Feb 13 12:22:21 mail postfix/pickup[21176]: 9F20755A4D: uid=0
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>
Feb 13 12:22:21 mail postfix/cleanup[21233]: 9F20755A4D:
message-id=<20020213112221(_dot_)9F20755A4D(_at_)mail(_dot_)blinde-kuh(_dot_)de>
Feb 13 12:22:21 mail postfix/qmgr[21177]: 9F20755A4D:
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>, size=315, nrcpt=1 (queue active)
Feb 13 12:22:21 mail postfix/local[21235]: 9F20755A4D:
to=<censored(_at_)blinde-kuh(_dot_)de>, relay=local, delay=0, status=sent 
("|IFS=' '
&& exec /usr/bin/procmail -a $SENDER -a $RECIPIENT || exit 75 #censored")
Feb 13 12:22:21 mail postfix/pickup[21176]: B5F9655A4D: uid=519
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>
Feb 13 12:22:21 mail postfix/cleanup[21233]: B5F9655A4D:
message-id=<20020213112221(_dot_)9F20755A4D(_at_)mail(_dot_)blinde-kuh(_dot_)de>
Feb 13 12:22:21 mail postfix/qmgr[21177]: B5F9655A4D:
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>, size=469, nrcpt=1 (queue active)
Feb 13 12:22:22 mail postfix/smtp[21238]: B5F9655A4D:
to=<generalp(_dot_)fault(_at_)gmx(_dot_)net>, relay=mx0.gmx.de[213.165.64.100], 
delay=1,
status=sent (250 {mx016-rz3} ok 1013599342 qp 21580)
Feb 13 12:22:38 mail postfix/pickup[21176]: 00AB455A4D: uid=0 from=<>
Feb 13 12:22:38 mail postfix/cleanup[21233]: 00AB455A4D:
message-id=<20020213112238(_dot_)00AB455A4D(_at_)mail(_dot_)blinde-kuh(_dot_)de>
Feb 13 12:22:38 mail postfix/qmgr[21177]: 00AB455A4D: from=<>, size=315,
nrcpt=1 (queue active)
Feb 13 12:22:38 mail postfix/local[21235]: 00AB455A4D:
to=<censored(_at_)blinde-kuh(_dot_)de>, relay=local, delay=0, status=sent 
("|IFS=' '
&& exec /usr/bin/procmail -a $SENDER -a $RECIPIENT || exit 75 #censored")
Feb 13 12:22:42 mail postfix/pickup[21176]: 22A4355A4D: uid=0
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>
Feb 13 12:22:42 mail postfix/cleanup[21233]: 22A4355A4D:
message-id=<20020213112242(_dot_)22A4355A4D(_at_)mail(_dot_)blinde-kuh(_dot_)de>
Feb 13 12:22:42 mail postfix/qmgr[21177]: 22A4355A4D:
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>, size=315, nrcpt=1 (queue active)
Feb 13 12:22:42 mail postfix/local[21235]: 22A4355A4D:
to=<censored(_at_)blinde-kuh(_dot_)de>, relay=local, delay=0, status=sent 
("|IFS=' '
&& exec /usr/bin/procmail -a $SENDER -a $RECIPIENT || exit 75 #censored")
Feb 13 12:22:42 mail postfix/pickup[21176]: 445EE55A4D: uid=519
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>
Feb 13 12:22:42 mail postfix/cleanup[21233]: 445EE55A4D:
message-id=<20020213112242(_dot_)22A4355A4D(_at_)mail(_dot_)blinde-kuh(_dot_)de>
Feb 13 12:22:42 mail postfix/qmgr[21177]: 445EE55A4D:
from=<generalp(_dot_)fault(_at_)gmx(_dot_)net>, size=469, nrcpt=1 (queue active)
Feb 13 12:22:42 mail postfix/smtp[21238]: 445EE55A4D:
to=<generalp(_dot_)fault(_at_)gmx(_dot_)net>, relay=mx0.gmx.de[213.165.64.100], 
delay=0,
status=sent (250 {mx014-rz3} ok 1013599362 qp 10639)

the procmail.log only shows the two of them that did not have the empty
sender:

procmail: Assigning "COMSAT=no"
procmail: No match on "^Return-Path: <>"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi -f
<generalp(_dot_)fault(_at_)gmx(_dot_)net> generalp(_dot_)fault(_at_)gm
x.net"
From generalp(_dot_)fault(_at_)gmx(_dot_)net  Wed Feb 13 12:22:21 2002
procmail: Executing
"/usr/sbin/sendmail,-oi,-f,<generalp(_dot_)fault(_at_)gmx(_dot_)net>,generalp(_dot_)fault(_at_)gmx(_dot_)net"
 Subject: kisuma test5
  Folder: /usr/sbin/sendmail -oi -f <generalp(_dot_)fault(_at_)gmx(_dot_)net> 
generalp.f
376
procmail: Assigning "COMSAT=no"
procmail: No match on "^Return-Path: <>"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi -f
<generalp(_dot_)fault(_at_)gmx(_dot_)net> generalp(_dot_)fault(_at_)gm
x.net"
From generalp(_dot_)fault(_at_)gmx(_dot_)net  Wed Feb 13 12:22:42 2002
procmail: Executing
"/usr/sbin/sendmail,-oi,-f,<generalp(_dot_)fault(_at_)gmx(_dot_)net>,generalp(_dot_)fault(_at_)gmx(_dot_)net"
 Subject: kisuma test5
  Folder: /usr/sbin/sendmail -oi -f <generalp(_dot_)fault(_at_)gmx(_dot_)net> 
generalp.f
376

the one with the empty sender got delivered into my mailbox:

From MAILER-DAEMON  Wed Feb 13 12:22:38 2002
Return-Path: <>
Delivered-To: censored(_at_)blinde-kuh(_dot_)de
Received: by mail.blinde-kuh.de (Kinder-Post, from userid 0)
        id 00AB455A4D; Wed, 13 Feb 2002 12:22:38 +0100 (CET)
From: censoredgang(_at_)blinde-kuh(_dot_)de
Subject: kisuma test5
Message-Id: 
<20020213112238(_dot_)00AB455A4D(_at_)mail(_dot_)blinde-kuh(_dot_)de>
Date: Wed, 13 Feb 2002 12:22:38 +0100 (CET)
To: undisclosed-recipients:;

jaja

and here is the ~/.procmailrc (there is no /etc/procmailrc on the system):

              LOCKSLEEP = 120
              SHELL = /bin/bash
              VERBOSE = yes
              SENDER = "<$1>"                 # fix for empty sender
addresses
              RECIPIENT = "$2"
              SHIFT = 1
              LOGFILE = procmail.log
              COMSAT=no

:0
* ^Return-Path: <>
! -f "$SENDER" generalp(_dot_)fault(_at_)gmx(_dot_)net


              :0                            # pass along mail
              ! -f "$SENDER" generalp(_dot_)fault(_at_)gmx(_dot_)net



...
:0
* ^Return-Path: <>
! -f $SENDER generalp(_dot_)fault(_at_)gmx(_dot_)net

Once you figure out why the messages aren't being processed by procmail
and fix it, this recipe should match the messages.

any hints would be appreciated.

regards,

wolfgang

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>