procmail
[Top] [All Lists]

RE: [pro] Re: Real Virus Scanner

2004-02-11 20:23:22

From: Charles Gregory
Sent: Wednesday, February 11, 2004 6:57 PM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
I know that if you use a pipe for the action/destination of a recipe,
procmail feeds the message to the standard input of the pipe. But does it
also feed a copy of the message to the standard input of anything that
runs in backticks?

Yup. per man procmailrc,
http://www.gsp.com/cgi-bin/man.cgi?section=5&topic=procmailrc


The assignments and substitutions of these environment variables are handled
exactly like in sh(1) (that includes all possible quotes and escapes), with
the added bonus that blanks around the '=' sign are ignored and that, if an
environment variable appears without a trailing '=', it will be removed from
the environment. Any program in backquotes started by procmail will have the
entire mail at its stdin.

-----

I'm thinking that what happened is that the output from clamscan included a
leading additional line/two in addition to the message
describing the result of the scan.  Procmail differs from shell
(see BUGS) in that the backquotes will deliver only the first of the output.
Thus, a pipe is the only way to go. I experimented
with the theory that an non-zero exit code might kill the
evaluation of backquotes but it did not.



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