On 1/11/2013 4:06 PM, Martin Gregorie wrote:
These options were added through real-world usage scenarios. Removing
them is not something I can support without more study that we aren't
breaking things for people.

All I'm saying is that, because the -E --exitcodes option causes the
default exit codes to be used (1=spam, 0=everything else) it isn't
needed.

======
As a quick check, I ran the following set of tests with spamd running:

Test                                   Exit expected  Exit seen
=====================================  =============  =========
echo "junk line"| spamc; echo $?       1              0
As noted, the default is that 0 is the exit code for everything. So you should expect 0.

echo "junk line"| spamc; echo $?


echo "junk line"| spamc -x; echo $?    1              0
The error level with -x is could scan/couldn't scan. Add -c to get the error level you are expecting, I beleive.

I've added a return to the spamc.pod to clarify this with error levels because the sentence " If one of the "-x", "-L" or "-C" options are specified, 'safe fallback' will be disabled, and certain error conditions related to communication between spamc and spamd will result in an error code. " should end that paragraph and the "The exit codes used..." applies to all of the options.
echo "junk line"| spamc -E -x; echo $? 64             1
Possibly but I don't see a check for it in the code. They set different options so it likely can work together albeit perhaps not that useful. I added code for -X to make sure that -x was set first because -x -X is handled differently than -X -x. Perhaps something is needed for this but overall we don't have many complaints this is a real world issue.

If you want this bugged, can I have bugzilla access, please?

You simply need to open your own account. Nothing should stop you from signing up at https://issues.apache.org/SpamAssassin/createaccount.cgi

regards,
KAM<

Reply via email to