From: Rajko A. <ra...@al...> - 2004-02-12 16:42:57
|
Hi, I'd found some problems while trying to use the starttls feature of libetpan in smtp part. 1. in mailsmtp_helper.c was IMHO a bug which had made impossible to use the starttls feature 'cause the esmtp-flags would overwritten there. See patch appended. 2. a possible design-bug? a lot of MTAs doesn't offer auth first AFTER starting tls. Means, etpan checks the features of server with ehlo. the server returns it stuff eg., starttls and so on, but no auth. When I try to auth after calling mailsmtp_starttls etpan tells me, there is no auth command. As workaround I tried to send ehlo again to re-get the features, but this ends in next point. 3. Is it possible that there is no real start of a tls session? I got just this response from mailserver: Feb 12 17:37:34 login postfix/smtpd[27712]: connect from xxxxxx Feb 12 17:37:34 login postfix/smtpd[27712]: SSL_accept error from xxxxx: -1 Feb 12 17:37:34 login postfix/smtpd[27712]: 27712:error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol:s23_srvr.c:585: Feb 12 17:37:34 login postfix/smtpd[27712]: disconnect from xxxxx the code I used is quite simple: err = mailsmtp_socket_connect( session, server, port ); err = mailsmtp_init( session ); err = mailesmtp_starttls(session); /* getting the new caps of server */ err = mailesmtp_ehlo(session); at the mailesmtp_ehlo I get a mailstream error. Must I do something else after the starttls command? Someone has a working example of tls with smtp? Bye Rajko |