<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://plnx.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Sendmail_Config_Authenticated_SMTP</id>
	<title>Sendmail Config Authenticated SMTP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://plnx.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Sendmail_Config_Authenticated_SMTP"/>
	<link rel="alternate" type="text/html" href="https://plnx.nl/wiki/index.php?title=Sendmail_Config_Authenticated_SMTP&amp;action=history"/>
	<updated>2026-05-03T12:44:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.6</generator>
	<entry>
		<id>https://plnx.nl/wiki/index.php?title=Sendmail_Config_Authenticated_SMTP&amp;diff=13&amp;oldid=prev</id>
		<title>Pverha10: Created page with &quot;I made the following configuration:   * Sendmail SMTP (listening on port 25 and SSL port 465)&lt;br&gt; * Authentication through cyrus-sasl2 (listening on socket /var/state/saslauthd/mux)&lt;br&gt; * Authentication through pam (with the pam_radius module)&lt;br&gt; * Authentication with FreeRadius (for now in the users file)&lt;br&gt;  So for this configuration to work you need FreeRadius, pam_radius, Linux-PAM, cyrus-sasl2 and sendmail.  N.B.: I did this in my favourite distro Slackware. (13.3...&quot;</title>
		<link rel="alternate" type="text/html" href="https://plnx.nl/wiki/index.php?title=Sendmail_Config_Authenticated_SMTP&amp;diff=13&amp;oldid=prev"/>
		<updated>2025-05-17T07:41:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;I made the following configuration:   * Sendmail SMTP (listening on port 25 and SSL port 465)&amp;lt;br&amp;gt; * Authentication through cyrus-sasl2 (listening on socket /var/state/saslauthd/mux)&amp;lt;br&amp;gt; * Authentication through pam (with the pam_radius module)&amp;lt;br&amp;gt; * Authentication with FreeRadius (for now in the users file)&amp;lt;br&amp;gt;  So for this configuration to work you need FreeRadius, pam_radius, Linux-PAM, cyrus-sasl2 and sendmail.  N.B.: I did this in my favourite distro Slackware. (13.3...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I made the following configuration:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Sendmail SMTP (listening on port 25 and SSL port 465)&amp;lt;br&amp;gt;&lt;br /&gt;
* Authentication through cyrus-sasl2 (listening on socket /var/state/saslauthd/mux)&amp;lt;br&amp;gt;&lt;br /&gt;
* Authentication through pam (with the pam_radius module)&amp;lt;br&amp;gt;&lt;br /&gt;
* Authentication with FreeRadius (for now in the users file)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So for this configuration to work you need FreeRadius, pam_radius, Linux-PAM, cyrus-sasl2 and sendmail.&lt;br /&gt;
&lt;br /&gt;
N.B.: I did this in my favourite distro Slackware. (13.37)&lt;br /&gt;
&lt;br /&gt;
=FreeRadius=&lt;br /&gt;
&lt;br /&gt;
I used the slackbuild from http://slackbuilds.org/repository/13.37/network/freeradius-server/&lt;br /&gt;
&lt;br /&gt;
No problems there.&lt;br /&gt;
And after installing added a testuser &amp;#039;testuser&amp;#039; with password &amp;#039;password&amp;#039; to /etc/raddb/users&lt;br /&gt;
&lt;br /&gt;
Just to be sure it worked I started freeradius and tested the server by using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
radtest testuser password 127.0.0.1 1812 testing123&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should get something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=131, length=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=PAM-Linux=&lt;br /&gt;
&lt;br /&gt;
Unfortunately http://slackbuilds.org/mirror/slackware/slackware-13.37/extra/source/pam/pam.SlackBuild didn&amp;#039;t work for me, so I built it myself with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget --no-check-certificate https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-1.1.5.tar.bz2&lt;br /&gt;
tar -jxf Linux-PAM-1.1.5.tar.bz2&lt;br /&gt;
cd Linux-PAM-1.1.5&lt;br /&gt;
./configure --disable-nis --disable-selinux --disable-nls --prefix=/usr&lt;br /&gt;
make ; make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=pam_radius=&lt;br /&gt;
Download from: http://freeradius.org/pam_radius_auth/&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget ftp://ftp.freeradius.org/pub/radius/pam_radius-1.3.17.tar.gz&lt;br /&gt;
tar -zxf pam_radius-1.3.17.tar.gz&lt;br /&gt;
cd pam_radius-1.3.17&lt;br /&gt;
make&lt;br /&gt;
cp -a pam_radius_auth.so /lib/security/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File /etc/raddb/server contains:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#  pam_radius_auth configuration file.  Copy to: /etc/raddb/server&lt;br /&gt;
#&lt;br /&gt;
#  For proper security, this file SHOULD have permissions 0600,&lt;br /&gt;
#  that is readable by root, and NO ONE else.  If anyone other than&lt;br /&gt;
#  root can read this file, then they can spoof responses from the server!&lt;br /&gt;
#&lt;br /&gt;
#  There are 3 fields per line in this file.  There may be multiple&lt;br /&gt;
#  lines.  Blank lines or lines beginning with &amp;#039;#&amp;#039; are treated as&lt;br /&gt;
#  comments, and are ignored.  The fields are:&lt;br /&gt;
#&lt;br /&gt;
#  server[:port] secret [timeout]&lt;br /&gt;
#&lt;br /&gt;
#  the port name or number is optional.  The default port name is&lt;br /&gt;
#  &amp;quot;radius&amp;quot;, and is looked up from /etc/services The timeout field is&lt;br /&gt;
#  optional.  The default timeout is 3 seconds.&lt;br /&gt;
#&lt;br /&gt;
#  If multiple RADIUS server lines exist, they are tried in order.  The&lt;br /&gt;
#  first server to return success or failure causes the module to return&lt;br /&gt;
#  success or failure.  Only if a server fails to response is it skipped,&lt;br /&gt;
#  and the next server in turn is used.&lt;br /&gt;
#&lt;br /&gt;
#  The timeout field controls how many seconds the module waits before&lt;br /&gt;
#  deciding that the server has failed to respond.&lt;br /&gt;
#&lt;br /&gt;
# server[:port] shared_secret      timeout (s)&lt;br /&gt;
127.0.0.1:1812  testing123             1&lt;br /&gt;
#other-server    other-secret       3&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# having localhost in your radius configuration is a Good Thing.&lt;br /&gt;
#&lt;br /&gt;
# See the INSTALL file for pam.conf hints.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I also made a file called /etc/pam.d/other with the following content:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth       sufficient   /lib/security/pam_radius_auth.so&lt;br /&gt;
account    sufficient   /lib/security/pam_radius_auth.so&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=cyrus-sasl2=&lt;br /&gt;
&lt;br /&gt;
Unfortunately pam support has been excluded from the default cyrus-sasl2 package from slackware 13.37, because the pam package isn&amp;#039;t included in slackware.&lt;br /&gt;
That&amp;#039;s why you need to rebuild it to include pam support. There&amp;#039;s a slackbuild you can adapt at:&lt;br /&gt;
http://slackbuilds.org/mirror/slackware/slackware-13.37/source/n/cyrus-sasl/&lt;br /&gt;
&lt;br /&gt;
Just include --with-pam \ in the configuration line.&lt;br /&gt;
&lt;br /&gt;
After you start &amp;#039;saslauthd -a pam&amp;#039;, you can test the authentication with &amp;#039;testsaslauthd -u user -p password -s Sendmail&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Sendmail=&lt;br /&gt;
Just adapt the sendmail-slackware-tls-sasl.mc a bit. It should contain at least something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dnl# Allow SASL authentication/relaying:&lt;br /&gt;
define(`confAUTH_OPTIONS&amp;#039;, `A p y&amp;#039;)dnl&lt;br /&gt;
define(`confAUTH_MECHANISMS&amp;#039;, `LOGIN PLAIN&amp;#039;)dnl&lt;br /&gt;
TRUST_AUTH_MECH(`LOGIN PLAIN&amp;#039;)dnl&lt;br /&gt;
DAEMON_OPTIONS(`Port=smtp, Name=MTA&amp;#039;)dnl&lt;br /&gt;
dnl# Daemon options after M= below that might need to be changed are:&lt;br /&gt;
dnl# s (allow SSL, not only TLS)&lt;br /&gt;
dnl# a (require authentication)&lt;br /&gt;
DAEMON_OPTIONS(`Port=smtps, Name=MSA-SSL, M=Esa&amp;#039;)dnl&lt;br /&gt;
LOCAL_CONFIG&lt;br /&gt;
dnl# Do not allow the weak SSLv2:&lt;br /&gt;
O CipherList=ALL:!ADH:!NULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:-LOW:+SSLv3:+TLSv1:-SSLv2:+EXP:+eNULL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create /etc/sasl2/Sendmail.conf with the following content:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pwcheck_method:saslauthd&lt;br /&gt;
mech_list: PLAIN LOGIN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Oh, and you can not use CRAM-MD5 and/or DIGEST-MD5, because you&amp;#039;d need to be able to read the password in plaintext somewhere: http://www.phwinfo.com/forum/comp-mail-sendmail/527486-sendmail-cyrus-sasl-authentication-mystery.html&lt;/div&gt;</summary>
		<author><name>Pverha10</name></author>
	</entry>
</feed>