LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-17-2010, 04:32 PM   #1
lxvor
LQ Newbie
 
Registered: Jan 2009
Posts: 13

Rep: Reputation: 0
postfix server configured for TLS not accepting connections


Hi,

I have configured my postfix server to use TLS (STARTTLS) but with no certificates either on server or client. Here are the TLS parameters in main.cf.
=========
smtpd_tls_security_level = may
# Obsolete, but still supported
#smtpd_use_tls = yes
#smtp_use_tls = yes
# Obsolete, but still supported
#smtpd_enforce_tls = yes
smtpd_tls_cert_file = none
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
=========

So according to the postfix doc this should allow my smtp client (I wrote a simple c++ SSL client) to issue a STARTTLS command and send encrypted emails without using certs. But all I get on the server side is this server log. The error on the server side appear after my client calls SSL_connect(m_ssl):

===============
Aug 17 14:38:12 linux-m9ry postfix/postfix-script[18272]: refreshing the Postfix mail system
Aug 17 14:38:12 linux-m9ry postfix/master[2934]: reload configuration /etc/postfix
Aug 17 14:38:50 linux-m9ry postfix/smtpd[18280]: initializing the server-side TLS engine
Aug 17 14:38:50 linux-m9ry postfix/smtpd[18280]: connect from mycomputer.corp.company.com[441.212.55.56]
Aug 17 14:38:50 linux-m9ry postfix/smtpd[18280]: setting up TLS connection from mycomputer.corp.company.com[441.212.55.56]
Aug 17 14:38:50 linux-m9ry postfix/smtpd[18280]: mycomputer.corp.company.com[441.212.55.56]: TLS cipher list "ALL:+RC4:@STRENGTH"
Aug 17 14:38:50 linux-m9ry postfix/smtpd[18280]: SSL_accept:before/accept initialization
Aug 17 14:38:50 linux-m9ry postfix/smtpd[18280]: read from B7FBA9E0 [B7FC8128] (11 bytes => -1 (0xFFFFFFFF))
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: read from B7FBA9E0 [B7FC8128] (11 bytes => 11 (0xB))
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0000 80 7a 01 03 01 00 51 .z....Q
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0007 - <SPACES/NULLS>
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: read from B7FBA9E0 [B7FC8133] (113 bytes => -1 (0xFFFFFFFF))
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: read from B7FBA9E0 [B7FC8133] (113 bytes => 113 (0x71))
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0000 00 00 39 00 00 38 00 00|35 00 00 16 00 00 13 00 ..9..8.. 5.......
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0010 00 0a 07 00 c0 00 00 33|00 00 32 00 00 2f 00 00 .......3 ..2../..
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0020 07 05 00 80 03 00 80 00|00 05 00 00 04 01 00 80 ........ ........
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0030 00 00 15 00 00 12 00 00|09 06 00 40 00 00 14 00 ........ ...@....
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0040 00 11 00 00 08 00 00 06|04 00 80 00 00 03 02 00 ........ ........
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0050 80 61 d2 f1 28 71 46 54|d9 23 93 b9 2d 6e 8a 32 .a..(qFT .#..-n.2
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0060 68 bb fa a3 e4 28 f1 d2|ca a1 90 11 6d 64 f5 3a h....(.. ....md.:
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0070 - <SPACES/NULLS>
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: write to B7FBA9E0 [B7FD64B0] (7 bytes => 7 (0x7))
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: 0000 15 03 01 00 02 02 28 ......(
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: SSL3 alert write:fatal:handshake failure
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: SSL_accept:error in SSLv3 read client hello B
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: SSL_accept:error in SSLv3 read client hello B
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: SSL_accept error from mycomputer.corp.company.com[441.212.55.56]: -1
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: warning: TLS library problem: 18280:error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher:s3_srvr.c:1006:
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: lost connection after STARTTLS from mycomputer.corp.company.com[441.212.55.56]
Aug 17 14:39:24 linux-m9ry postfix/smtpd[18280]: disconnect from mycomputer.corp.company.com[441.212.55.56]
================================================

I would really appreciate any advise or help with this. I can also provice the C++ client code if that is needed.

Thanks in advance.
 
Old 08-18-2010, 02:31 AM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Quote:
warning: TLS library problem: 18280:error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher:s3_srvr.c:1006
The documentation says:
Quote:
... Postfix supports configurations with no certificates. This entails the use of just the anonymous TLS ciphers, which are not supported by typical SMTP clients...
a certificate-less Postfix SMTP server will be unable to receive email from most TLS enabled clients.
Try to connect using s_client. A successful connection looks like this (postfix is configured with smtpd_tls_cert_file = none):

Code:
# specify anonymous ciphers explicitly 
[berhanie@machine ~]$ openssl s_client -starttls smtp -connect localhost:25 -cipher aNULL
CONNECTED(00000003)
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 634 bytes and written 318 bytes
---
New, TLSv1/SSLv3, Cipher is ADH-CAMELLIA256-SHA
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : ADH-CAMELLIA256-SHA
    ...

Last edited by Berhanie; 08-18-2010 at 03:22 AM.
 
1 members found this post helpful.
Old 08-19-2010, 10:28 AM   #3
lxvor
LQ Newbie
 
Registered: Jan 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Hi,

Thanks for that explanation. That is very useful.

I did get the TLS communication working with a server certificate.

Now I will try without certs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Fedora Directory Server not accepting new connections custangro Linux - Enterprise 5 03-26-2012 04:11 PM
Ubuntu server postfix TLS configuration dkiousis Linux - Server 4 03-05-2008 04:45 AM
Postfix smtp not accepting connections Spleenie Linux - Software 0 01-23-2005 05:04 AM
waiting for X server to begin accepting connections . redhat_zephyr Linux - Newbie 10 07-07-2003 11:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration