[stunnel-users] SSL_accept: Peer suddenly disconnected

James Brown jlbrown at bordo.com.au
Thu Dec 7 06:06:42 CET 2006


I'm trying to send an email through stunnel (which is running on the  
mail server), but I keep getting an error.

  $ sudo /usr/local/sbin/stunnel
2006.12.07 15:35:27 LOG7[6092:2684407744]: Snagged 64 random bytes  
from /Users/jlbrown/.rnd
2006.12.07 15:35:27 LOG7[6092:2684407744]: Wrote 1024 new random  
bytes to /Users/jlbrown/.rnd
2006.12.07 15:35:27 LOG7[6092:2684407744]: RAND_status claims  
sufficient entropy for the PRNG
2006.12.07 15:35:27 LOG7[6092:2684407744]: PRNG seeded successfully
2006.12.07 15:35:27 LOG7[6092:2684407744]: Certificate: /etc/postfix/ 
smtpd.cert
2006.12.07 15:35:27 LOG7[6092:2684407744]: Certificate loaded
2006.12.07 15:35:27 LOG7[6092:2684407744]: Key file: /etc/postfix/ 
smtpd.key
2006.12.07 15:35:27 LOG7[6092:2684407744]: Private key loaded
2006.12.07 15:35:27 LOG7[6092:2684407744]: SSL context initialized  
for service ssmtp
2006.12.07 15:35:27 LOG5[6092:2684407744]: stunnel 4.19 on i686-apple- 
darwin8.8.1 with OpenSSL 0.9.7l 28 Sep 2006
2006.12.07 15:35:27 LOG5[6092:2684407744]: Threading:PTHREAD  
SSL:ENGINE Sockets:SELECT,IPv4 Auth:LIBWRAP
2006.12.07 15:35:27 LOG6[6092:2684407744]: file ulimit = 256 (can be  
changed with 'ulimit -n')
2006.12.07 15:35:27 LOG6[6092:2684407744]: FD_SETSIZE = 1024 (some  
systems allow to increase this value)
2006.12.07 15:35:27 LOG5[6092:2684407744]: 125 clients allowed
2006.12.07 15:35:27 LOG7[6092:2684407744]: FD 6 in non-blocking mode
2006.12.07 15:35:27 LOG7[6092:2684407744]: FD 7 in non-blocking mode
2006.12.07 15:35:27 LOG7[6092:2684407744]: FD 8 in non-blocking mode
2006.12.07 15:35:27 LOG7[6092:2684407744]: SO_REUSEADDR option set on  
accept socket
2006.12.07 15:35:27 LOG7[6092:2684407744]: ssmtp bound to 0.0.0.0:465
2006.12.07 15:35:27 LOG7[6093:2684407744]: Created pid file /usr/ 
local/var/run/stunnel/stunnel.pid
2006.12.07 15:35:52 LOG7[6093:2684407744]: ssmtp accepted FD=9 from  
192.168.1.4:62929
2006.12.07 15:35:52 LOG7[6093:25188864]: ssmtp started
2006.12.07 15:35:52 LOG7[6093:25188864]: FD 9 in non-blocking mode
2006.12.07 15:35:52 LOG7[6093:25188864]: TCP_NODELAY option set on  
local socket
2006.12.07 15:35:52 LOG7[6093:25188864]: FD 10 in non-blocking mode
2006.12.07 15:35:52 LOG7[6093:25188864]: FD 11 in non-blocking mode
2006.12.07 15:35:52 LOG7[6093:25188864]: Connection from  
192.168.1.4:62929 permitted by libwrap
2006.12.07 15:35:52 LOG7[6093:2684407744]: Cleaning up the signal pipe
2006.12.07 15:35:52 LOG5[6093:25188864]: ssmtp accepted connection  
from 192.168.1.4:62929
2006.12.07 15:35:52 LOG6[6093:2684407744]: Child process 6094  
finished with code 0
2006.12.07 15:35:52 LOG7[6093:25188864]: SSL state (accept): before/ 
accept initialization
2006.12.07 15:35:52 LOG7[6093:25188864]: SSL state (accept): SSLv3  
read client hello A
2006.12.07 15:35:52 LOG7[6093:25188864]: SSL state (accept): SSLv3  
write server hello A
2006.12.07 15:35:52 LOG7[6093:25188864]: SSL state (accept): SSLv3  
write certificate A
2006.12.07 15:35:52 LOG7[6093:25188864]: SSL state (accept): SSLv3  
write server done A
2006.12.07 15:35:52 LOG7[6093:25188864]: SSL state (accept): SSLv3  
flush data
2006.12.07 15:35:52 LOG3[6093:25188864]: SSL_accept: Peer suddenly  
disconnected
2006.12.07 15:35:52 LOG5[6093:25188864]: Connection reset: 0 bytes  
sent to SSL, 0 bytes sent to socket
2006.12.07 15:35:52 LOG7[6093:25188864]: ssmtp finished (0 left)

My stunnel.conf is:

cert = /etc/postfix/smtpd.cert
key = /etc/postfix/smtpd.key
sslVersion = all
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
debug = 7
output = /var/log/stunnel.log
[ssmtp]
client = no
accept  = 465
connect = 25

Does this mean that the SMTP proxy listening on port 25 is not  
accepting the connection from stunnel?

Thanks,

James.




More information about the stunnel-users mailing list