TLS section

View: New views
7 Messages — Rating Filter:   Alert me  

TLS section

by sergio.casagrande :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I am trying to use xmail TLS configuration and I am having these problems:
I try to use this command to test TLS connection (is it right?):
openssl s_client -starttls smtp -crlf -connect traiano.telsey.it:25
and I received this error:
CONNECTED(00000003)
3821:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
In xmail debug console:
SMTP failed to STARTTLS (ip address)
SMTP client exit (ip address)

My environment is:
Ubuntu server 9.04
xmailserver 1.27pre01
openssl OpenSSL 0.9.8g 19 Oct 2007

Where have I a mistake?
Than you.
Bye

Sergio bh

______________________________________________________________________________

--- NOTICE ---

This email and any attachments are confidential and are intended for the
addressee only. If you have received this message by mistake, please contact
us immediately and then delete the message from your system. You must not
copy, distribute, disclose or act upon the contents of this email. Personal
and corporate data submitted will be used in a correct, transparent and lawful
manner. The data collected will be processed in paper or computerized form for
the performance of contractual and lawful obligations as well as for the
effective management of business relationship. The data processor is Telsey
S.p.A. The data subject may exercise all the rights set forth in art. 7 of
Law by Decree 30.06.2003 n. 196 as reported in the following url
http://www.telsey.com/privacy.asp.

______________________________________________________________________________

_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail

Re: TLS section

by Davide Libenzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 27 Oct 2009, sergio.casagrande@... wrote:

> Hi all,
> I am trying to use xmail TLS configuration and I am having these problems:
> I try to use this command to test TLS connection (is it right?):
> openssl s_client -starttls smtp -crlf -connect traiano.telsey.it:25
> and I received this error:
> CONNECTED(00000003)
> 3821:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
> In xmail debug console:
> SMTP failed to STARTTLS (ip address)
> SMTP client exit (ip address)
>
> My environment is:
> Ubuntu server 9.04
> xmailserver 1.27pre01
> openssl OpenSSL 0.9.8g 19 Oct 2007
>
> Where have I a mistake?

Try to apply the patch below, and show the XMail debug message again ...


- Davide



