Gerhard Muntingh
2003-Dec-20 12:17 UTC
[Dovecot] Bugfix for use with "Opera mail" and "AnalogX"
Dear developers, [ Please CC me as I'm not subscribed to this list. ] In src/pop3-login/client.c: void client_send_line(struct pop3_client *client, const char *line) { o_stream_send_str(client->output, line); o_stream_send(client->output, "\r\n", 2); } Called as 'client_send_line(client "+OK dovecot");'. This function sends two packets to the client. It appears Opera mail and AnalogX proxy recognise the 1st packet as a complete welcome and send their "USER " command after receiving it. They then receive the newline in the next packet and get confused. This is very probably a bug in those two programs, but it would still be great if it could be fixed in the dovecot source. My personal fix involved a buffer on the stack (char tmp[LENGTH]) and some sanity checks wherein the newline is strcat'ed to the string. That's not very nice, but it works for me. Can someone please fix this? There may even be more pop clients having problems with this. kind regards, Gerhard Muntingh.
Matthias Andree
2003-Dec-21 12:52 UTC
[Dovecot] Re: Bugfix for use with "Opera mail" and "AnalogX"
Gerhard Muntingh <gerhardm at muntingh.tmfweb.nl> writes:> Dear developers, > > [ Please CC me as I'm not subscribed to this list. ] > > In src/pop3-login/client.c: > > void client_send_line(struct pop3_client *client, const char *line) > { > o_stream_send_str(client->output, line); > o_stream_send(client->output, "\r\n", 2); > } > > Called as 'client_send_line(client "+OK dovecot");'. > > This function sends two packets to the client. It appears Opera mail > and AnalogX proxy recognise the 1st packet as a complete welcome and > send their "USER " command after receiving it. They then receive the > newline in the next packet and get confused.> This is very probably a bug in those two programs, but it would still > be great if it could be fixed in the dovecot source.The client bug will have to be fixed nonetheless because sooner or later, some response will arrive with the last CRLF on a packet boundary, killing off the client. I'd suggest not fixing Dovecot until after the clients are fixed, so that the vendors have something to test against. -- Matthias Andree Encrypt your mail: my GnuPG key ID is 0x052E7D95