Since sendmail doesn't have the capability of encrypting with SSL, stunnel is required.
I went to pkg.oracle.com and found the following stunnel package:
http://pkg.oracle.com/solaris/release/i ... 27T113739Z
Code: Select all
Name: service/security/stunnel
Summary: An SSL-encrypting socket wrapper
Publisher: solaris
Version: 4.29
Build Release: 5.11
Branch: 0.175.0.0.0.0.0
Packaging Date: Tue Sep 27 11:37:39 2011
Size: 460.41 kB
Compressed Size: 187.37 kB
FMRI: pkg://solaris/service/security/stunnel@4.29,5.11-0.175.0.0.0.0.0:20110927T113739Z
License:
Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
For the avoidance of doubt, except that if any license choice other
than GPL or LGPL is available it will apply instead, Oracle elects to
use only the General Public License version 2 (GPLv2) at this time
for any software where a choice of GPL license versions is made
available with the language indicating that GPLv2 or any later
version may be used, or where a choice of which version of the GPL
is applied is otherwise unspecified.
--------------------------------------------------------------------
Licensing and copyright information for stunnel:
License: GPLv2 License
You can find more information in the following directory:
/usr/share/doc/stunnel
COPYRIGHT: GPLv2
AUTHORS: List of contributors of stunnel
ChangeLog: List of all changes and authors of stunnel
README: More information about stunnel
The sources of stunnel-4.29 were downloaded
from http://stunnel.mirt.net/
Code: Select all
2013.11.08 19:29:02 LOG7[18902:1]: smtps accepted FD=13 from 127.0.0.1:43240
2013.11.08 19:29:02 LOG7[18902:4]: smtps started
2013.11.08 19:29:02 LOG7[18902:4]: FD 13 in non-blocking mode
2013.11.08 19:29:02 LOG7[18902:4]: Waiting for a libwrap process
2013.11.08 19:29:02 LOG7[18902:4]: Acquired libwrap process #0
2013.11.08 19:29:02 LOG7[18902:4]: Releasing libwrap process #0
2013.11.08 19:29:02 LOG7[18902:4]: Released libwrap process #0
2013.11.08 19:29:02 LOG4[18902:4]: smtps REFUSED by libwrap from 127.0.0.1:43240
2013.11.08 19:29:02 LOG7[18902:4]: See hosts_access(5) manual for details
2013.11.08 19:29:02 LOG5[18902:4]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2013.11.08 19:29:02 LOG7[18902:4]: smtps finished (0 left)
After I ran the following command, it connected to verizon!!
Code: Select all
%telnet relay 55555
Trying 127.0.0.1...
Connected to relay.
Escape character is '^]'.
220 vms173017pub.verizon.net -- Server ESMTP (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009))
...
Connection to relay closed by foreign host.
From a separate terminal, I saw:
Code: Select all
2013.11.08 19:39:34 LOG7[18949:1]: smtps accepted FD=13 from 127.0.0.1:60269
2013.11.08 19:39:34 LOG7[18949:3]: smtps started
2013.11.08 19:39:34 LOG7[18949:3]: FD 13 in non-blocking mode
2013.11.08 19:39:34 LOG7[18949:3]: Waiting for a libwrap process
2013.11.08 19:39:34 LOG7[18949:3]: Acquired libwrap process #0
2013.11.08 19:39:34 LOG7[18949:3]: Releasing libwrap process #0
2013.11.08 19:39:34 LOG7[18949:3]: Released libwrap process #0
2013.11.08 19:39:34 LOG7[18949:3]: smtps permitted by libwrap from 127.0.0.1:60269
2013.11.08 19:39:34 LOG5[18949:3]: smtps accepted connection from 127.0.0.1:60269
2013.11.08 19:39:34 LOG7[18949:3]: FD 14 in non-blocking mode
2013.11.08 19:39:34 LOG6[18949:3]: connect_blocking: connecting 206.46.232.100:465
2013.11.08 19:39:34 LOG7[18949:3]: connect_blocking: s_poll_wait 206.46.232.100:465: waiting 10 seconds
2013.11.08 19:39:34 LOG5[18949:3]: connect_blocking: connected 206.46.232.100:465
2013.11.08 19:39:34 LOG5[18949:3]: smtps connected remote server from 192.168.1.225:51826
2013.11.08 19:39:34 LOG7[18949:3]: Remote FD=14 initialized
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): before/connect initialization
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 write client hello A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 read server hello A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 read server certificate A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 read server key exchange A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 read server done A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 write client key exchange A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 write change cipher spec A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 write finished A
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 flush data
2013.11.08 19:39:34 LOG7[18949:3]: SSL state (connect): SSLv3 read finished A
2013.11.08 19:39:34 LOG7[18949:3]: 2 items in the session cache
2013.11.08 19:39:34 LOG7[18949:3]: 2 client connects (SSL_connect())
2013.11.08 19:39:34 LOG7[18949:3]: 2 client connects that finished
2013.11.08 19:39:34 LOG7[18949:3]: 0 client renegotiations requested
2013.11.08 19:39:34 LOG7[18949:3]: 0 server connects (SSL_accept())
2013.11.08 19:39:34 LOG7[18949:3]: 0 server connects that finished
2013.11.08 19:39:34 LOG7[18949:3]: 0 server renegotiations requested
2013.11.08 19:39:34 LOG7[18949:3]: 0 session cache hits
2013.11.08 19:39:34 LOG7[18949:3]: 0 external session cache hits
2013.11.08 19:39:34 LOG7[18949:3]: 0 session cache misses
2013.11.08 19:39:34 LOG7[18949:3]: 0 session cache timeouts
2013.11.08 19:39:34 LOG6[18949:3]: SSL connected: new session negotiated
2013.11.08 19:39:34 LOG6[18949:3]: Negotiated ciphers: DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
...
2013.11.08 19:40:34 LOG7[18949:3]: SSL alert (read): warning: close notify
2013.11.08 19:40:34 LOG7[18949:3]: SSL closed on SSL_read
2013.11.08 19:40:34 LOG7[18949:3]: Socket write shutdown
2013.11.08 19:40:34 LOG7[18949:3]: Socket closed on read
2013.11.08 19:40:34 LOG7[18949:3]: SSL write shutdown
2013.11.08 19:40:34 LOG7[18949:3]: SSL alert (write): warning: close notify
2013.11.08 19:40:34 LOG6[18949:3]: SSL_shutdown successfully sent close_notify
2013.11.08 19:40:34 LOG5[18949:3]: Connection closed: 0 bytes sent to SSL, 166 bytes sent to socket
2013.11.08 19:40:34 LOG7[18949:3]: smtps finished (0 left)
/etc/stunnel/stunnel.conf:
Code: Select all
client = yes
# The following parameters are used for troubleshooting
#debug = 7
#foreground = yes
[smtps]
#accept=relay.hsiao.net:55555
accept=55555
connect=smtp.verizon.net:465