Am 2007-10-15 02:06:45, schrieb David Gessel:
I was trying to amend Nic's Spam-X script to add some preprocessing
and spam checking. It was working fine - that is delivering mail
to appropriate folders and doing spam checks - but then an odd thing
started happening (really, for no apparent reason). If any of the
pre-filtering was triggered (by the grep tests, see the script below)
it caused the mail to be delivered (to the correct folder) without
any body (that is just the message head, the body blank). The
save_all file showed the full message (no mail was lost) but the
delivered message had nobody.
# You can mail yourself to deny an address
:0 fw
^
This filter is too much
* ^Subject: Deny \/.*
* ? echo $MATCH >> $DENY_DB
/dev/null
# Get sender
:0 hw
FROM=|$FORMAIL -rzxTo:|$TR / _
# If message is an NDN then archive it
:0 h
:0bh
* MAILER-DAEMON
NDNs
# whitelist check
:0 h
:0bh
* ? $GREP -i ^$FROM $DB
$DEFAULT
# If message is to a list we're on then deliver it
:0
* LISTS ?? (.)
* $ ^TO_$LISTS
$DEFAULT
# Checks bulkmail sources
:0 h
:0bh
* BULK ?? (.)
* ? $GREP -i ^$FROM $BULK
.Bulkmail/
# checks BSD sources
:0 h
:0bh
* BSD ?? (.)
* ? $GREP -i ^$FROM $BSD
.BSD/
# checks Commerce sources
:0 h
:0bh
* COM ?? (.)
* ? $GREP -i ^$FROM $COM
.Commerce/
# checks SRL sources
:0 h
:0bh
* SRL ?? (.)
* ? $GREP -i ^$FROM $SRL
.SRL/
# checks Travel (reservations) sources
:0 h
:0bh
* TRAV ?? (.)
* ? $GREP -i ^$FROM $TRAV
.Travel/
# If message is from a known non-spam UCE sender then dump it
:0 h
:0bh
* ? $GREP -i ^$FROM $DENY_DB
/dev/null
THIS MESSAGE WAS PROCESSED WITH THE BODY INTACT
(I removed the 'from' address from the "accept-list")
procmail: Unlocking "/home/gessel/.lockmail"
procmail: Assigning "LOCKFILE=/home/gessel/.lockmail"
procmail: Locking "/home/gessel/.lockmail"
procmail: Assigning "BULK=/home/gessel/.procmail/bulk-list"
procmail: Assigning "BSD=/home/gessel/.procmail/bsd-list"
procmail: Assigning "COM=/home/gessel/.procmail/commerce-list"
procmail: Assigning "IMP=/home/gessel/.procmail/impersonal-list"
procmail: Assigning "SRL=/home/gessel/.procmail/srl-list"
procmail: Assigning "TRAV=/home/gessel/.procmail/travel-list"
procmail: Assigning "SHELL=/bin/sh"
procmail: Assigning "PATH"
procmail: Assigning "COMSAT"
procmail: Assigning "VERBOSE=on"
procmail: Assigning "LOGFILE=/home/gessel/ProcmailLog"
procmail: Opening "/home/gessel/ProcmailLog"
procmail: Assigning "LASTFOLDER=/home/gessel/.save_all"
procmail: Opening "/home/gessel/.save_all"
procmail: Acquiring kernel-lock
procmail: No match on "^Subject: List senders"
procmail: No match on "^Subject: Accept \/.*"
procmail: No match on "^Subject: Deny \/.*"
procmail: Extraneous filter-flag ignored
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There is a "f" to much
procmail: Assigning "FROM="
procmail: Executing "$FORMAIL -rzxTo:|$TR / _"
procmail: No match on "MAILER-DAEMON"
procmail: Match on "(.)"
procmail: No match on "(mit.edu|americancapital.com)$"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/accept-list"
procmail: Non-zero exitcode (1) from "/usr/bin/grep"
procmail: No match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/accept-list"
procmail: No match on "(.)"
procmail: Match on "(.)"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/bulk-list"
procmail: Non-zero exitcode (1) from "/usr/bin/grep"
procmail: No match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/bulk-list"
procmail: Match on "(.)"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/bsd-list"
procmail: Non-zero exitcode (1) from "/usr/bin/grep"
procmail: No match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/bsd-list"
procmail: Match on "(.)"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/commerce-list"
procmail: Non-zero exitcode (1) from "/usr/bin/grep"
procmail: No match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/commerce-list"
procmail: Match on "(.)"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/srl-list"
procmail: Non-zero exitcode (1) from "/usr/bin/grep"
procmail: No match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/srl-list"
procmail: Match on "(.)"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/travel-list"
procmail: Non-zero exitcode (1) from "/usr/bin/grep"
procmail: No match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/travel-list"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/deny-list"
procmail: Non-zero exitcode (1) from "/usr/bin/grep"
procmail: No match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/deny-list"
procmail: No match on
"^Subject:(_dot_)*Verify(_dot_)*for(_dot_)*gessel(_at_)blackrosetech(_dot_)com"
procmail: Locking "spamassassin.lock"
procmail: Executing "/usr/local/bin/spamc"
procmail: [2653] Mon Oct 15 00:02:46 2007
procmail: Unlocking "spamassassin.lock"
procmail: Match on "^X-Spam-Status: No"
procmail: Locking "/home/gessel/Maildir/.lock"
procmail: Assigning
"LASTFOLDER=/home/gessel/Maildir/new/1192431759.2653_3.claudel.blackrosetech.com"
procmail: Unlocking "/home/gessel/Maildir/.lock"
procmail: Notified comsat:
"gessel(_at_)0:/home/gessel/Maildir/new/1192431759.2653_3.claudel.blackrosetech.com"
From dgessel(_at_)gmail(_dot_)com Mon Oct 15 00:02:39 2007
Subject: test with spamd running
Folder: /home/gessel/Maildir/new/1192431759.2653_3.claudel.blackrose 2501
THIS MESSAGE WAS DELIVERED WITHOUT THE BODY
(The sender was in the accept-list)
procmail: Unlocking "/home/gessel/.lockmail"
procmail: Assigning "LOCKFILE=/home/gessel/.lockmail"
procmail: Locking "/home/gessel/.lockmail"
procmail: Assigning "BULK=/home/gessel/.procmail/bulk-list"
procmail: Assigning "BSD=/home/gessel/.procmail/bsd-list"
procmail: Assigning "COM=/home/gessel/.procmail/commerce-list"
procmail: Assigning "IMP=/home/gessel/.procmail/impersonal-list"
procmail: Assigning "SRL=/home/gessel/.procmail/srl-list"
procmail: Assigning "TRAV=/home/gessel/.procmail/travel-list"
procmail: Assigning "SHELL=/bin/sh"
procmail: Assigning "PATH"
procmail: Assigning "COMSAT"
procmail: Assigning "VERBOSE=on"
procmail: Assigning "LOGFILE=/home/gessel/ProcmailLog"
procmail: Opening "/home/gessel/ProcmailLog"
procmail: Assigning "LASTFOLDER=/home/gessel/.save_all"
procmail: Opening "/home/gessel/.save_all"
procmail: Acquiring kernel-lock
procmail: No match on "^Subject: List senders"
procmail: No match on "^Subject: Accept \/.*"
procmail: No match on "^Subject: Deny \/.*"
procmail: Extraneous filter-flag ignored
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There is a "f" to much
procmail: Assigning "FROM="
procmail: Executing "$FORMAIL -rzxTo:|$TR / _"
procmail: Match on ! "^Content-Length:"
procmail: Executing "/usr/local/bin/formail,-a,Content-Length: 0000000000"
procmail: No match on "MAILER-DAEMON"
procmail: Match on "(.)"
procmail: No match on "(mit.edu|americancapital.com)$"
procmail: Executing
"/usr/bin/grep,-i,^dgessel(_at_)gmail(_dot_)com,/home/gessel/.procmail/accept-list"
procmail: Match on "/usr/bin/grep -i ^dgessel(_at_)gmail(_dot_)com
/home/gessel/.procmail/accept-list"
procmail: Assigning "LASTFOLDER=$(DEFAULT}"
procmail: Opening "$(DEFAULT}"
procmail: Acquiring kernel-lock
procmail: [2856] Mon Oct 15 00:09:02 2007
procmail: Notified comsat: "gessel(_at_)0:/home/gessel/Maildir//$(DEFAULT}"
From dgessel(_at_)gmail(_dot_)com Mon Oct 15 00:09:01 2007
Subject: test with message length thing
Folder: $(DEFAULT} 1974
procmail: Unlocking "/home/gessel/.lockmail"
Thanks, Greetings and nice Day
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSN LinuxMichi
0033/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail