I am running Stunnel 5.14 on my Mac mail server (OS X 10.7.5), but trying to send emails using ports 465 & 587 does not work:

Mail.app says:

Mail was unable to connect to server “mail.bordo.com.au” using SSL on port 587. Verify that this server supports SSL and that your account settings are correct.

Log from Stunnel is:

2015.03.31 09:27:56 LOG7[ui]: Clients allowed=500
2015.03.31 09:27:56 LOG5[ui]: stunnel 5.14 on x86_64-apple-darwin11.4.2 platform
2015.03.31 09:27:56 LOG5[ui]: Compiled/running with OpenSSL 1.0.2a 19 Mar 2015
2015.03.31 09:27:56 LOG5[ui]: Threading:PTHREAD Sockets:SELECT,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI Auth:LIBWRAP
2015.03.31 09:27:56 LOG7[ui]: errno: (*__error())
2015.03.31 09:27:56 LOG5[ui]: Reading configuration from file /usr/local/etc/stunnel/stunnel.conf
2015.03.31 09:27:56 LOG5[ui]: UTF-8 byte order mark not detected
2015.03.31 09:27:56 LOG5[ui]: FIPS mode disabled
2015.03.31 09:27:56 LOG7[ui]: Compression disabled
2015.03.31 09:27:56 LOG7[ui]: Snagged 64 random bytes from /dev/urandom
2015.03.31 09:27:56 LOG7[ui]: PRNG seeded successfully
2015.03.31 09:27:56 LOG6[ui]: Initializing service [ssmtp]
2015.03.31 09:27:56 LOG6[ui]: Loading certificate from file: /usr/local/etc/postfix/smtpd.cert
2015.03.31 09:27:56 LOG6[ui]: Loading key from file: /usr/local/etc/postfix/smtpd.key
2015.03.31 09:27:56 LOG7[ui]: Private key check succeeded
2015.03.31 09:27:56 LOG7[ui]: DH initialization
2015.03.31 09:27:56 LOG7[ui]: Using DH parameters from /usr/local/etc/postfix/smtpd.cert
2015.03.31 09:27:56 LOG7[ui]: DH initialized with 2048-bit key
2015.03.31 09:27:56 LOG7[ui]: ECDH initialization
2015.03.31 09:27:56 LOG7[ui]: ECDH initialized with curve prime256v1
2015.03.31 09:27:56 LOG7[ui]: SSL options: 0x03000004 (+0x03000000, -0x00000000)
2015.03.31 09:27:56 LOG6[ui]: Initializing service [ssmtp2]
2015.03.31 09:27:56 LOG6[ui]: Loading certificate from file: /usr/local/etc/postfix/smtpd.cert
2015.03.31 09:27:56 LOG6[ui]: Loading key from file: /usr/local/etc/postfix/smtpd.key
2015.03.31 09:27:56 LOG7[ui]: Private key check succeeded
2015.03.31 09:27:56 LOG7[ui]: DH initialization
2015.03.31 09:27:56 LOG7[ui]: Using DH parameters from /usr/local/etc/postfix/smtpd.cert
2015.03.31 09:27:56 LOG7[ui]: DH initialized with 2048-bit key
2015.03.31 09:27:56 LOG7[ui]: ECDH initialization
2015.03.31 09:27:56 LOG7[ui]: ECDH initialized with curve prime256v1
2015.03.31 09:27:56 LOG7[ui]: SSL options: 0x03000004 (+0x03000000, -0x00000000)
2015.03.31 09:27:56 LOG5[ui]: Configuration successful
2015.03.31 09:27:56 LOG7[ui]: Listening file descriptor created (FD=6)
2015.03.31 09:27:56 LOG7[ui]: Service [ssmtp] (FD=6) bound to 0.0.0.0:465
2015.03.31 09:27:56 LOG7[ui]: Listening file descriptor created (FD=7)
2015.03.31 09:27:56 LOG7[ui]: Service [ssmtp2] (FD=7) bound to 0.0.0.0:587


/usr/local/etc/stunnel/stunnel.conf has:

[ssmtp]
client = no
accept  = 465
connect = 127.0.0.1:25

[ssmtp2]
client = no
accept  = 587
connect = 127.0.0.1:25

The mail server is running on the same machine.

I can send emails using port 25 with no SSL. (I have to have the ‘Allow insecure authentication’ ticked).

When I try to send using ports 587 or 465 there is nothing logged by stunnel (or anywhere else that I can see).

Firewall is not blocking anything:

sudo ipfw list
65535 allow ip from any to any

Postfix is the SMTP server, Dovecot for IMAP.

Any suggestions?

Thanks,

James.