Re: Philip [BUG], Was: [Exim] synchronization error (next in…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Hans Morten Kind
Dátum:  
Címzett: Giuliano Gavazzi
CC: exim-users
Tárgy: Re: Philip [BUG], Was: [Exim] synchronization error (next input sent too soon) log error?
> 2004-06-06 12:23:33 SMTP protocol violation: synchronization error
> (next input sent too soon): rejected "MAIL FROM:<xxxxxx>"
> H=ns.humph.com (localhost) [217.155.139.146] next input="RCPT
> TO:<yyyyy>...
>
> Well, if I do not call host_and_ident the output is correct, so
> host_and_ident is changing big_buffer (that is global) as a side
> effect.


I have been having problems with the logging of the protocol violation
myself, I started wondering why the client sent this info ...

This is probably a working fix? As we are dropping the
connection smtp_inptr is not in use anymore and could
be used by log_write().

hmk


-- smtp_in.c --

    case BADSYN_CMD:
    c = smtp_inend - smtp_inptr;
    if (c > 150) c = 150;
#ifdef USE_BUG
    /* big_buffer is overwritten by host_and_ident() */
    memcpy(big_buffer, smtp_inptr - c, c);
    big_buffer[c] = 0;
#else
    smtp_inptr[c] = 0;
#endif
    incomplete_transaction_log(US"sync failure");
    log_write(0, LOG_MAIN|LOG_REJECT, "SMTP protocol violation: "
      "synchronization error (next input sent too soon): rejected \"%s\" %s "
      "next input=\"%s\"", cmd_buffer, host_and_ident(TRUE),
#ifdef USE_BUG
      string_printing(big_buffer));
#else
      string_printing(smtp_inptr));
#endif
    smtp_printf("554 SMTP synchronization error\r\n");
    done = 1;   /* Pretend eof - drops connection */
    break;