procmail
[Top] [All Lists]

Autoresponder almost works now

2004-07-09 19:02:11
Thank you, Michael Wise, adding these lines to procmailrc allowed the autoresponder to actually send the message:

        SHELL=/bin/sh
        PATH=/bin:/usr/bin:/usr/local/bin

So that's one big, big problem solved. I've been working for weeks on that one. Thank you again.

So now that I got that to work, I wanted to build on it. Every day I get dozens of messages from "inet(_at_)microsoft(_dot_)com" that appear to be sent by a virus. So I altered my recipe to match those messages also:
---------------------------------
:0
* ^From.*(Mike Schuppe|inet(_at_)microsoft(_dot_)com)
* !^FROM_DAEMON
* !^X-Loop: robot(_at_)michaelbluejay\(_dot_)com
| (formail -t -r -A "X-Loop: robot(_at_)michaelbluejay(_dot_)com" ;\
echo "(This is a prerecorded message.)"                ;\
echo "Your message was tagged as spam and deleted."    ;\
echo "If it wasn't spam, please visit my website and"  ;\
echo "send your mail through the form there.") | $SENDMAIL $SENDMAILFLAGS -t

:0:
$HOME/Maildir/
-----------------------------------

It may be hard to see the vertical bar between "Schuppe" and "inet(_at_)microsoft", but that's what it is.

The virus messages gets matched properly and the autoresponse gets sent properly (I know this because I then get a bounce message, which I'll worry about later). The problem is that the virus message winds up in my mailbox anyway even though the autoresponder grabbed it. The log shows an error:

-------------------------
procmail: Executing " (formail -t -r -A "X-Loop: robot(_at_)michaelbluejay(_dot_)com" ;\
echo "(This is a prerecorded message.)"                ;\
echo "Your message was tagged as spam and deleted."    ;\
echo "If it wasn't spam, please visit my website and"  ;\
echo "send your mail through the form there.") | $SENDMAIL $SENDMAILFLAGS -t" procmail: Error while writing to " (formail -t -r -A "X-Loop: robot(_at_)michaelbluejay(_dot_)com" ;\
echo "(This is a prerecorded message.)"                ;\
echo "Your message was tagged as spam and deleted."    ;\
echo "If it wasn't spam, please visit my website and"  ;\
echo "send your mail through the form there.") | $SENDMAIL $SENDMAILFLAGS -t" procmail: Assigning "LASTFOLDER= (formail -t -r -A "X-Loop: robot(_at_)michaelbluejay(_dot_)com" ;\
echo "(This is a prerecorded message.)"                ;\
echo "Your message was tagged as spam and deleted."    ;\
echo "If it wasn't spam, please visit my website and"  ;\
echo "send your mail through the form there.") | $SENDMAIL $SENDMAILFLAGS -t"
procmail: Locking "/home/bluejay/Maildir/.lock"
procmail: Assigning "LASTFOLDER=/home/bluejay/Maildir/new/1089423698.31909_1.pillage"
procmail: Unlocking "/home/bluejay/Maildir/.lock"
procmail: Notified comsat: "bluejay(_at_)0:/home/bluejay/Maildir/new/1089423698.31909_1.pillage"
------------------------

Curiously, this error does not appear when matching mail from Mike Schuppe.

I hope I'm not being a bother with these requests -- I thought that what I was trying to do was fairly simple.

Thank you again for your help,  -MBJ-


____________________________________________________________
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

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