At 12:17 pm +0200 2004/06/05, Giuliano Gavazzi wrote:
>Once in a while I find these puzzling log entries:
>
>2004-06-05 11:07:10 H=(haus) [200.232.190.165]
>F=<n.chandrasekar@???> rejected RCPT <xxxxx>: unknown user
>on secondary hit: Unrouteable address
>2004-06-05 11:07:10 SMTP protocol violation: synchronization error
>(next input sent too soon): rejected "RCPT TO:<yyyyy>" H=(haus)
>[200.232.190.165] next input="H=(haus) [200.232.190.165]"
>
sorry to follow up myself, but having had a look at the source
(explanation at the end...):
c = smtp_inend - smtp_inptr;
if (c > 150) c = 150;
memcpy(big_buffer, smtp_inptr, c);
big_buffer[c] = 0;
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),
string_printing(big_buffer));
how can big_buffer, that should contain the outstanding input stream,
contain the same as host_and_ident? Note that these synchronization
error log lines appear to show all the same behaviour.
I have changed the source to print out c, and its value is smaller
than the length of the string printed! Nonsense.
Also I have tried using directly smtp_inptr instead of
pring_printing(big_buffer) and the log is now (apart formatting)
correct:
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.
Giuliano
--
H U M P H
|| |||
software
Java & C++ Server/Client/Human Interface applications on MacOS - MacOS X
http://www.humph.com/