procmail
[Top] [All Lists]

Re: new procmail user question

1996-10-17 17:28:32
Eamonn Doyle <edoyle(_at_)teaparty(_dot_)modicon(_dot_)com> writes:
i am having some trouble with forwarding mail to another site after changing
the From: and Subject: lines to suit my needs.
...
#test: mail from anyone with "brick" in subject
:0 c
             * ^From.*                                #all mail should be 
from someone
             * ^Subject:.*brick               #with brick in subject
              | ( ${FORMAIL} -l ${FMLOG}\     #use formail and log
              -I "Subject: ${SUB}"\           #change the Subject: > ${SUB}
              -I "From: ${FROM}" )            #change the From: > ${FROM}
              | ${SEND} -oi ${JOHN}           #send to ${JOHN}

Note that the penultimate line of the action is lacking the backslash.
Thus, procmail doesn't continue it to the next line.

BTW: the parens are unneccesary here.


2 things seem wrong, first i have this:

procmail: Skipped "| ${SEND} -oi ${JOHN} "

i don't see why it would "skip" this.

When procmail skips something, the mistake is usually in/on the previous
line.


and second is:

procmail: Executing "(,/usr/local/bin/formail,-l,/files4/edoyle/from.proc,-I,S
ubject: tech_info,-I,From: edoyle(_at_)modicon(_dot_)com,)"
(: (: No such file or directory

Procmail only invokes a real shell if the command line contains a
character in SHELLMETAS.  SHELLMETAS does not normally contain parens,
and so procmail tried to execute the given command directly using
execv().  This is done for efficiency reasons (and can also be useful
for mega-paranoid scripts that unset SHELLMETAS).  Once you correct the
continuation problem, this side-effect will go away, as the action will
then contain a '|', which _is_ in SHELLMETAS.

Philip Guenther

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