E-mail, graphical and otherwise

Jim Mock mij at soupnazi.org
Sun May 11 01:00:03 PDT 2003


On Saturday, May 10, 2003, at 05:02  PM, Ernest H. Rice wrote:

[snip...]

> As spammers have appeared, my ISp has tightened the security on the 
> system they allow to relay through them. They now require 
> authentication.
>
> With the graphical mailers, this is not a problem. I select 
> Authenticated SMTP for outgoing and POP for incoming and everything 
> works well.
>
> The command line is another story. When I configure sendmail to do the 
> smart host, and I generate email from the command line there is no 
> authentication being performed, AND to make matters worse, my ISP's 
> machine insists on being able to perform a reverse lookup of my IP 
> address to let me relay. Like most people, I have broadband at the 
> home-office, and with that I have a dynamic IP. The dynamic IP makes 
> the reverse lookup fail. That coupled with the lack of authentication 
> has been causing me great pain for some time now.

You need to set up sendmail to authenticate with your ISP's server, not 
your mail client.  You'll need to do the following:

Install /usr/ports/security/cyrus-sasl2.

In /etc/make.conf:

SENDMAIL_MC=		/etc/mail/hostname.mc
SENDMAIL_CFLAGS=		-I/usr/local/include -DSASL=2
SENDMAIL_LDFLAGS+=	-L/usr/local/lib
SENDMAIL_LDADD+=		-lsasl2

Rebuild sendmail and friends (or just make world):

# cd /usr/src/lib/libsm
# make obj && make depend && make
# cd /usr/src/lib/libsmutil
# make obj && make depend && make
# cd /usr/src/usr.sbin/sendmail
# make obj && make depend && make && make install

Add something like the following in your hostname.mc file:

TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')
define(`SMART_HOST', `smtp.yourisp.com')
define(`confDONT_BLAME_SENDMAIL', `GroupReadableSASLDBFile')
define(`confDEF_AUTH_INFO', `/etc/mail/auth-info')

In /etc/mail/auth-info, put something like:

AuthInfo:smtp.yourisp.com "U:username" "P:password" "R:smtp.yourisp.com"

Regenerate sendmail.cf and restart sendmail:

# cd /etc/mail
# make install
# make restart

I think I got everything.  If I missed something, you'll notice :-)  If 
you have problems, Google is your friend.

- jim

-- 
- jim mock  mij@{soupnazi|opendarwin}.org  jim@{bsdnews|FreeBSD}.org -
- editor in chief, BSD News: http://bsdnews.org  http://soupnazi.org -



More information about the freebsd-questions mailing list