anomy-list

sanitizer.pl exit code

From: Cardon Denis (145395@xyz.molar.is)
Date: Tue 10 Apr 2007 - 17:11:25 GMT

  • Next message: Kevin Shanahan: "Re: sanitizer.pl exit code"

    Hi,

    It seems to be quite quiet on the mailing list archive, but well I guess
    there is no better place to ask this question... Hope this is not bound
    to a /dev/null :-)

    I have been testing email sanitizer for a few hours and have noticed
    that exit code from sanitizer is 1 if there has been some defang (by the
    way output code was the subject of a thread a few years ago on this
    mailing list). It seems that procmail assume that non 0 exit code means
    that something went wrong in the external program, so it just ignore the
    sanitizer's output (which correctly does it job by the way). From
    procmail output :

    procmail: Program failure (1) of "/opt/anomy/bin/sanitizer.pl"

    I was wondering if there is any way to tell sanitizer to always output 0
    unless something went very bad, or tell procmail to assume exit(1) and
    exit(0) are both ok. There is no mention of this issue in the procmail
    recipies on the sanitizer web page.

    A quick hack is to change the exit($ret) to exit(0) at the end of
    sanitizer.pl, but well it is not that clean...

    I tried both mandriva2007 rpm package and the tarball coming from the
    home page and both have the same behavior.

    Does anyone have some input on this one?

    Cheers,

    Denis

    -- 
    Denis Cardon
    Tranquil IT Systems
    10 rue du Docteur Bouchard
    49400 Saumur
    http://www.tranquil-it-systems.fr
    



    hosted by molar.is