On Fri, 2013-01-11 at 16:35 -0500, Kevin A. McGrail wrote: > As noted, the default is that 0 is the exit code for everything. So you > should expect 0. > OK
> echo "junk line"| spamc; echo $? > > > > echo "junk line"| spamc -x; echo $? 1 0 > The error level with -x is could scan/couldn't scan. > Not according to the manpage: -x and --no-safe-fallback are the same and can use error codes on the range 64-98 > Add -c to get the > error level you are expecting, I beleive. > According to the manpage: -c and -E should use the same exit codes. > 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. > Could I also suggest that the error codes used by -c, -C, -E and -L be added to the "Error Codes" section. Its incomplete otherwise. > > echo "junk line"| spamc -E -x; echo $? 64 1 > Possibly but I don't see a check for it in the code. > Seems like a bug to me unless -E and -x are additive, in which case it should be documented. > 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. > What is this -X of which you speak? '-x' is documented but there is no mention of -X anywhere in either manpage or help display. BTW, there is a configuration file documented as being already available: see the -F --config option and the "CONFIGURATION FILE" section in the spamc manpage. > > 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 > Noted. Thanks. Martin