procmail
[Top] [All Lists]

Re: Capturing spamc output to var

2004-02-16 07:22:11
On Mon, Feb 16, 2004 at 06:48:37AM -0700, LuKreme wrote:
On 14 Feb 2004, at 18:04, Dallman Ross wrote:
       SA_OUT=| /users/zconcept/bin/spamc -c

Are you aware of this?

       -f Cause spamc to safe-failover if it can't connect to spamd
-- what this means is that in case spamc fails to connect to spamd,
it will not return with an exitcode set, it will instead dump the
original message to stdout, allowing the message to be delivered,
albeit unscanned for spam.  Without this flag, connection failures to
spamd will cause message delivery failures.

           Even with this flag set however, if spamc connects
successfully, and then encounters an error at a later stage of
communication, it will still return an exitcode.

Specifically, this portion?

           This now defaults to on.  This flag is accepted though for
back- wards-compatibility. -x can be used to tell spamc to use an
exit- code which will cause the message to be re-queued by the MTA
instead.

looks like you don't have to worry about the "can't connect to spamd'
condition.

I had read that a year or so ago, yeah.  I do not believe that it
applies to this situation for me.  I am running spamc in such a way that
the message is piped through spamc only to gain me the assignment
value.  The untouched message continues through below to my next
recipes, since this one was not a delivery recipe.  I don't need
to worry about what spamd does or doesn't do or what other errors
might arise in the operation of spamc, because any that do will
be noticed by my recipe that looks for 0/0 as the value of $SA_OUT.

Otherwise, if $SA_OUT has a normal score, I handle things properly
for delivery myself as welll.

       -c  Just check if the message is spam or not.  Set process
           exitcode to 1 is message is spam, 0 if not spam or
           processing failure occurs.  Will print score/threshold
           to stdout (as ints) or 0/0 if there was an error.

Since I'm now not even looking at the exit code, I only have
to worry about two things: valid score syntax, or 0/0?

I don't see what -f does to help me or hinder me in this case;
although, as you pointed out, its default is on anyway.

-- 
dman

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