spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin A. McGrail" <KMcGr...@PCCC.com>
Subject Re: spamc exit code for exceeding max size
Date Thu, 10 Jan 2013 22:33:11 GMT
On 1/10/2013 5:16 PM, Tom Hendrikx wrote:
> On 10-01-13 22:43, Kevin A. McGrail wrote:
>> On 1/10/2013 3:16 PM, Tom Hendrikx wrote:
>>> Since I wrap spamc with a different programming language, I have all
>>> the tools available to handle any error condition: detecting EX_TOOBIG
>>> is however not possible.
>> I don't understand this as I use MD to call spamc.  Why can't you just
>> check the file size prior to calling sa?
> Because I don't want to maintain the maxsize in two places? Because I
> still want to catch the error when someone lowers only the maxsize
> settings because he did not RTFM?
In my code, I maintain one variable for the maxsize. Here's pseudo code:
$params{'max_size_email_for_scanning'} = 512KB;

if (-s $file <= $params{'max_size_email_for_scanning'}) {
    spamc -s $params{'max_size_email_for_scanning'}
}

In short, I've never needed or even seen the EX_TOOBIG error because 
I've never called spamc with a file bigger than the scansize.

> So I'd be happy to contribute a patch that contains an elegant 
> solution, but not another kludge that fixes only my stupid little 
> issue but makes matters worse in the long run. As said, creating a 
> kludge in the surrounding code is just as ugly, but much faster. -- Tom
Either way, your time is running out.  I hope to build pre2 if I can get 
all the xt test errors fixed tonight.  After 3.4.0 is pushed out, the 
ability to majorly revamp params for anything is much limited because 
3.4.0 is a major release so there can be changes to parameters, APIs, etc.

Regards,
KAM

Mime
View raw message