[SA-exim] local_scan is crashing on big messages
Marc MERLIN
marc at merlins.org
Mon May 17 18:36:53 PDT 2004
On Mon, May 17, 2004 at 08:37:50AM -0400, Brian Kendig wrote:
> On May 15, 2004, at 1:44 PM, Marc MERLIN wrote:
> >Ok, that's great news, at least you can reproduce at will, it will
> >help a
> >lot.
> >See what you get with a debuglevel of 10
>
> Here's what I get in the mainlog with SAEximDebug set to 10:
>
> http://www.enchanter.net/sa-exim.debug
>
> The relevant lines appear to be these; I'll bet it shouldn't be
> reporting a message body of zero bytes:
>
> SA: Debug4: Message body is about 0 bytes and the initial offset is
> 4892260
> SA: Debug: SATruncBodyCond expand returned: '0'
> local_scan() function crashed with signal 11 - message temporarily
> rejected (size 4892599)
Mmmh, interesting, so the code is this:
> if (SATruncBodyCond[0] != '1' || SATruncBodyCond[1] != 0)
> {
> expand=expand_string(SATruncBodyCond);
> if (expand == NULL)
> {
> PANIC(string_sprintf("SATruncBodyCond expansion failure on %s", SATruncBodyCond));
> }
>
> if (SAEximDebug)
> {
> log_write(0, LOG_MAIN, "SA: Debug: SATruncBodyCond expand returned: '%s'", expand);
> }
it worked up to here, but add this line here:
log_write(0, LOG_MAIN, "SA: Not Dead 0");
> if (expand[0] == 0 || (expand[0] == '0' && expand[1] == 0))
this most likely worked, but the new log_writes will tell
would the following have crashed?
Try adding some debugs to check:
> {
log_write(0, LOG_MAIN, "SA: Not Dead 1");
log_write(0, LOG_MAIN, "SA: size: %d", fdsize-18);
log_write(0, LOG_MAIN, "SA: mesgid: %s", safemesgid);
log_write(0, LOG_MAIN, "SA: mailinfo: %s", mailinfo);
log_write(0, LOG_MAIN, "SA: Not Dead 2");
> log_write(0, LOG_MAIN, "SA: Action: check skipped due to message size (%d bytes) and SATruncBodyCond expanded to false (Message-Id: %s). %s", fdsize-18, safemesgid, mailinfo);
log_write(0, LOG_MAIN, "SA: Not Dead 3");
> header_add(' ', "X-SA-Exim-Scanned: No (on %s); Message bigger than SAmaxbody (%d)\n", primary_hostname, SAmaxbody);
log_write(0, LOG_MAIN, "SA: Not Dead 4");
> return LOCAL_SCAN_ACCEPT;
> }
> }
But by just looking at the code, I'm not quite sure why it'd crash there.
If you don't see "SA: Not Dead 0" and "...1", then I'll be very confused.
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | Finger marc_f at merlins.org for PGP key
More information about the SA-Exim
mailing list