ftp://ftp.andrew.cmu.edu/pub/cyrus-mail ... .25.tar.gz
2. Cyrus SASL requires phclient.h which is from "nph - PH Client and Programming API"
http://www.feep.net/nph/
nph installation is straightforward:
Code: Select all
configure
make
make install
"configure" went smoothly but "make" complained about conflict of MD5_CTX struct from /usr/sfw/include/openssl/evp.h (line 82-84). I had to temporarily remove those 3 lines and compiling moved on but stopped again asking for gssapi.h. I had to manually copy /usr/include/gssapi/gssapi.h to <PATH>/cyrus-sasl-2.1.25/include and then the compiling finally went through completely. "make install" went fine thereafter. sasl2 got installed into /usr/lib/ and /usr/include/.
03/30/2012 - CAH
When I was trying to compile this, it was complaining about a conflict of gethostname definition in lib/saslutil.c.
I had to disable the following line in it:
Code: Select all
//extern int gethostname(char *, int);
Sendmail rebuild
This needs several steps to get it to work:
1. Create a "site.config.m4" file in "<sendmail_src>/devtools/Site" and add the following entries(may or may not need the bottom 2 lines, I don't need them on cahtoh01):
Code: Select all
APPENDDEF(`confENVDEF', `-DSASL=2')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl2')
APPENDDEF(`confLIBDIRS', `-L/usr/local/lib')
APPENDDEF(`confINCDIRS', `-I/usr/local/include')
Code: Select all
# mkdir -p /etc/mail/auth
# chmod 700 /etc/mail/auth
# vi /etc/mail/auth/client-info
AuthInfo:outgoing.verizon.net "U:cahtoh@verizon.net" "I:cahtoh@verizon.net" "P:c4ht0h"
# cd /etc/mail/auth
# makemap dbm client-info < client-info
# chmod 600 client-info*
Code: Select all
define(`SMART_HOST',`outgoing.verizon.net')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN') dnl
dnl TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
FEATURE(`authinfo',`dbm /etc/mail/auth/client-info')dnl
Code: Select all
m4 /etc/mail/sendmail.mc.8.14 > /etc/mail/sendmail.cf.8.14.5
6. Start sendmail
Code: Select all
# /etc/init.d/sendmail start
# /usr/lib/sendmail -bd -q15m (if it did not come up automatically)
Code: Select all
%mail chang_an@yahoo.com
iiiire
.
Code: Select all
Feb 20 13:39:22 cahtoh01 sendmail[1584]: [ID 801593 mail.info] q1KLdM6m001584: from=cah, size=106, class=0, nrcpts=1, msgid=<201202202139.q1KLdM6m001584@cahtoh01.hsiao.net>, relay=root@localhost
Feb 20 13:39:22 cahtoh01 sendmail[1585]: [ID 801593 mail.info] q1KLdMVJ001585: from=<cah@cahtoh01.hsiao.net>, size=362, class=0, nrcpts=1, msgid=<201202202139.q1KLdM6m001584@cahtoh01.hsiao.net>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Feb 20 13:39:22 cahtoh01 sendmail[1584]: [ID 801593 mail.info] q1KLdM6m001584: to=chang_an@yahoo.com, ctladdr=cah (1001/14), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30106, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q1KLdMVJ001585 Message accepted for delivery)
Feb 20 13:39:27 cahtoh01 sendmail[1587]: [ID 801593 mail.info] q1KLdMVJ001585: to=<chang_an@yahoo.com>, ctladdr=<cah@cahtoh01.hsiao.net> (1001/14), delay=00:00:05, xdelay=00:00:05, mailer=relay, pri=120362, relay=outgoing.verizon.net. [206.46.232.12], dsn=2.0.0, stat=Sent (Ok, envelope id 0LZP00DJJO5610J1@vms173005.mailsrvcs.net)
8. Incoming mail test
reply from yahoo account and see following entries in /var/log/syslog:
Code: Select all
Feb 20 13:42:04 cahtoh01 sendmail[1588]: [ID 801593 mail.info] q1KLg38v001588: from=<chang_an@yahoo.com>, size=3934, class=0, nrcpts=1, msgid=<1329774100.19503.YahooMailNeo@web130105.mail.mud.yahoo.com>, proto=SMTP, daemon=MTA-v4, relay=nm12-vm0.bullet.mail.ne1.yahoo.com [98.138.91.51]
Feb 20 13:42:06 cahtoh01 sendmail[1589]: [ID 801593 mail.info] q1KLg38v001588: to=<cah@cahtoh01.hsiao.net>, delay=00:00:02, xdelay=00:00:02, mailer=local, pri=34167, dsn=2.0.0, stat=Sent
This is extremely important.
Why?
I can use the dynamic IP and run all servers at home without paying for the static IP!!
This may actually work!