KLYang wrote:
My .procmailrc file
file location $HOME/.procmailrc
**************************************
SHELL=/bin/sh
LOGFILE=$HOME/log
VERBOSE=off
:0 hc
* !^FROM_DAEMON
* !^X-Loop: bobcats(_at_)localhost(_dot_)localdomain
| (formail -r -I"Precedence: junk" \
-I"From:<charles(_at_)localhost(_dot_)localdomain>
^^
You need a closing quote and a '\' to escape the end-of-line here.
BEWARE: You must ensure that there are no spaces characters after the
'\' -- the '\' must be the last character on the line! You
can check for this easily by using vi(1) to edit your
.procmailrc and saying ":se list". If your line looks like
this:
blahblah \ $
then you have trailing blanks. If it looks like this:
blahblah \$
then the '\' is the last char on the line and procmail will
interpret it as a continuation. (To turn off this feature in
vi, say ":se nolist".)
-A"X-Loop: bobcats(_at_)localhost(_dot_)localdomain"; \
echo "Mail received.") | $SENDMAIL -t
You *may* need another "echo" before the "Mail received" one, to
separate header from body.
In other words:
:0 hc
* !^FROM_DAEMON
* !^X-Loop: bobcats(_at_)localhost(_dot_)localdomain
| (formail -r -I"Precedence: junk" \
-I"From:<charles(_at_)localhost(_dot_)localdomain>" \
-A"X-Loop: bobcats(_at_)localhost(_dot_)localdomain"; \
echo; echo "Mail received.") | $SENDMAIL -t
Not related to your question, but Jari Aalto recommends always using
"-rt" when using formail to create a reply:
http://www.procmail.org/jari/pm-tips-body.html#always_use_formails_rt_switch
-----------------------------------------------------------------
Log file.
**********
procmail: [882] Thu Sep 28 08:42:40 2000
procmail: Skipped ""
procmail: Skipped ""
[...]
procmail: Match on ! "^X-Loop: bobcats(_at_)localhost(_dot_)localdomain"
procmail: Assigning "LASTFOLDER=(formail -rtb -IPrecedence: junk "
Is this the log from the above? The flags "-rtb" seem to differ, and
the '\' in your recipe above don't match what the log is saying.
procmail: Skipped "-I"From: <charles(_at_)localhost(_dot_)localdomain>" \
"
Here procmail thinks the -I line is another recipe. Watch out for
those spaces after the '\' !!
hth
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail