Hi,

I was trying to detect various error conditions during spamc execution
based on its exit code, which, according to its manpage, should be easy
using something -x / --no-safe-fallback.

$ spamc --full -no-safe-fallback --port=12345 < message.eml; echo $?

This nicely reports an exit code of 69 (where nothing is actually
listing on that port).

However, checking for maxsize issues does not work:

$ spamc --full --no-safe-fallback --max-size=10 < message.eml; echo $?

This reports an exit code of 0. Checking the source code [1] tells me
that the exit code is suppressed on purpose, but the bugreport
referenced in the source code [2] doesn't explain why EX_TOOBIG should
be suppressed.

So either the code has an issue, or the man page (as EX_TOOBIG can never
happen but it is documented). I'd rather see the code fixed, unless
there is a compelling reason not too which I failed to understand.

Kind regards,
        Tom

[1]
http://svn.apache.org/viewvc/spamassassin/trunk/spamc/spamc.c?view=markup (line
1050)
[2] https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5412

Reply via email to