Hello,

I still have this problem, unfortunately.
After some weeks of usage isbg.py has found only one spam message. All spam that was not found was probably not found due to this problem, as I did a re-run over my complete mailbox with the spamassassin-threshold set to 2.5.
It did not find any more spam, but a lot of 
342 is too big (spamc return code 98)
327 is too big (spamc return code 98)
316 is too big (spamc return code 98)
296 is too big (spamc return code 98)
285 is too big (spamc return code 98)
127 is too big (spamc return code 98)
100 is too big (spamc return code 98)
86 is too big (spamc return code 98)
['spamassassin', '--exit-code'] error for mail 603
NoneType: None
['spamassassin', '--exit-code'] error for mail 593
NoneType: None
['spamassassin', '--exit-code'] error for mail 588
NoneType: None
['spamassassin', '--exit-code'] error for mail 584
NoneType: None
['spamassassin', '--exit-code'] error for mail 575
NoneType: None
['spamassassin', '--exit-code'] error for mail 570
NoneType: None
['spamassassin', '--exit-code'] error for mail 560
NoneType: None
['spamassassin', '--exit-code'] error for mail 555
NoneType: None
['spamassassin', '--exit-code'] error for mail 547

What can I do?

Regards,
Hendrik


------ Originalnachricht ------
Von: "Hendrik Friedel" <hendrik@friedels.name>
An: isbg@python.org
Gesendet: 24.11.2019 11:43:34
Betreff: [Isbg] Re: messages too large; --maxsize without effect

Hello,

looking at 
spamproc.py
line 90:
def test_mail(mail, spamc=False, cmd=False):
    """Test a email with spamassassin."""
    score = "0/0\n"
    orig_code = None
    spamassassin_result = None
    returncode = None

    if cmd:
        satest = cmd
    elif spamc:
        # let spamc process mails larger than 500 KB if ISBG forwards them
        satest = ["spamc", "-E", "--max-size=268435450"]
    else:
        satest = ["spamassassin", "--exit-code"]

    proc = utils.popen(satest)

The limit 268435450 seems to be hardcoded.
But 268.435.450 bytes is 268.435kBytes is 268MBytes... So. Why is my 5MB Mail not scanned?

Anyway, should 
satest = ["spamc", "-E", "--max-size=268435450"]

not be something like
satest = ["spamc", "-E", "--max-size="+sa.maxsize]
(note the object sa is not available here I think).

Now, for some reason, I now do not get the error
['spamc', '-E', '--max-size=268435450'] error for mail 151

anymore, but instead:

['spamassassin', '--exit-code'] error for mail 151
NoneType: None

I have in between deleted the .cache/isbg/track* files

Regards,
Hendrik