You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2006/05/30 09:39:49 UTC

[Bug 4928] New: Hardcoded 9Mb max message size limit for spamc

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4928

           Summary: Hardcoded 9Mb max message size limit for spamc
           Product: Spamassassin
           Version: 3.1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: brad.webb@au.ey.com


Hard-coded ~9.53Mb max message size for spamc and incorrect exit value.

Line 950 of libspamc.c:

    if ((m->msg_len > 9999999) || ((len + 27) >= (bufsiz - len))) {
        _use_msg_for_out(m);
        return EX_OSERR;
    }

Spamc's man page indicates a default max message size of 250Kb. It also
indicates the "-s" as modifying this default. The 9.53Mb hard limit is not
mentioned anywhere within the spamassassin documentation (man page/perl POD/wiki
etc).

When this branch is excuted the code exits with value "71". This is defined in
spamc's man page as "EX_OSERR system error (e.g., can't fork)".

Not sure why there is a hard-coded limit for message size (with no associated
warnings in documenation). If it needs to remain this branch should probably
exit with a different, new exit value e.g., "EX_MSGSIZE 79 Message is larger
than maximum size of 9.53Mb) as well as associated change to man page.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4928] Hardcoded 9Mb max message size limit for spamc

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4928


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.2.0




------- Additional Comments From jm@jmason.org  2006-07-10 12:11 -------
should be easy enough to fix, or at least document, for 3.2.0



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4928] Hardcoded 9Mb max message size limit for spamc

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4928


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jm@jmason.org  2006-09-08 13:51 -------
ok, changed that to EX_DATAERR, which is what sysexits.h suggests would be most
appropriate.  unfortunately, we can't just pick new values; sysexits is a set of
guidelines of what should be used, so let's stick by those.

Also, I upped the limit to 256MB, which I hope is well beyond the max -- SA will
definitely cause insane memory-usage on that, anyway ;) -- documented it, and
added a test for it in the args-parsing code too.

Sending        spamc/libspamc.c
Sending        spamc/libspamc.h
Sending        spamc/spamc.c
Sending        spamc/spamc.pod
Transmitting file data ....
Committed revision 441496.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.