Everything2
Near Matches
Ignore Exact
Full Text
Everything2

How to configure Sendmail to use SMTP AUTH in FreeBSD

created by wonko

(idea) by wonko (1.2 y) (print)   ?   (I like it!) Tue Nov 12 2002 at 20:45:45

This writeup describes how to configure Sendmail to use passwd-based SMTP AUTH under FreeBSD. It was written based on my experiences with FreeBSD 4.7-RELEASE, Sendmail 8.12.6 and Cyrus-SASL 1.5.27. YMMV

Install the Sendmail Source Distribution:

The first step is to make sure the necessary source distributions are installed. You'll need the contrib, lib and usbin source packages. If you've already got those installed, skip ahead and install Cyrus-SASL. Otherwise, follow the steps below:

# su
    (enter your root password)
# /stand/sysinstall

Choose Configure, then Distributions, then src. Select contrib, lib and usbin, then press OK and install the packages.

Install Cyrus-SASL:

Make sure you've updated your ports collection recently, then do this:

# cd /usr/ports/security/cyrus-sasl
# make install clean

From the menu that appears, select pwcheck (and any other authentication methods you want to play around with).

Configure Sendmail:

Edit /usr/local/lib/sasl/Sendmail.conf (create it if it doesn't already exist) and add this line:

pwcheck_method: passwd

Next, edit /etc/make.conf (create it if it doesn't already exist), and add these lines:

SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
    (that's "sasl1" as in "sas-L-one")
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl

Recompile Sendmail:

# cd /usr/src/lib/libsm
# make cleandir
# make obj
# make

# cd /usr/src/lib/libsmutil
# make cleandir
# make obj
# make

# cd /usr/src/usr.sbin/sendmail
# make cleandir
# make obj
# make
# make install

Edit Sendmail Configuration:

Your Sendmail configuration file is probably /etc/mail/<hostname>.mc, where "<hostname>" is the host name of your computer. If that's not the case, then you can just edit /etc/mail/freebsd.mc. Add the following lines to the file:

dnl SASL Options
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl
define(`confDEF_AUTH_INFO', `/etc/mail/auth-info')dnl

And to put the configuration changes into effect:

# cd /etc/mail
# make
# cp <hostname>.cf sendmail.cf
    (replace <hostname> with the name of your Sendmail config file)

One last command:

# killall -HUP sendmail

And we're done! You should now have a working installation of Sendmail with support for passwd-based SMTP authentication. Enjoy!


printable version
chaos

How to recover a lost FreeBSD root password ports collection Telnet to SMTP Servers FreeBSD
Arabic open SMTP relay Authentication su
YMMV SMTP AUTH sendmail passwd
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Things you could have written:
Tecumseh's Curse
Transformers Tech Specs
The revolution will not be webcast
E2 Quest: Copyright Redemption
Sei Shonagon
Japan
John Gotti
Bait al-Hikmah
Money laundering
Reading the Holy Bible
Why I did what I did
Destruction of Syntax - Imagination without Strings - Words-in-Freedom
Eight Drunken Immortals
New Writeups
fallensparks
George's Marvellous Medicine(thing)
Ctrl Y
cognitive dissonance(fiction)
SharQ
Gone Baby Gone(review)
halfWit
If I could, I'd title this "Freedom"(thing)
Roninspoon
Airline Hero(thing)
Ktistec
Why Women Are Always Cold(person)
doctor wilson
Drug policy reform(thing)
tejasa
Easy Raspberry Cheesecake(recipe)
Joysim
Drug policy reform(idea)
aneurin
Tyburn(place)
niruena
Boiling to death(idea)
artman2003
summer(thing)
doctor wilson
The Silver City and the Silent Sea(log)
Dreamvirus
The Silver City and the Silent Sea(poetry)
Aerobe
A nihilist's soulmate(poetry)
E2 is a by-product of the existence of The Everything Development Company