Looks like Outgoing SMTP mail works with stunnel now on FreeBSD...
From /var/log/messages
Jan 5 12:30:39 blue stunnel: LOG5[93914:134791168]: attsmtp accepted connection from 127.0.0.1:50315
Jan 5 12:30:40 blue stunnel: LOG5[93914:134791168]: attsmtp connected remote server from 192.168.X.XX:49408
Jan 5 12:30:40 blue stunnel: LOG5[93914:134791168]: CRL: verification passed
Jan 5 12:30:40 blue stunnel: LOG5[93914:134791168]: VERIFY OK: depth=0, /C=US/ST=California/L=Sant
a Clara/O=Yahoo! Inc./OU=Yahoo/CN=smtp.att.
yahoo.com
Jan 5 12:30:40 blue stunnel: LOG5[93914:134791168]: CRL: verification passed
from /var/log/maillog
Jan 5 12:24:53 blue sm-mta[99057]: n055qvuG095777: to=
, ctladdr= (1008/1008), delay=14:31:56, xdelay=00:00:00, mailer=relay, pri=3360530, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (ok 1231187335 qp 40759)
The solution was actually posted at:
http://qiaoyang.blogspot.com/2007/08/sendmail-auth-ssl-tunnel-att-yahoo.html
Some useful info missing is this link is that instead of editing the relay port directly in /etc/mail/sendmail.cf you can add the following line in /etc/mail/my.site.com.mc:
define(`RELAY_MAILER_ARGS', `TCP $h 2525')
Also from the link... I would still like to know what to write in /etc/mail/my.site.com.mc so I don't actually have to comment out the sendmail.cf file that reads:
R< $=w > $* $@ $2 delete local host
Another thing that was misleading from the link is that you can't make comments with:
! #
You should just use:
#
Also, my auth info for relay used root at the username. ie):
AuthInfo: "U:root" "I:[email protected]" "P:xxxxxx" "M:LOGIN PLAIN"
Also, because I had to edit the sendmail.cf file directly... From [/etc/mail] I had to do:
1. make all install restart
2. manually edit sendmail.cf to comment out the line mentioned above.
3. make restart
Aside from this last part the stunnel configuration was very confusing... I created folders and changed directories from the default configuration... ie) It does NOT work out of the box. Here are some of the commands I used to help configure:
/usr/local/etc/rc.d/stunnel restart
vi /var/log/messages
vi /usr/local/etc/stunnel/stunnel.conf
vi /usr/local/etc/rc.d/stunnel
vi /etc/rc.conf
ps aux |grep stunnel
netstat -na |grep LIST
And in stunnel.conf
-----------------------
[attsmtp]
client = yes
verify = 0
accept = 127.0.0.1:2525
connect = smtp.att.yahoo.com:465
delay = yes