procmail
[Top] [All Lists]

Re: Database checks into procmail

2002-01-06 18:57:37
On Sun, Jan 06, 2002 at 04:16:43PM -0800, Professional Software Engineering 
wrote:
At 00:52 2002-01-07 +0100, Nils Vogels did say:
Why do you use a pipe here ?

FILTER_OPTIONS=|`grep "^$LOGNAME " /etc/procmailrcs/spamassassin.users`
            ^^^^^^^^

Wouldnt just executing the grep give the same results ?

Yes, my error - pipe would be used to pass the message - normally one might 
run the message through formail to extract headers.  I whipped up that for 
someone with a specific request, and wouldn't you know it, they never so 
much as acknowledged the post...

Tsk .. the manners of some ppl nowadays ...

I was thinking it wouldnt, but executing a seperate program is fine as
well .. is there a way to catch STDERR as well, coming from the binary

If you have an error condition, you could return a plain error string on 
STDOUT, then check for that in the string into which you sent the results:

I see .

btw, and still being able to tell the difference between STDOUT and
STDERR ?

no.

If I have to use shell redirections, indeed .. which is OK for now.

This did *exactly* what I wanted .. just built out a test, and it works! yay! :)


Gr,

-- 
Nils Vogels             PGP:0xC26BD15F Available on keyservers.
S(_at_)H:2744WU/4.046yr --> setiathome.ssl.berkeley.edu. Will you find aliens?
Every OS sucks!         http://www.yuckfou.org/every_os_sucks.mp3

Why did it happen ? BOFH Excuse:
                  Change in Earth's rotational speed
_______________________________________________
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>