diff --git a/SMTPSvr.cpp b/SMTPSvr.cpp
index d71eb91..7d4f28f 100644
--- a/SMTPSvr.cpp
+++ b/SMTPSvr.cpp
@@ -2350,8 +2350,8 @@ static int SMTPHandleCmd_STARTTLS(char const *pszCommand, BSOCK_HANDLE hBSock, S
  ErrorPush();
  if (SMTPLogEnabled(SMTPS.pThCfg->hThShb, SMTPS.pSMTPCfg))
  SMTPLogSession(SMTPS, "", "", "SMTP=ESSL", 0);
- SysLogMessage(LOG_LEV_MESSAGE, "SMTP failed to STARTTLS [%s]\n",
-      SysInetNToA(SMTPS.PeerInfo, szIP, sizeof(szIP)));
+ SysLogMessage(LOG_LEV_MESSAGE, "SMTP failed to STARTTLS (%d) [%s]\n",
+      iError, SysInetNToA(SMTPS.PeerInfo, szIP, sizeof(szIP)));
  SMTPS.iSMTPState = stateExit;
 
  return ErrorPop();
_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail

Rif: Re: TLS section

by sergio.casagrande :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Davide.
After the patch is applied, the command output for:
openssl s_client -starttls smtp -crlf -connect traiano.telsey.it:25
is
7388:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:

Bye.
Sergio bh

Da:Davide Libenzi <davidel@...>
Per:XMail Users Mailing List <xmail@...>
Data:27/10/2009 17.31
Oggetto:Re: [xmail] TLS section
Inviato da:xmail-bounces@...





On Tue, 27 Oct 2009, sergio.casagrande@... wrote:

> Hi all,
> I am trying to use xmail TLS configuration and I am having these problems:
> I try to use this command to test TLS connection (is it right?):
> openssl s_client -starttls smtp -crlf -connect traiano.telsey.it:25
> and I received this error:
> CONNECTED(00000003)
> 3821:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
> In xmail debug console:
> SMTP failed to STARTTLS (ip address)
> SMTP client exit (ip address)
>
> My environment is:
> Ubuntu server 9.04
> xmailserver 1.27pre01
> openssl OpenSSL 0.9.8g 19 Oct 2007
>
> Where have I a mistake?

Try to apply the patch below, and show the XMail debug message again ...


- Davide



diff --git a/SMTPSvr.cpp b/SMTPSvr.cpp
index d71eb91..7d4f28f 100644
--- a/SMTPSvr.cpp
+++ b/SMTPSvr.cpp
@@ -2350,8 +2350,8 @@ static int SMTPHandleCmd_STARTTLS(char const *pszCommand, BSOCK_HANDLE hBSock, S
                                  ErrorPush();
                                  if (SMTPLogEnabled(SMTPS.pThCfg->hThShb, SMTPS.pSMTPCfg))
                                                   SMTPLogSession(SMTPS, "", "", "SMTP=ESSL", 0);
-                                  SysLogMessage(LOG_LEV_MESSAGE, "SMTP failed to STARTTLS [%s]\n",
-                                                         SysInetNToA(SMTPS.PeerInfo, szIP, sizeof(szIP)));
+                                  SysLogMessage(LOG_LEV_MESSAGE, "SMTP failed to STARTTLS (%d) [%s]\n",
+                                                         iError, SysInetNToA(SMTPS.PeerInfo, szIP, sizeof(szIP)));
                                  SMTPS.iSMTPState = stateExit;

                                  return ErrorPop();
_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail




______________________________________________________________________________

--- NOTICE ---

This email and any attachments are confidential and are intended for the
addressee only. If you have received this message by mistake, please contact
us immediately and then delete the message from your system. You must not
copy, distribute, disclose or act upon the contents of this email. Personal
and corporate data submitted will be used in a correct, transparent and lawful
manner. The data collected will be processed in paper or computerized form for
the performance of contractual and lawful obligations as well as for the
effective management of business relationship. The data processor is Telsey
S.p.A. The data subject may exercise all the rights set forth in art. 7 of
Law by Decree 30.06.2003 n. 196 as reported in the following url
http://www.telsey.com/privacy.asp.

______________________________________________________________________________

_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail

Re: Rif: Re: TLS section

by Davide Libenzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 27 Oct 2009, sergio.casagrande@... wrote:

> Thank you Davide.
> After the patch is applied, the command output for:
> openssl s_client -starttls smtp -crlf -connect traiano.telsey.it:25
> is
> 7388:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:

You need to show me what XMail prints, in the debug console ...



- Davide


_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail

Rif: Re: TLS section

by sergio.casagrande :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am sorry, Davide.
The error in console of xmail is:
SMTP failed to STARTTLS (-235) from (ip address)
Bye.
Sergio bh



Da:Davide Libenzi <davidel@...>
Per:XMail Users Mailing List <xmail@...>
Data:27/10/2009 17.31
Oggetto:Re: [xmail] TLS section
Inviato da:xmail-bounces@...





On Tue, 27 Oct 2009, sergio.casagrande@... wrote:

> Hi all,
> I am trying to use xmail TLS configuration and I am having these problems:
> I try to use this command to test TLS connection (is it right?):
> openssl s_client -starttls smtp -crlf -connect traiano.telsey.it:25
> and I received this error:
> CONNECTED(00000003)
> 3821:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
> In xmail debug console:
> SMTP failed to STARTTLS (ip address)
> SMTP client exit (ip address)
>
> My environment is:
> Ubuntu server 9.04
> xmailserver 1.27pre01
> openssl OpenSSL 0.9.8g 19 Oct 2007
>
> Where have I a mistake?

Try to apply the patch below, and show the XMail debug message again ...


- Davide



diff --git a/SMTPSvr.cpp b/SMTPSvr.cpp
index d71eb91..7d4f28f 100644
--- a/SMTPSvr.cpp
+++ b/SMTPSvr.cpp
@@ -2350,8 +2350,8 @@ static int SMTPHandleCmd_STARTTLS(char const *pszCommand, BSOCK_HANDLE hBSock, S
                                  ErrorPush();
                                  if (SMTPLogEnabled(SMTPS.pThCfg->hThShb, SMTPS.pSMTPCfg))
                                                   SMTPLogSession(SMTPS, "", "", "SMTP=ESSL", 0);
-                                  SysLogMessage(LOG_LEV_MESSAGE, "SMTP failed to STARTTLS [%s]\n",
-                                                         SysInetNToA(SMTPS.PeerInfo, szIP, sizeof(szIP)));
+                                  SysLogMessage(LOG_LEV_MESSAGE, "SMTP failed to STARTTLS (%d) [%s]\n",
+                                                         iError, SysInetNToA(SMTPS.PeerInfo, szIP, sizeof(szIP)));
                                  SMTPS.iSMTPState = stateExit;

                                  return ErrorPop();
_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail




______________________________________________________________________________

--- NOTICE ---

This email and any attachments are confidential and are intended for the
addressee only. If you have received this message by mistake, please contact
us immediately and then delete the message from your system. You must not
copy, distribute, disclose or act upon the contents of this email. Personal
and corporate data submitted will be used in a correct, transparent and lawful
manner. The data collected will be processed in paper or computerized form for
the performance of contractual and lawful obligations as well as for the
effective management of business relationship. The data processor is Telsey
S.p.A. The data subject may exercise all the rights set forth in art. 7 of
Law by Decree 30.06.2003 n. 196 as reported in the following url
http://www.telsey.com/privacy.asp.

______________________________________________________________________________

_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail

Re: Rif: Re: TLS section

by Davide Libenzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 27 Oct 2009, sergio.casagrande@... wrote:

> I am sorry, Davide.
> The error in console of xmail is:
> SMTP failed to STARTTLS (-235) from (ip address)

The error code (-235) is ERR_SSL_SETCERT, that means that the OpenSSL
libraries failed to read your certificate file (server.cert).
Likely wrong format.



- Davide


_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail

Rif: Re: Rif: Re: TLS section

by sergio.casagrande :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, the problem was about the name of both server certificate files.
Thank you.
Bye.
Sergio bh



Da:Davide Libenzi <davidel@...>
Per:XMail Users Mailing List <xmail@...>
Data:27/10/2009 18.18
Oggetto:Re: [xmail] Rif: Re:  TLS section
Inviato da:xmail-bounces@...





On Tue, 27 Oct 2009, sergio.casagrande@... wrote:

> I am sorry, Davide.
> The error in console of xmail is:
> SMTP failed to STARTTLS (-235) from (ip address)

The error code (-235) is ERR_SSL_SETCERT, that means that the OpenSSL
libraries failed to read your certificate file (server.cert).
Likely wrong format.



- Davide


_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail




______________________________________________________________________________

--- NOTICE ---

This email and any attachments are confidential and are intended for the
addressee only. If you have received this message by mistake, please contact
us immediately and then delete the message from your system. You must not
copy, distribute, disclose or act upon the contents of this email. Personal
and corporate data submitted will be used in a correct, transparent and lawful
manner. The data collected will be processed in paper or computerized form for
the performance of contractual and lawful obligations as well as for the
effective management of business relationship. The data processor is Telsey
S.p.A. The data subject may exercise all the rights set forth in art. 7 of
Law by Decree 30.06.2003 n. 196 as reported in the following url
http://www.telsey.com/privacy.asp.

______________________________________________________________________________

_______________________________________________
xmail mailing list
xmail@...
http://xmailserver.org/mailman/listinfo/xmail