procmail
[Top] [All Lists]

Why does my autoreply not work ???

2002-08-09 08:44:42
I'm trying to set up a very simple anti-spam filter that automatically
replies to any mail message, asking the send to put 'foo' in the header.
Any mail messages without foo will not be read. Later I will expand this
to automatically put the foo there, but for now I'm stuck at a more
fundamental level.

I wish to do this on the computer at university, where I do not have
root access. Procmail is not installed. I:

1) Installed procmail and formail in $HOME/bin
2) Put a .forward which has: "| exec /home/duke/davek/bin/procmail"
3) Wrote a few lines in a file antispam.txt which has a short
explanation.
4) Wrote a .procmailrc which is almost a carbon copy of that in the
procmailex(5) man page.

Any ideas what is wrong ? The .procmailrc and logs are below.

------

PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail      # You'd better make sure it exists
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/log
LOCKFILE=$HOME/.lockmail
VERBOSE=yes
SENDMAIL=/usr/lib/sendmail
FORMAIL=$HOME/bin/formail

:0
* ^Subject: .*foo
/var/mail/davek


:0 h c
* !^FROM_DAEMON
* !^X-Loop: davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk
| ($FORMAIL -r -I"Precedence: junk" \
  -A"X-Loop: davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk" ; \
  cat $HOME/antispam.txt) | $SENDMAIL -t

:0
$MAILDIR/spam

where antispam.txt shows a message about inserting foo in the header.

**********LOG IS BELOW************

duke /home/duke/davek % mailx davek
Subject: test
EOT
duke /home/duke/davek % cat Mail/log
procmail: [17581] Thu Aug  8 23:21:29 2002
procmail: Assigning "SENDMAIL=/usr/lib/sendmail"
procmail: Assigning "FORMAIL=/home/duke/davek/bin/formail"
procmail: No match on "^Subject: .*foo"
procmail: Match on ! "(^(Mailing-List:|Precedence:.*(junk|bulk|list)|To:

Multiple recipients of
|(((Resent-)?(From|Sender)|X-Envelope-From):|>?From
)([^>]*[^((_dot_)%(_at_)a-z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|m(mdf|ajordomo)|n?uucp|LIST(SERV|proc)|NETSERV|o(wner|ps)|r(e(quest|sponse)|oot)|b(ounce|bs\.smtp)|echo|mirror|s(erv(ices?|er)|mtp(error)?|ystem)|A(dmin(istrator)?|MMGR|utoanswer))(([^).!:a-z0-9][-_a-z0-9]*)?[%@>

][^<)]*(\(.*\).*)?)?$([^>]|$)))"
procmail: Match on ! "^X-Loop: davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk"
procmail: Executing " ($FORMAIL -r -I"Precedence: junk" \
  -A"X-Loop: davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk" ; \
  cat $HOME/antispam.txt) | $SENDMAIL -t"
procmail: Assigning "LASTFOLDER= ($FORMAIL -r -I"Precedence: junk" \
  -A"X-Loop: davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk" ; \
  cat $HOME/antispam.txt) | $SENDMAIL -t"
procmail: Assigning "LASTFOLDER=/home/duke/davek/Mail/spam"
procmail: Opening "/home/duke/davek/Mail/spam"
procmail: Acquiring kernel-lock
procmail: [17581] Thu Aug  8 23:21:30 2002
procmail: Notified comsat: "davek(_at_)0:/home/duke/davek/Mail/spam"
From davek Thu Aug  8 23:21:29 2002
 Subject: test
  Folder:
/home/duke/davek/Mail/spam                                        361
procmail: Unlocking "/home/duke/davek/.lockmail"





--
Dr. David Kirkby,
Senior Research Fellow,
Department of Medical Physics,
University College London,
11-20 Capper St, London, WC1E 6JA.
Tel: 020 7679 6409 Fax: 020 7679 6269
Internal telephone: ext 46409
e-mail davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk


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