1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3 4<head> 5 6<title>Postfix SASL Howto</title> 7 8<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> 9 10</head> 11 12<body> 13 14<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix SASL Howto</h1> 15 16<hr> 17 18<h2>Warning</h2> 19 20<p> People who go to the trouble of installing Postfix may have the 21expectation that Postfix is more secure than some other mailers. 22The Cyrus SASL library contains a lot of code. With this, Postfix 23becomes as secure as other mail systems that use the Cyrus SASL 24library. Dovecot provides an alternative that may be worth 25considering. </p> 26 27<h2><a name="intro">How Postfix uses SASL authentication</a></h2> 28 29<p> SMTP servers need to decide whether an SMTP client is authorized 30to send mail to remote destinations, or only to destinations that 31the server itself is responsible for. Usually, SMTP servers accept 32mail to remote destinations when the client's IP address is in the 33"same network" as the server's IP address. </p> 34 35<p> SMTP clients outside the SMTP server's network need a different 36way to get "same network" privileges. To address this need, Postfix 37supports SASL authentication (RFC 4954, formerly RFC 2554). With 38this a remote SMTP client can authenticate to the Postfix SMTP 39server, and the Postfix SMTP client can authenticate to a remote 40SMTP server. Once a client is authenticated, a server can give it 41"same network" privileges. </p> 42 43<p> Postfix does not implement SASL itself, but instead uses existing 44implementations as building blocks. This means that some SASL-related 45configuration files will belong to Postfix, while other 46configuration files belong to the specific SASL 47implementation that Postfix will use. This document covers both the 48Postfix and non-Postfix configuration. </p> 49 50<p> You can read more about the following topics: </p> 51 52<ul> 53 54<li><a href="#server_sasl">Configuring SASL authentication in the 55Postfix SMTP server</a></li> 56 57<li><a href="#client_sasl">Configuring SASL authentication in the Postfix SMTP/LMTP client</a></li> 58 59<li><a href="#postfix_build">Building Postfix with SASL support</a></li> 60 61<li><a href="#cyrus_legacy">Using Cyrus SASL version 1.5.x</a></li> 62 63<li><a href="#credits">Credits</a></li> 64 65</ul> 66 67<h2><a name="server_sasl">Configuring SASL authentication in the 68Postfix SMTP server</a></h2> 69 70<p> As mentioned earlier, SASL is implemented separately from 71Postfix. For this reason, configuring SASL authentication in the 72Postfix SMTP server involves two different steps: </p> 73 74<ul> 75 76<li> <p> Configuring the SASL implementation to offer a list of 77mechanisms that are suitable for SASL authentication and, depending 78on the SASL implementation used, configuring authentication backends 79that verify the remote SMTP client's authentication data against 80the system password file or some other database. </p> </li> 81 82<li> <p> Configuring the Postfix SMTP server to enable SASL 83authentication, and to authorize clients to relay mail or to control 84what envelope sender addresses the client may use. </p> </li> 85 86</ul> 87 88<p> Successful authentication in the Postfix SMTP server requires 89a functional SASL framework. Configuring SASL should therefore 90always be the first step, before configuring Postfix. </p> 91 92<p> You can read more about the following topics: </p> 93 94<ul> 95 96<li><a href="#server_which">Which SASL Implementations are 97supported?</a></li> 98 99<li><a href="#server_dovecot">Configuring Dovecot SASL</a> 100 101<ul> 102 103<li><a href="#server_dovecot_comm">Postfix to Dovecot SASL 104communication</a></li> 105 106</ul> </li> 107 108<li><a href="#server_cyrus">Configuring Cyrus SASL</a> 109 110<ul> 111 112<li><a href="#server_cyrus_name">Cyrus SASL configuration file 113name</a></li> 114 115<li><a href="#server_cyrus_location">Cyrus SASL configuration 116file location</a></li> 117 118<li><a href="#server_cyrus_comm">Postfix to Cyrus SASL 119communication</a></li> 120 121</ul> </li> 122 123<li><a href="#server_sasl_enable">Enabling SASL authentication and 124authorization in the Postfix SMTP server</a> 125 126<ul> 127 128<li><a href="#server_sasl_authc">Enabling SASL authentication in 129the Postfix SMTP server</a></li> 130 131<li><a href="#smtpd_sasl_security_options">Postfix SMTP Server 132policy - SASL mechanism properties</a></li> 133 134<li><a href="#server_sasl_authz">Enabling SASL authorization in the 135Postfix SMTP server</a></li> 136 137<li><a href="#server_sasl_other">Additional SMTP Server SASL 138options</a></li> 139 140</ul></li> 141 142<li><a href="#server_test">Testing SASL authentication in the Postfix 143SMTP server</a></li> 144 145</ul> 146 147 148<h3><a name="server_which">Which SASL Implementations are 149supported?</a></h3> 150 151<p> Currently the Postfix SMTP server supports the Cyrus SASL and 152Dovecot SASL implementations. </p> 153 154<blockquote> 155 156<strong>Note</strong> 157 158<p> Current Postfix versions have a plug-in architecture that can 159support multiple SASL implementations. Before Postfix version 2.3, 160Postfix had support only for Cyrus SASL. </p> 161 162</blockquote> 163 164<p> To find out what SASL implementations are compiled into Postfix, 165use the following commands: </p> 166 167<blockquote> 168<pre> 169% <strong><code>postconf -a</code></strong> (SASL support in the SMTP server) 170% <strong><code>postconf -A</code></strong> (SASL support in the SMTP+LMTP client) 171</pre> 172</blockquote> 173 174<p> These commands are available only with Postfix version 2.3 and 175later. </p> 176 177<h3><a name="server_dovecot">Configuring Dovecot SASL</a></h3> 178 179<p> Dovecot is a POP/IMAP server that has its own configuration to 180authenticate POP/IMAP clients. When the Postfix SMTP server uses 181Dovecot SASL, it reuses parts of this configuration. Consult the 182<a href="http://wiki.dovecot.org">Dovecot documentation</a> for how 183to configure and operate the Dovecot authentication server. </p> 184 185<h4><a name="server_dovecot_comm">Postfix to Dovecot SASL communication</a></h4> 186 187<p> Communication between the Postfix SMTP server and Dovecot SASL 188happens over a UNIX-domain socket or over a TCP socket. We will 189be using a UNIX-domain socket for better privacy. </p> 190 191<p> The following fragment for Dovecot version 2 assumes that the 192Postfix queue is under <code>/var/spool/postfix/</code>. </p> 193 194<blockquote> 195<pre> 196 1 conf.d/10-master.conf: 197 2 service auth { 198 3 ... 199 4 unix_listener /var/spool/postfix/private/auth { 200 5 mode = 0660 201 6 # Assuming the default Postfix user and group 202 7 user = postfix 203 8 group = postfix 204 9 } 20510 ... 20611 } 20712 20813 conf.d/10-auth.conf 20914 auth_mechanisms = plain login 210</pre> 211</blockquote> 212 213<p> Line 4 places the Dovecot SASL socket in 214<code>/var/spool/postfix/private/auth</code>, lines 5-8 limit 215read+write permissions to user and group <code>postfix</code> only, 216and line 14 provides <code>plain</code> and <code>login</code> as 217mechanisms for the Postfix SMTP server. </p> 218 219<p> Proceed with the section "<a href="#server_sasl_enable">Enabling 220SASL authentication and authorization in the Postfix SMTP server</a>" 221to turn on and use SASL in the Postfix SMTP server. </p> 222 223<h3><a name="server_cyrus">Configuring Cyrus SASL</a></h3> 224 225<p> The Cyrus SASL framework supports a wide variety of applications 226(POP, IMAP, SMTP, etc.). Different applications may require different 227configurations. As a consequence each application may have its own 228configuration file. </p> 229 230<p> The first step configuring Cyrus SASL is to determine name and 231location of a configuration file that describes how the Postfix 232SMTP server will use the SASL framework. </p> 233 234<h4><a name="server_cyrus_name">Cyrus SASL configuration file name</a></h4> 235 236<p> The name of the configuration file (default: <code>smtpd.conf</code>) 237is configurable. It is a concatenation from a value that the Postfix 238SMTP server sends to the Cyrus SASL library, and the suffix 239<code>.conf</code>, added by Cyrus SASL. </p> 240 241<p> The value sent by Postfix is the name of the server component 242that will use Cyrus SASL. It defaults to <code>smtpd</code> and 243is configured with one of the following variables: </p> 244 245<blockquote> 246<pre> 247/etc/postfix/main.cf: 248 # Postfix 2.3 and later 249 smtpd_sasl_path = smtpd 250 251 # Postfix < 2.3 252 smtpd_sasl_application_name = smtpd 253</pre> 254</blockquote> 255 256<h4><a name="server_cyrus_location">Cyrus SASL configuration file 257location</a></h4> 258 259<p> The location where Cyrus SASL searches for the named file depends 260on the Cyrus SASL version and the OS/distribution used. </p> 261 262<p> You can read more about the following topics: </p> 263 264<ul> 265 266<li> <p> Cyrus SASL version 2.x searches for the configuration file 267in <code>/usr/lib/sasl2/</code>. </p> </li> 268 269<li> <p> Cyrus SASL version 2.1.22 and newer additionally search 270in <code>/etc/sasl2/</code>. </p> </li> 271 272<li> <p> Some Postfix distributions are modified and look for the 273Cyrus SASL configuration file in <code>/etc/postfix/sasl/</code>, 274<code>/var/lib/sasl2/</code> etc. See the distribution-specific 275documentation to determine the expected location. </p> </li> 276 277</ul> 278 279<blockquote> 280 281<strong>Note</strong> 282 283<p> Cyrus SASL searches <code>/usr/lib/sasl2/</code> first. If it 284finds the specified configuration file there, it will not examine 285other locations. </p> 286 287</blockquote> 288 289<h4><a name="server_cyrus_comm">Postfix to Cyrus SASL communication</a></h4> 290 291<p> As the Postfix SMTP server is linked with the Cyrus SASL library 292<code>libsasl</code>, communication between Postfix and Cyrus SASL 293takes place by calling functions in the SASL library. </p> 294 295<p> The SASL library may use an external password verification 296service, or an internal plugin to connect to authentication backends 297and verify the SMTP client's authentication data against the system 298password file or other databases. </p> 299 300<p> The following table shows typical combinations discussed in 301this document: </p> 302 303<blockquote> 304 305<table border="1"> 306 307<tr> 308 309<th align="center">authentication backend</th> 310 311<th align="center">password verification service / plugin</th> 312 313</tr> 314 315<tr> 316 317<td>/etc/shadow</td> 318 319<td><a href="#saslauthd">saslauthd</a></td> 320 321</tr> 322 323<tr> 324 325<td>PAM</td> 326 327<td><a href="#saslauthd">saslauthd</a></td> 328 329</tr> 330 331<tr> 332 333<td>IMAP server</td> 334 335<td><a href="#saslauthd">saslauthd</a></td> 336 337</tr> 338 339<tr> 340 341<td>sasldb</td> 342 343<td><a href="#auxprop_sasldb">sasldb</a></td> 344 345</tr> 346 347<tr> 348 349<td>MySQL, PostgreSQL, SQLite</td> 350 351<td><a href="#auxprop_sql">sql</a></td> 352 353</tr> 354 355<tr> 356 357<td>LDAP</td> 358 359<td><a href="#auxprop_ldapdb">ldapdb</a></td> 360 361</tr> 362 363</table> 364 365</blockquote> 366 367<blockquote> 368 369<strong>Note</strong> 370 371<p> Read the Cyrus SASL documentation for other backends it can 372use. </p> 373 374</blockquote> 375 376<h4><a name="saslauthd">saslauthd - Cyrus SASL password verification service</a></h4> 377 378<p> Communication between the Postfix SMTP server (read: Cyrus SASL's 379<code>libsasl</code>) and the <code>saslauthd</code> server takes 380place over a UNIX-domain socket. </p> 381 382<p> <code>saslauthd</code> usually establishes the UNIX domain 383socket in <code>/var/run/saslauthd/</code> and waits for authentication 384requests. The Postfix SMTP server must have read+execute permission 385to this directory or authentication attempts will fail. </p> 386 387<blockquote> 388 389<strong>Important</strong> 390 391<p> Some distributions require the user <code>postfix</code> to be 392member of a special group e.g. <code>sasl</code>, otherwise it 393will not be able to access the <code>saslauthd</code> socket 394directory. </p> 395 396</blockquote> 397 398<p> The following example configures the Cyrus SASL library to 399contact <code>saslauthd</code> as its password verification service: 400</p> 401 402<blockquote> 403<pre> 404/etc/sasl2/smtpd.conf: 405 pwcheck_method: saslauthd 406 mech_list: PLAIN LOGIN 407</pre> 408</blockquote> 409 410<blockquote> 411 412<strong>Important</strong> 413 414<p> Do not specify any other mechanisms in <code>mech_list</code> 415than <code>PLAIN</code> or <code>LOGIN</code> when using 416<code>saslauthd</code>! It can only handle these two mechanisms, 417and authentication will fail if clients are allowed to choose other 418mechanisms. </p> 419 420</blockquote> 421 422<blockquote> 423 424<strong>Important</strong> 425 426<p> Plaintext mechanisms (<code>PLAIN</code>, <code>LOGIN</code>) 427send credentials unencrypted. This information should be protected 428by an additional security layer such as a TLS-encrypted SMTP session 429(see: TLS_README). </p> 430 431</blockquote> 432 433<p> Additionally the <code>saslauthd</code> server itself must be 434configured. It must be told which authentication backend to turn 435to for password verification. The backend is selected with a 436<code>saslauthd</code> command-line option and will be shown in the 437following examples. </p> 438 439<blockquote> 440 441<strong>Note</strong> 442 443<p> Some distributions use a configuration file to provide saslauthd 444command line options to set e.g. the authentication backend. Typical 445locations are <code>/etc/sysconfig/saslauthd</code> or 446<code>/etc/default/saslauthd</code>. </p> 447 448</blockquote> 449 450<h4><a name="saslauthd_shadow">Using saslauthd with /etc/shadow</a></h4> 451 452<p> Access to the <code>/etc/shadow</code> system password file 453requires <code>root</code> privileges. The Postfix SMTP server 454(and in consequence <code>libsasl</code> linked to the server) runs 455with the least privilege possible. Direct access to 456<code>/etc/shadow</code> would not be possible without breaking the 457Postfix security architecture. </p> 458 459<p> The <code>saslauthd</code> socket builds a safe bridge. Postfix, 460running as limited user <code>postfix</code>, can access the 461UNIX-domain socket that <code>saslauthd</code> receives commands 462on; <code>saslauthd</code>, running as privileged user <code>root</code>, 463has the privileges required to access the shadow file. </p> 464 465<p> The <code>saslauthd</code> server verifies passwords against the 466authentication backend <code>/etc/shadow</code> if started like this: </p> 467 468<blockquote> 469<pre> 470% <strong><code>saslauthd -a shadow</code></strong> 471</pre> 472</blockquote> 473 474<p> See section "<a href="#testing_saslauthd">Testing saslauthd 475authentication</a>" for test instructions. </p> 476 477<h4><a name="saslauthd_pam">Using saslauthd with PAM</a></h4> 478 479<p> Cyrus SASL can use the PAM framework to authenticate credentials. 480<code>saslauthd</code> uses the PAM framework when started like 481this: </p> 482 483<blockquote> 484<pre> 485% <strong><code>saslauthd -a pam</code></strong> 486</pre> 487</blockquote> 488 489<blockquote> 490 491<strong>Note</strong> 492 493<p> PAM configuration for the Postfix SMTP server is usually given 494in <code>/etc/pam.d/smtp</code> and is beyond the scope of this 495document. </p> 496 497</blockquote> 498 499<p> See section "<a href="#testing_saslauthd">Testing saslauthd 500authentication</a>" for test instructions. </p> 501 502<h4><a name="saslauthd_imap">Using saslauthd with an IMAP server</a></h4> 503 504<p> <code>saslauthd</code> can verify the SMTP client credentials 505by using them to log into an IMAP server. If the login succeeds, 506SASL authentication also succeeds. <code>saslauthd</code> contacts 507an IMAP server when started like this: </p> 508 509<blockquote> 510<pre> 511% <strong><code>saslauthd -a rimap -O imap.example.com</code></strong> 512</pre> 513</blockquote> 514 515<blockquote> 516 517<strong>Note</strong> 518 519<p> The option "<code>-O imap.example.com</code>" specifies the 520IMAP server <code>saslauthd</code> should contact when it verifies 521credentials. </p> 522 523</blockquote> 524 525<blockquote> 526 527<strong>Important</strong> 528 529<p> <code>saslauthd</code> sends IMAP login information unencrypted. 530Any IMAP session leaving the local host should be protected by an 531additional security layer such as an SSL tunnel. </p> 532 533</blockquote> 534 535<p> See section "<a href="#testing_saslauthd">Testing saslauthd 536authentication</a>" for test instructions. </p> 537 538<h4><a name="testing_saslauthd">Testing saslauthd authentication</a></h4> 539 540<p> Cyrus SASL provides the <code>testsaslauthd</code> utility to 541test <code>saslauthd</code> authentication. The username and password 542are given as command line arguments. The example shows the response 543when authentication is successful: </p> 544 545<blockquote> 546<pre> 547% <strong><code>testsaslauthd -u <em>username</em> -p <em>password</em></code></strong> 5480: OK "Success." 549</pre> 550</blockquote> 551 552<blockquote> 553 554<strong>Note</strong> 555 556<p> Sometimes the <code>testsaslauthd</code> program is not distributed 557with a the Cyrus SASL main package. In that case, it may be 558distributed with <code>-devel</code>, <code>-dev</code> or 559<code>-debug</code> packages. </p> 560 561</blockquote> 562 563<p> Specify an additional "<code>-s smtp</code>" if <code>saslauthd</code> 564was configured to contact the PAM authentication framework, and 565specify an additional "<code>-f <em>/path/to/socketdir/mux</em></code>" 566if <code>saslauthd</code> establishes the UNIX-domain socket in a 567non-default location. </p> 568 569<p> If authentication succeeds, proceed with the section "<a 570href="#server_sasl_enable">Enabling SASL authentication and authorization 571in the Postfix SMTP server</a>". </p> 572 573<h4><a name="auxprop">Cyrus SASL Plugins - auxiliary property 574plugins</a></h4> 575 576<p> Cyrus SASL uses a plugin infrastructure (called <code>auxprop</code>) 577to expand <code>libsasl</code>'s capabilities. Currently Cyrus 578SASL sources provide three authentication plugins. </p> 579 580<blockquote> 581 582<table border="1"> 583 584<tr> <th>Plugin </th> <th>Description </th> </tr> 585 586<tr> <td><a href="#auxprop_sasldb">sasldb</a></td> <td> Accounts 587are stored stored in a Cyrus SASL Berkeley DB database </td> </tr> 588 589<tr> <td><a href="#auxprop_sql">sql</a></td> <td> Accounts are 590stored in a SQL database </td> </tr> 591 592<tr> <td><a href="#auxprop_ldapdb">ldapdb</a></td> <td> Accounts 593are stored stored in an LDAP database </td> </tr> 594 595</table> 596 597</blockquote> 598 599<blockquote> 600 601<strong>Important</strong> 602 603<p> These three plugins support shared-secret mechanisms i.e. 604CRAM-MD5, DIGEST-MD5 and NTLM. These mechanisms send credentials 605encrypted but their verification process requires the password to 606be available in plaintext. Consequently passwords cannot (!) be 607stored in encrypted form. </p> 608 609</blockquote> 610 611<h4><a name="auxprop_sasldb">The sasldb plugin</a></h4> 612 613<p> The sasldb auxprop plugin authenticates SASL clients against 614credentials that are stored in a Berkeley DB database. The database 615schema is specific to Cyrus SASL. The database is usually located 616at <code>/etc/sasldb2</code>. </p> 617 618<blockquote> 619 620<strong>Note</strong> 621 622<p> The <code>sasldb2</code> file contains passwords in 623plaintext, and should have read+write access only to user 624<code>postfix</code> or a group that <code>postfix</code> is member 625of. </p> 626 627</blockquote> 628 629<p> The <code>saslpasswd2</code> command-line utility creates 630and maintains the database: </p> 631 632<blockquote> 633<pre> 634% <strong>saslpasswd2 -c -u <em>example.com</em> <em>username</em></strong> 635Password: 636Again (for verification): 637</pre> 638</blockquote> 639 640<p> This command creates an account 641<code><em>username@example.com</em></code>. </p> 642 643<blockquote> 644 645<strong>Important</strong> 646 647<p> users must specify <code><em>username@example.com</em></code> 648as login name, not <code><em>username</em></code>. </p> 649 650</blockquote> 651 652<p> Run the following command to reuse the Postfix <code>mydomain</code> 653parameter value as the login domain: </p> 654 655<blockquote> 656<pre> 657% <strong>saslpasswd2 -c -u `postconf -h mydomain` <em>username</em></strong> 658Password: 659Again (for verification): 660</pre> 661</blockquote> 662 663<blockquote> 664 665<strong>Note</strong> 666 667<p> Run <code>saslpasswd2</code> without any options for further 668help on how to use the command. </p> 669 670</blockquote> 671 672<p> The <code>sasldblistusers2</code> command lists all existing 673users in the sasldb database: </p> 674 675<blockquote> 676<pre> 677% <strong>sasldblistusers2</strong> 678username1@example.com: password1 679username2@example.com: password2 680</pre> 681</blockquote> 682 683<p> Configure libsasl to use sasldb with the following instructions: </p> 684 685<blockquote> 686<pre> 687/etc/sasl2/smtpd.conf: 688 pwcheck_method: auxprop 689 auxprop_plugin: sasldb 690 mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5 NTLM 691</pre> 692</blockquote> 693 694<blockquote> 695 696<strong>Note</strong> 697 698<p> In the above example adjust <code>mech_list</code> to the 699mechanisms that are applicable for your environment. </p> 700 701</blockquote> 702 703<h4><a name="auxprop_sql">The sql plugin</a></h4> 704 705<p> The sql auxprop plugin is a generic SQL plugin. It provides 706access to credentials stored in a MySQL, PostgreSQL or SQLite 707database. This plugin requires that SASL client passwords are 708stored as plaintext. </p> 709 710<blockquote> 711 712<strong>Tip</strong> 713 714<p> If you must store encrypted passwords, you cannot use the sql 715auxprop plugin. Instead, see section "<a href="#saslauthd_pam">Using 716saslauthd with PAM</a>", and configure PAM to look up the encrypted 717passwords with, for example, the <code>pam_mysql</code> module. 718You will not be able to use any of the methods that require access 719to plaintext passwords, such as the shared-secret methods CRAM-MD5 720and DIGEST-MD5. </p> 721 722</blockquote> 723 724<p> The following example configures libsasl to use the sql plugin 725and connects it to a PostgreSQL server: </p> 726 727<blockquote> 728<pre> 729/etc/sasl2/smtpd.conf: 730 pwcheck_method: auxprop 731 auxprop_plugin: sql 732 mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5 NTLM 733 sql_engine: pgsql 734 sql_hostnames: 127.0.0.1, 192.0.2.1 735 sql_user: username 736 sql_passwd: secret 737 sql_database: dbname 738 sql_select: SELECT password FROM users WHERE user = '%u@%r' 739</pre> 740</blockquote> 741 742<blockquote> 743 744<strong>Note</strong> 745 746<p> Set appropriate permissions if <code>smtpd.conf</code> contains 747a password. The file should be readable by the <code>postfix</code> 748user. </p> 749 750</blockquote> 751 752<blockquote> 753 754<strong>Note</strong> 755 756<p> In the above example, adjust <code>mech_list</code> to the 757mechanisms that are applicable for your environment. </p> 758 759</blockquote> 760 761<p> The sql plugin has the following configuration options: </p> 762 763<blockquote> 764 765<dl> 766 767<dt>sql_engine</dt> 768 769<dd> 770 771<p> Specify <code>mysql</code> to connect to a MySQL server, 772<code>pgsql</code> for a PostgreSQL server or <code>sqlite</code> 773for an SQLite database </p> 774 775</dd> 776 777<dt>sql_hostnames</dt> 778 779<dd> 780 781<p> Specify one or more servers (hostname or hostname:port) separated 782by commas. </p> 783 784<blockquote> 785 786<strong>Note</strong> 787 788<p> With MySQL servers, specify <code>localhost</code> to connect 789over a UNIX-domain socket, and specify <code>127.0.0.1</code> to 790connect over a TCP socket. </p> 791 792</blockquote> 793 794</dd> 795 796<dt>sql_user</dt> 797 798<dd> 799 800<p> The login name to gain access to the database. </p> 801 802</dd> 803 804<dt>sql_passwd</dt> 805 806<dd> 807 808<p> The password to gain access to the database. </p> 809 810</dd> 811 812<dt>sql_database</dt> 813 814<dd> 815 816<p> The name of the database to connect to. </p> 817 818</dd> 819 820<dt>sql_select</dt> 821 822<dd> 823 824<p> The SELECT statement that should retrieve the plaintext password 825from a database table. </p> 826 827<blockquote> 828 829<strong>Important</strong> 830 831<p> Do not enclose the statement in quotes! Use single quotes to 832escape macros! </p> 833 834</blockquote> 835 836</dd> 837 838</dl> 839 840</blockquote> 841 842<p> The sql plugin provides macros to build <code>sql_select</code> 843statements. They will be replaced with arguments sent from the client. The 844following macros are available: </p> 845 846<blockquote> 847 848<dl> 849 850<dt>%u</dt> 851 852<dd> 853 854<p> The name of the user whose properties are being selected. </p> 855 856</dd> 857 858<dt>%p</dt> 859 860<dd> 861 862<p> The name of the property being selected. While this could technically be 863anything, Cyrus SASL will try userPassword and cmusaslsecretMECHNAME (where 864MECHNAME is the name of a SASL mechanism). </p> 865 866</dd> 867 868<dt>%r</dt> 869 870<dd> 871 872<p> The name of the realm to which the user belongs. This could be 873the KERBEROS realm, the fully-qualified domain name of the computer 874the SASL application is running on, or the domain after the "@" in a 875username. </p> 876 877</dd> 878 879</dl> 880 881</blockquote> 882 883<h4><a name="auxprop_ldapdb">The ldapdb plugin</a></h4> 884 885<p> The ldapdb auxprop plugin provides access to credentials stored 886in an LDAP server. This plugin requires that SASL client passwords are 887stored as plaintext. </p> 888 889<blockquote> 890 891<strong>Tip</strong> 892 893<p> If you must store encrypted passwords, you cannot use the ldapdb 894auxprop plugin. Instead, you can use "<code>saslauthd -a ldap</code>" 895to query the LDAP database directly, with appropriate configuration 896in <code>saslauthd.conf</code>, <a 897href="http://git.cyrusimap.org/cyrus-sasl/tree/saslauthd/LDAP_SASLAUTHD">as 898described here</a>. You will not be able to use any of the 899methods that require access to plaintext passwords, such as the 900shared-secret methods CRAM-MD5 and DIGEST-MD5. </p> 901 902</blockquote> 903 904<p> The ldapdb plugin implements proxy authorization. This means 905that the ldapdb plugin uses its own username and password to 906authenticate with the LDAP server, before it asks the LDAP server 907for the remote SMTP client's password. The LDAP server then decides 908if the ldapdb plugin is authorized to read the remote SMTP client's 909password. </p> 910 911<p> In a nutshell: Configuring ldapdb means authentication and 912authorization must be configured twice - once in the Postfix SMTP 913server to authenticate and authorize the remote SMTP client, and 914once in the LDAP server to authenticate and authorize the ldapdb 915plugin. </p> 916 917<p> This example configures libsasl to use the ldapdb plugin and 918the plugin to connect to an LDAP server: </p> 919 920<blockquote> 921<pre> 922/etc/sasl2/smtpd.conf: 923 pwcheck_method: auxprop 924 auxprop_plugin: ldapdb 925 mech_list: PLAIN LOGIN NTLM CRAM-MD5 DIGEST-MD5 926 ldapdb_uri: ldap://localhost 927 ldapdb_id: proxyuser 928 ldapdb_pw: password 929 ldapdb_mech: DIGEST-MD5 930</pre> 931</blockquote> 932 933<blockquote> 934 935<strong>Important</strong> 936 937<p> Set appropriate permissions if <code>smtpd.conf</code> contains a 938password. The file should be readable by the <code>postfix</code> 939user. </p> 940 941</blockquote> 942 943<blockquote> 944 945<strong>Note</strong> 946 947<p> The shared-secret mechanisms (CRAM-MD5, etc.) require that the 948SASL client passwords are stored as plaintext. </p> 949 950</blockquote> 951 952<p> The following is a summary of applicable <code>smtpd.conf</code> 953file entries: </p> 954 955<blockquote> 956 957<dl> 958 959<dt>auxprop_plugin</dt> 960 961<dd> <p> Specify <code>ldapdb</code> to enable the plugin. </p> </dd> 962 963<dt>ldapdb_uri</dt> 964 965<dd> <p> Specify either <code>ldapi://</code> for to connect over 966a UNIX-domain socket, <code>ldap://</code> for an unencrypted TCP 967connection or <code>ldaps://</code> for an encrypted TCP connection. 968</p> </dd> 969 970<dt>ldapdb_id</dt> 971 972<dd> <p> The login name to authenticate the ldapdb plugin to the 973LDAP server (proxy authorization). </p> </dd> 974 975<dt>ldapdb_pw</dt> 976 977<dd> <p> The password (in plaintext) to authenticate the ldapdb 978plugin to the LDAP server (proxy authorization). </p> </dd> 979 980<dt>ldapdb_mech</dt> 981 982<dd> <p> The mechanism to authenticate the ldapdb plugin to the 983LDAP server. </p> 984 985<blockquote> 986 987<strong>Note</strong> 988 989<p> Specify a mechanism here that is supported by the LDAP server. 990</p> 991 992</blockquote> 993 994</dd> 995 996<dt>ldapdb_rc (optional)</dt> 997 998<dd> <p> The path to a file containing individual configuration 999options for the ldapdb LDAP client (libldap). This allows to specify 1000a TLS client certificate which in turn can be used to use the SASL 1001EXTERNAL mechanism. </p> 1002 1003<blockquote> 1004 1005<strong>Note</strong> 1006 1007<p> This mechanism supports authentication over an encrypted transport 1008layer, which is recommended if the plugin must connect to an OpenLDAP 1009server on a remote machine. </p> 1010 1011</blockquote> 1012 1013</dd> 1014 1015<dt>ldapdb_starttls (optional)</dt> 1016 1017<dd> <p> The TLS policy for connecting to the LDAP server. Specify 1018either <code>try</code> or <code>demand</code>. If the option is 1019<code>try</code> the plugin will attempt to establish a TLS-encrypted 1020connection with the LDAP server, and will fallback to an unencrypted 1021connection if TLS fails. If the policy is <code>demand</code> and 1022a TLS-encrypted connection cannot be established, the connection 1023fails immediately. </p> </dd> 1024 1025</dl> 1026 1027</blockquote> 1028 1029<p> When the ldapdb plugin connects to the OpenLDAP server and 1030successfully authenticates, the OpenLDAP server decides if the 1031plugin user is authorized to read SASL account information. </p> 1032 1033<p> The following configuration gives an example of authorization configuration 1034in the OpenLDAP slapd server: </p> 1035 1036<blockquote> 1037<pre> 1038/etc/openldap/slapd.conf: 1039 authz-regexp 1040 uid=(.*),cn=.*,cn=auth 1041 ldap:///dc=example,dc=com??sub?cn=$1 1042 authz-policy to 1043</pre> 1044</blockquote> 1045 1046<p> Here, the <code>authz-regexp</code> option serves for authentication 1047of the ldapdb user. It maps its login name to a DN in the LDAP 1048directory tree where <code>slapd</code> can look up the SASL account 1049information. The <code>authz-policy</code> options defines the 1050authentication policy. In this case it grants authentication 1051privileges "<code>to</code>" the ldapdb plugin. </p> 1052 1053<p> The last configuration step is to tell the OpenLDAP <code>slapd</code> 1054server where ldapdb may search for usernames matching the one given 1055by the mail client. The example below adds an additional attribute 1056ldapdb user object (here: <code>authzTo</code> because the authz-policy 1057is "<code>to</code>") and configures the scope where the login name 1058"proxyuser" may search: </p> 1059 1060<blockquote> 1061<pre> 1062dn: cn=proxyuser,dc=example,dc=com 1063changetype: modify 1064add: authzTo 1065authzTo: dn.regex:uniqueIdentifier=(.*),ou=people,dc=example,dc=com 1066</pre> 1067</blockquote> 1068 1069<p> Use the <code>ldapmodify</code> or <code>ldapadd</code> command 1070to add the above attribute. </p> 1071 1072<blockquote> 1073 1074<strong>Note</strong> 1075 1076<p> Read the chapter "Using SASL" in the <a 1077href="http://www.openldap.org/doc/admin">OpenLDAP Admin Guide</a> 1078for more detailed instructions to set up SASL authentication in 1079OpenLDAP. </p> 1080 1081</blockquote> 1082 1083<h3><a name="server_sasl_enable">Enabling SASL authentication and 1084authorization in the Postfix SMTP server</a></h3> 1085 1086<p> By default the Postfix SMTP server uses the Cyrus SASL 1087implementation. If the Dovecot SASL implementation should be used, 1088specify an <code>smtpd_sasl_type</code> value of <code>dovecot</code> 1089instead of <code>cyrus</code>: </p> 1090 1091<blockquote> 1092<pre> 1093/etc/postfix/main.cf: 1094 smtpd_sasl_type = dovecot 1095</pre> 1096</blockquote> 1097 1098<p> Additionally specify how Postfix SMTP server can find the Dovecot 1099authentication server. This depends on the settings that you have 1100selected in the section "<a href="#server_dovecot_comm">Postfix to 1101Dovecot SASL communication</a>". </p> 1102 1103<ul> 1104 1105<li> <p> If you configured Dovecot for UNIX-domain socket communication, 1106configure Postfix as follows: </p> 1107 1108<pre> 1109/etc/postfix/main.cf: 1110 smtpd_sasl_path = private/auth 1111</pre> 1112 1113<strong>Note</strong> 1114 1115<p> This example uses a pathname relative to the Postfix queue 1116directory, so that it will work whether or not the Postfix SMTP 1117server runs chrooted. </p> 1118 1119<li> <p> If you configured Dovecot for TCP socket communication, 1120configure Postfix as follows. If Dovecot runs on a different machine, 1121replace 127.0.0.1 by that machine's IP address. </p> 1122 1123<pre> 1124/etc/postfix/main.cf: 1125 smtpd_sasl_path = inet:127.0.0.1:12345 1126</pre> 1127 1128<strong>Note</strong> 1129 1130<p> If you specify a remote IP address, information 1131will be sent as plaintext over the network. </p> 1132 1133</ul> 1134 1135<h4><a name="server_sasl_authc">Enabling SASL authentication 1136in the Postfix SMTP server</a></h4> 1137 1138<p> Regardless of the SASL implementation type, enabling SMTP 1139authentication in the Postfix SMTP server always requires setting 1140the <code>smtpd_sasl_auth_enable</code> option: </p> 1141 1142<blockquote> 1143<pre> 1144/etc/postfix/main.cf: 1145 smtpd_sasl_auth_enable = yes 1146</pre> 1147</blockquote> 1148 1149<p> After a "postfix reload", SMTP clients will see the additional 1150capability AUTH in an SMTP session, followed by a list of 1151authentication mechanisms the server supports: </p> 1152 1153<blockquote> 1154<pre> 1155% <strong>telnet server.example.com 25</strong> 1156... 1157220 server.example.com ESMTP Postfix 1158<strong>EHLO client.example.com</strong> 1159250-server.example.com 1160250-PIPELINING 1161250-SIZE 10240000 1162250-AUTH DIGEST-MD5 PLAIN CRAM-MD5 1163... 1164</pre> 1165</blockquote> 1166 1167<p> However not all clients recognize the AUTH capability as defined 1168by the SASL authentication RFC. Some historical implementations expect the 1169server to send an "<code>=</code>" as separator between the AUTH 1170verb and the list of mechanisms that follows it. </p> 1171 1172<p> The <code>broken_sasl_auth_clients</code> configuration option 1173lets Postfix repeat the AUTH statement in a form that these broken 1174clients understand: </p> 1175 1176<blockquote> 1177<pre> 1178/etc/postfix/main.cf: 1179 broken_sasl_auth_clients = yes 1180</pre> 1181</blockquote> 1182 1183<blockquote> 1184 1185<strong>Note</strong> 1186 1187<p> Enable this option for Outlook up to and including version 2003 1188and Outlook Express up to version 6. This option does not hurt other 1189clients. </p> 1190 1191</blockquote> 1192 1193<p> After "postfix reload", the Postfix SMTP server will propagate 1194the AUTH capability twice - once for compliant and once for broken 1195clients: </p> 1196 1197<blockquote> 1198<pre> 1199% <strong>telnet server.example.com 25</strong> 1200... 1201220 server.example.com ESMTP Postfix 1202<strong>EHLO client.example.com</strong> 1203250-server.example.com 1204250-PIPELINING 1205250-SIZE 10240000 1206250-AUTH DIGEST-MD5 PLAIN CRAM-MD5 1207250-AUTH=DIGEST-MD5 PLAIN CRAM-MD5 1208... 1209</pre> 1210</blockquote> 1211 1212<h4><a name="smtpd_sasl_security_options">Postfix SMTP Server policy 1213- SASL mechanism properties</a></h4> 1214 1215<p> The Postfix SMTP server supports policies that limit the SASL 1216mechanisms that it makes available to clients, based on the properties 1217of those mechanisms. The next two sections give examples of how 1218these policies are used. </p> 1219 1220<blockquote> 1221 1222<table border="1"> 1223 1224<tr> <th>Property</th> <th>Description</th> </tr> 1225 1226<tr> <td>noanonymous</td> <td> Don't use mechanisms that permit 1227anonymous authentication. </td> </tr> 1228 1229<tr> <td>noplaintext</td> <td> Don't use mechanisms that transmit 1230unencrypted username and password information. </td> </tr> 1231 1232<tr> <td>nodictionary</td> <td> Don't use mechanisms that are 1233vulnerable to dictionary attacks. </td> </tr> 1234 1235<tr> <td>forward_secrecy</td> <td> Require forward secrecy between 1236sessions (breaking one session does not break earlier sessions). 1237</td> </tr> 1238 1239<tr> <td>mutual_auth</td> <td> Use only mechanisms that authenticate 1240both the client and the server to each other. </td> </tr> 1241 1242</table> 1243 1244</blockquote> 1245 1246<h4><a name="id396877">Unencrypted SMTP session</a></h4> 1247 1248<p> The default policy is to allow any mechanism in the Postfix SMTP server 1249except for those based on anonymous authentication: </p> 1250 1251<blockquote> 1252<pre> 1253/etc/postfix/main.cf: 1254 # Specify a list of properties separated by comma or whitespace 1255 smtpd_sasl_security_options = noanonymous 1256</pre> 1257</blockquote> 1258 1259<blockquote> 1260 1261<strong>Important</strong> 1262 1263<p> Always set at least the <code>noanonymous</code> option. 1264Otherwise, the Postfix SMTP server can give strangers the same 1265authorization as a properly-authenticated client. </p> 1266 1267</blockquote> 1268 1269<h4><a name="id396969">Encrypted SMTP session (TLS)</a></h4> 1270 1271<p> A separate parameter controls Postfix SASL mechanism policy 1272during a TLS-encrypted SMTP session. The default is to copy the 1273settings from the unencrypted session: </p> 1274 1275<blockquote> 1276<pre> 1277/etc/postfix/main.cf: 1278 smtpd_sasl_tls_security_options = $smtpd_sasl_security_options 1279</pre> 1280</blockquote> 1281 1282<p> A more sophisticated policy allows plaintext mechanisms, but 1283only over a TLS-encrypted connection: </p> 1284 1285<blockquote> 1286<pre> 1287/etc/postfix/main.cf: 1288 smtpd_sasl_security_options = noanonymous, noplaintext 1289 smtpd_sasl_tls_security_options = noanonymous 1290</pre> 1291</blockquote> 1292 1293<p> To offer SASL authentication only after a TLS-encrypted session has been 1294established specify this: </p> 1295 1296<blockquote> 1297<pre> 1298/etc/postfix/main.cf: 1299 smtpd_tls_auth_only = yes 1300</pre> 1301</blockquote> 1302 1303<h4><a name="server_sasl_authz">Enabling SASL authorization in the Postfix 1304SMTP server</a></h4> 1305 1306<p> After the client has authenticated with SASL, the Postfix SMTP 1307server decides what the remote SMTP client will be authorized 1308for. Examples of possible SMTP clients authorizations are: </p> 1309 1310<ul> 1311 1312<li> <p> Send a message to a remote recipient. </p> </li> 1313 1314<li> <p> Use a specific envelope sender in the MAIL FROM command. </p> </li> 1315 1316</ul> 1317 1318<p> These permissions are not enabled by default. </p> 1319 1320<h4><a name="server_sasl_authz_relay">Mail relay authorization</a></h4> 1321 1322<p> With <code>permit_sasl_authenticated</code> the Postfix SMTP 1323server can allow 1324SASL-authenticated SMTP clients to send mail to remote destinations. 1325Examples: 1326</p> 1327 1328<blockquote> 1329<pre> 1330# With Postfix 2.10 and later, the mail relay policy is 1331# preferably specified under smtpd_relay_restrictions. 1332/etc/postfix/main.cf: 1333 smtpd_relay_restrictions = 1334 permit_mynetworks 1335 <strong>permit_sasl_authenticated</strong> 1336 reject_unauth_destination 1337</pre> 1338 1339<pre> 1340# Older configurations combine relay control and spam control under 1341# smtpd_recipient_restrictions. To use this example with Postfix ≥ 1342# 2.10 specify "smtpd_relay_restrictions=". 1343/etc/postfix/main.cf: 1344 smtpd_recipient_restrictions = 1345 permit_mynetworks 1346 <strong>permit_sasl_authenticated</strong> 1347 reject_unauth_destination 1348 ...other rules... 1349</pre> 1350</blockquote> 1351 1352<h4><a name="server_sasl_authz_envelope">Envelope sender address 1353authorization</a></h4> 1354 1355<p> By default an SMTP client may specify any envelope sender address 1356in the MAIL FROM command. That is because the Postfix SMTP server 1357only knows the remote SMTP client hostname and IP address, but not 1358the user who controls the remote SMTP client. </p> 1359 1360<p> This changes the moment an SMTP client uses SASL authentication. 1361Now, the Postfix SMTP server knows who the sender is. Given a table 1362of envelope sender addresses and SASL login names, the Postfix SMTP 1363server can decide if the SASL authenticated client is allowed to 1364use a particular envelope sender address: </p> 1365 1366<blockquote> 1367<pre> 1368/etc/postfix/main.cf: 1369 <strong>smtpd_sender_login_maps = hash:/etc/postfix/controlled_envelope_senders</strong> 1370 1371 smtpd_recipient_restrictions = 1372 ... 1373 <strong>reject_sender_login_mismatch</strong> 1374 permit_sasl_authenticated 1375 ... 1376</pre> 1377</blockquote> 1378 1379<p> The <code>controlled_envelope_senders</code> table specifies 1380the binding between a sender envelope address and the SASL login 1381names that own that address: </p> 1382 1383<blockquote> 1384<pre> 1385/etc/postfix/controlled_envelope_senders 1386 # envelope sender owners (SASL login names) 1387 john@example.com john@example.com 1388 helpdesk@example.com john@example.com, mary@example.com 1389 postmaster admin@example.com 1390 @example.net barney, fred, john@example.com, mary@example.com 1391</pre> 1392</blockquote> 1393 1394<p> With this, the <code>reject_sender_login_mismatch</code> 1395restriction above will reject the sender address in the MAIL FROM 1396command if <code>smtpd_sender_login_maps</code> does not specify 1397the SMTP client's login name as an owner of that address. </p> 1398 1399<p> See also <code>reject_authenticated_sender_login_mismatch</code>, 1400<code>reject_known_sender_login_mismatch</code>, and 1401<code>reject_unauthenticated_sender_login_mismatch</code> for additional 1402control over the SASL login name and the envelope sender. </p> 1403 1404<h4><a name="server_sasl_other">Additional SMTP Server SASL options</a></h4> 1405 1406<p> Postfix provides a wide range of SASL authentication configuration 1407options. The next section lists a few that are discussed frequently. 1408See postconf(5) for a complete list. </p> 1409 1410<h4><a name="sasl_access">Per-account access control</a></h4> 1411 1412<p> Postfix can implement policies that depend on the SASL login 1413name (Postfix 2.11 and later). Typically this is used to HOLD or 1414REJECT mail from accounts whose credentials have been compromised. 1415</p> 1416 1417<blockquote> 1418<pre> 1419/etc/postfix/main.cf: 1420 smtpd_recipient_restrictions = 1421 permit_mynetworks 1422 check_sasl_access hash:/etc/postfix/sasl_access 1423 permit_sasl_authenticated 1424 ... 1425 1426/etc/postfix/sasl_access: 1427 # Use this when smtpd_sasl_local_domain is empty. 1428 username HOLD 1429 # Use this when smtpd_sasl_local_domain=example.com. 1430 username@example.com HOLD 1431</pre> 1432</blockquote> 1433 1434<h4><a name="id397172">Default authentication domain</a></h4> 1435 1436<p> Postfix can append a domain name (or any other string) to a 1437SASL login name that does not have a domain part, e.g. "<code>john</code>" 1438instead of "<code>john@example.com</code>": </p> 1439 1440<blockquote> 1441<pre> 1442/etc/postfix/main.cf: 1443 smtpd_sasl_local_domain = example.com 1444</pre> 1445</blockquote> 1446 1447<p> This is useful as a default setting and safety net for misconfigured 1448clients, or during a migration to an authentication method/backend 1449that requires an authentication REALM or domain name, before all 1450SMTP clients are configured to send such information. </p> 1451 1452<h4><a name="id397205">Hiding SASL authentication from clients or 1453networks</a></h4> 1454 1455<p> Some clients insist on using SASL authentication if it is offered, even 1456when they are not configured to send credentials - and therefore 1457they will always fail and disconnect. </p> 1458 1459<p> Postfix can hide the AUTH capability from these clients/networks: </p> 1460 1461<blockquote> 1462<pre> 1463/etc/postfix/main.cf: 1464 smtpd_sasl_exceptions_networks = !192.0.2.171/32, 192.0.2.0/24 1465</pre> 1466</blockquote> 1467 1468<h4><a name="id397226">Adding the SASL login name to mail headers</a></h4> 1469 1470<p> To report SASL login names in Received: message headers (Postfix 1471version 2.3 and later): </p> 1472 1473<blockquote> 1474<pre> 1475/etc/postfix/main.cf: 1476 smtpd_sasl_authenticated_header = yes 1477</pre> 1478</blockquote> 1479 1480<blockquote> 1481 1482<strong>Note</strong> 1483 1484<p> The SASL login names will be shared with the entire world. </p> 1485 1486</blockquote> 1487 1488<h3><a name="server_test">Testing SASL authentication in the Postfix SMTP Server</a></h3> 1489 1490<p> To test the server side, connect (for example, with 1491<code>telnet</code>) to the Postfix SMTP server port and you should 1492be able to have a conversation as shown below. Information sent by 1493the client (that is, you) is shown in <strong>bold</strong> font. 1494</p> 1495 1496<blockquote> 1497<pre> 1498% <strong>telnet server.example.com 25</strong> 1499... 1500220 server.example.com ESMTP Postfix 1501<strong>EHLO client.example.com</strong> 1502250-server.example.com 1503250-PIPELINING 1504250-SIZE 10240000 1505250-ETRN 1506250-AUTH DIGEST-MD5 PLAIN CRAM-MD5 1507250 8BITMIME 1508<strong>AUTH PLAIN AHRlc3QAdGVzdHBhc3M=</strong> 1509235 Authentication successful 1510</pre> 1511</blockquote> 1512 1513<p> To test this over a connection that is encrypted with TLS, use 1514<code>openssl s_client</code> instead of <code>telnet</code>: 1515 1516<blockquote> 1517<pre> 1518% <strong>openssl s_client -connect server.example.com:25 -starttls smtp</strong> 1519... 1520220 server.example.com ESMTP Postfix 1521<strong>EHLO client.example.com</strong> 1522...see above example for more... 1523</pre> 1524</blockquote> 1525 1526<p> Instead of <code>AHRlc3QAdGVzdHBhc3M=</code>, specify the 1527base64-encoded form of <code>\0username\0password</code> (the \0 1528is a null byte). The example above is for a user named `<code>test</code>' 1529with password `<code>testpass</code>'. </p> 1530<blockquote> 1531 1532<strong>Caution</strong> 1533 1534<p> When posting logs of the SASL negotiations to public lists, 1535please keep in mind that username/password information is trivial 1536to recover from the base64-encoded form. </p> 1537 1538</blockquote> 1539 1540<p> You can use one of the following commands to generate base64 1541encoded authentication information: </p> 1542 1543<ul> 1544 1545<li> <p> Using a recent version of the <b>bash</b> shell: </p> 1546 1547<blockquote> 1548<pre> 1549% <strong>echo -ne '\000username\000password' | openssl base64</strong> 1550</pre> 1551</blockquote> 1552 1553<p> Some other shells support similar syntax. </p> 1554 1555<li> <p> Using the <b>printf</b> command: </p> 1556 1557<blockquote> 1558<pre> 1559% <strong>printf '\0%s\0%s' '<em>username</em>' '<em>password</em>' | openssl base64</strong> 1560% <strong>printf '\0%s\0%s' '<em>username</em>' '<em>password</em>' | mmencode</strong> 1561</pre> 1562</blockquote> 1563 1564<p> The <strong>mmencode</strong> command is part of the metamail 1565software. </p> 1566 1567<li> <p> Using Perl <b>MIME::Base64</b>: </p> 1568 1569<blockquote> 1570<pre> 1571% <strong>perl -MMIME::Base64 -e \ 1572 'print encode_base64("\0<em>username</em>\0<em>password</em>");'</strong> 1573</pre> 1574</blockquote> 1575 1576<p> MIME::Base64 is available from http://www.cpan.org/. </p> 1577 1578<li> <p> Using the <b>gen-auth</b> script: </p> 1579 1580<blockquote> 1581<pre> 1582% <strong>gen-auth plain</strong> 1583username: <strong><em>username</em></strong> 1584password: 1585</pre> 1586</blockquote> 1587 1588<p> The <strong>gen-auth</strong> Perl script was written by John 1589Jetmore and can be found at http://jetmore.org/john/code/gen-auth. </p> 1590 1591</ul> 1592 1593<h2><a name="client_sasl">Configuring SASL authentication in the Postfix SMTP/LMTP client</a></h2> 1594 1595<p> The Postfix SMTP and the LMTP client can authenticate with a 1596remote SMTP server via the Cyrus SASL framework. At this time, the 1597Dovecot SASL implementation does not provide client functionality. 1598</p> 1599 1600<blockquote> 1601 1602<strong>Note</strong> 1603 1604<p> The examples in this section discuss only the SMTP client. 1605Replace <code>smtp_</code> with <code>lmtp_</code> to get the 1606corresponding LMTP client configuration. </p> 1607 1608</blockquote> 1609 1610<p> You can read more about the following topics: </p> 1611 1612<ul> 1613 1614<li><a href="#client_sasl_enable">Enabling SASL authentication in 1615the Postfix SMTP/LMTP client</a></li> 1616 1617<li><a href="#client_sasl_sender">Configuring sender-dependent SASL 1618authentication</a></li> 1619 1620<li><a href="#client_sasl_policy">Postfix SMTP/LMTP client policy 1621- SASL mechanism <em>properties</em></a></li> 1622 1623<li><a href="#client_sasl_filter">Postfix SMTP/LMTP client policy 1624- SASL mechanism <em>names</em></a></li> 1625 1626</ul> 1627 1628<h3><a name="client_sasl_enable">Enabling SASL authentication in the 1629Postfix SMTP/LMTP client</a></h3> 1630 1631<p> This section shows a typical scenario where the Postfix SMTP 1632client sends all messages via a mail gateway server that requires 1633SASL authentication. </p> 1634 1635<blockquote> 1636 1637<strong> Trouble solving tips: </strong> 1638 1639<ul> 1640 1641<li> <p> If your SASL logins fail with "SASL authentication failure: 1642No worthy mechs found" in the mail logfile, then see the section 1643"<a href="SASL_README.html#client_sasl_policy">Postfix SMTP/LMTP 1644client policy - SASL mechanism <em>properties</em></a>". 1645 1646<li> <p> For a solution to a more obscure class of SASL authentication 1647failures, see "<a href="SASL_README.html#client_sasl_filter">Postfix 1648SMTP/LMTP client policy - SASL mechanism <em>names</em></a>". 1649 1650</ul> 1651 1652</blockquote> 1653 1654<p> To make the example more readable we introduce it in two parts. 1655The first part takes care of the basic configuration, while the 1656second part sets up the username/password information. </p> 1657 1658<blockquote> 1659<pre> 1660/etc/postfix/main.cf: 1661 smtp_sasl_auth_enable = yes 1662 relayhost = [mail.isp.example] 1663 # Alternative form: 1664 # relayhost = [mail.isp.example]:submission 1665 smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 1666</pre> 1667</blockquote> 1668 1669<ul> 1670 1671<li> <p> The <code>smtp_sasl_auth_enable</code> setting enables 1672client-side authentication. We will configure the client's username 1673and password information in the second part of the example. </p> 1674</li> 1675 1676<li> <p> The <code>relayhost</code> setting forces the Postfix SMTP 1677to send all remote messages to the specified mail server instead 1678of trying to deliver them directly to their destination. </p> </li> 1679 1680<li> <p> In the <code>relayhost</code> setting, the "<code>[</code>" 1681and "<code>]</code>" prevent the Postfix SMTP client from looking 1682up MX (mail exchanger) records for the enclosed name. </p> </li> 1683 1684<li> <p> The <code>relayhost</code> destination may also specify a 1685non-default TCP port. For example, the alternative form 1686<code>[mail.isp.example]:submission</code> tells Postfix to connect 1687to TCP network port 587, which is reserved for email client 1688applications. </p> </li> 1689 1690<li> <p> The Postfix SMTP client is compatible with SMTP servers 1691that use the non-standard "<code>AUTH=<em>method.</em>...</code>" 1692syntax in response to the EHLO command; this requires no additional 1693Postfix client configuration. </p> </li> 1694 1695<li> <p> The Postfix SMTP client does not support the obsolete 1696"wrappermode" protocol, which uses TCP port <code>465</code> on the 1697SMTP server. See TLS_README for a solution that uses the 1698<code>stunnel</code> command. </p> </li> 1699 1700<li> <p> With the <code>smtp_sasl_password_maps</code> parameter, 1701we configure the Postfix SMTP client to send username and password 1702information to the mail gateway server. As discussed in the next 1703section, the Postfix SMTP client supports multiple ISP accounts. 1704For this reason the username and password are stored in a table 1705that contains one username/password combination for each mail gateway 1706server. </p> 1707 1708</ul> 1709 1710<blockquote> 1711<pre> 1712/etc/postfix/sasl_passwd: 1713 # destination credentials 1714 [mail.isp.example] username:password 1715 # Alternative form: 1716 # [mail.isp.example]:submission username:password 1717</pre> 1718</blockquote> 1719 1720<blockquote> 1721 1722<strong>Important</strong> 1723 1724<p> Keep the SASL client password file in <code>/etc/postfix</code>, 1725and make the file read+write only for <code>root</code> to protect 1726the username/password combinations against other users. The Postfix 1727SMTP client will still be able to read the SASL client passwords. 1728It opens the file as user <code>root</code> before it drops privileges, 1729and before entering an optional chroot jail. </p> 1730 1731</blockquote> 1732 1733<ul> 1734 1735<li> <p> Use the <code>postmap</code> command whenever you 1736change the <code>/etc/postfix/sasl_passwd</code> file. </p> </li> 1737 1738<li> <p> If you specify the "<code>[</code>" and "<code>]</code>" 1739in the <code>relayhost</code> destination, then you must use the 1740same form in the <code>smtp_sasl_password_maps</code> file. </p> 1741</li> 1742 1743<li> <p> If you specify a non-default TCP Port (such as 1744"<code>:submission</code>" or "<code>:587</code>") in the 1745<code>relayhost</code> destination, then you must use the same form 1746in the <code>smtp_sasl_password_maps</code> file. </p> </li> 1747 1748</ul> 1749 1750<h3><a name="client_sasl_sender">Configuring Sender-Dependent SASL 1751authentication</a></h3> 1752 1753<p> Postfix supports different ISP accounts for different sender 1754addresses (version 2.3 and later). This can be useful when one 1755person uses the same machine for work and for personal use, or when 1756people with different ISP accounts share the same Postfix server. 1757</p> 1758 1759<p> To make this possible, Postfix supports per-sender SASL passwords 1760and per-sender relay hosts. In the example below, the Postfix SMTP 1761client will search the SASL password file by sender address before 1762it searches that same file by destination. Likewise, the Postfix 1763trivial-rewrite(8) daemon will search the per-sender relayhost file, 1764and use the default <code>relayhost</code> setting only as a final 1765resort. </p> 1766 1767<blockquote> 1768<pre> 1769/etc/postfix/main.cf: 1770 smtp_sender_dependent_authentication = yes 1771 sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay 1772 smtp_sasl_auth_enable = yes 1773 smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 1774 relayhost = [mail.isp.example] 1775 # Alternative form: 1776 # relayhost = [mail.isp.example]:submission 1777</pre> 1778</blockquote> 1779 1780<blockquote> 1781<pre> 1782/etc/postfix/sasl_passwd: 1783 # Per-sender authentication; see also /etc/postfix/sender_relay. 1784 user1@example.com username2:password2 1785 user2@example.net username2:password2 1786 # Login information for the default relayhost. 1787 [mail.isp.example] username:password 1788 # Alternative form: 1789 # [mail.isp.example]:submission username:password 1790</pre> 1791</blockquote> 1792 1793<blockquote> 1794<pre> 1795/etc/postfix/sender_relay: 1796 # Per-sender provider; see also /etc/postfix/sasl_passwd. 1797 user1@example.com [mail.example.com]:submission 1798 user2@example.net [mail.example.net] 1799</pre> 1800</blockquote> 1801 1802<ul> 1803 1804<li> <p> If you are creative, then you can try to combine the two 1805tables into one single MySQL database, and configure different 1806Postfix queries to extract the appropriate information. </p> 1807 1808<li> <p> Specify dbm instead of hash if your system uses dbm files 1809instead of db files. To find out what lookup tables Postfix supports, 1810use the command "postconf -m". </p> 1811 1812<li> <p> Execute the command "postmap /etc/postfix/sasl_passwd" 1813whenever you change the sasl_passwd table. </p> 1814 1815<li> <p> Execute the command "postmap /etc/postfix/sender_relay" 1816whenever you change the sender_relay table. </p> 1817 1818</ul> 1819 1820<h3><a name="client_sasl_policy">Postfix SMTP/LMTP client policy - 1821SASL mechanism <em>properties</em></a></h3> 1822 1823<p> Just like the Postfix SMTP server, the SMTP client has a policy 1824that determines which SASL mechanisms are acceptable, based on their 1825properties. The next two sections give examples of how these policies 1826are used. </p> 1827 1828<blockquote> 1829 1830<table border="1"> 1831 1832<tr> <th>Property</th> <th>Description</th> </tr> 1833 1834<tr> <td>noanonymous</td> <td> Don't use mechanisms that permit 1835anonymous authentication. </td> </tr> 1836 1837<tr> <td>noplaintext</td> <td> Don't use mechanisms that transmit 1838unencrypted username and password information. </td> </tr> 1839 1840<tr> <td>nodictionary</td> <td> Don't use mechanisms that are 1841vulnerable to dictionary attacks. </td> </tr> 1842 1843<tr> <td>mutual_auth</td> <td> Use only mechanisms that authenticate 1844both the client and the server to each other. </td> </tr> 1845 1846</table> 1847 1848</blockquote> 1849 1850<h4>Unencrypted SMTP session</h4> 1851 1852<p> The default policy is stricter than that of the Postfix SMTP 1853server - plaintext mechanisms are not allowed (nor is any anonymous 1854mechanism): </p> 1855 1856<blockquote> 1857<pre> 1858/etc/postfix/main.cf: 1859 smtp_sasl_security_options = noplaintext, noanonymous 1860</pre> 1861</blockquote> 1862 1863<p> This default policy, which allows no plaintext passwords, leads 1864to authentication failures if the remote server only offers plaintext 1865authentication mechanisms (the SMTP server announces "<code>AUTH 1866PLAIN LOGIN</code>"). In such cases the SMTP client will log the 1867following error message: </p> 1868 1869<blockquote> 1870<pre> 1871SASL authentication failure: No worthy mechs found 1872</pre> 1873</blockquote> 1874 1875<blockquote> 1876 1877<strong>Note</strong> 1878 1879<p> This same error message will also be logged when the 1880<code>libplain.so</code> or <code>liblogin.so</code> modules are 1881not installed in the <code>/usr/lib/sasl2</code> directory. </p> 1882 1883</blockquote> 1884 1885<p> The insecure approach is to lower the security standards and 1886permit plaintext authentication mechanisms: </p> 1887 1888<blockquote> 1889<pre> 1890/etc/postfix/main.cf: 1891 smtp_sasl_security_options = noanonymous 1892</pre> 1893</blockquote> 1894 1895<p> The more secure approach is to protect the plaintext username 1896and password with TLS session encryption. To find out if the remote 1897SMTP server supports TLS, connect to the server and see if it 1898announces STARTTLS support as shown in the example. Information 1899sent by the client (that is, you) is shown in <strong>bold</strong> 1900font. </p> 1901 1902<blockquote> 1903<pre> 1904% <strong>telnet server.example.com 25</strong> 1905... 1906220 server.example.com ESMTP Postfix 1907<strong>EHLO client.example.com</strong> 1908250-server.example.com 1909250-PIPELINING 1910250-SIZE 10240000 1911250-STARTTLS 1912... 1913</pre> 1914</blockquote> 1915 1916<p> Instead of port 25 (smtp), specify port 587 (submission) where 1917appropriate. </p> 1918 1919<h4>Encrypted SMTP session (TLS)</h4> 1920 1921<p> To turn on TLS in the Postfix SMTP client, see TLS_README for 1922configuration details. </p> 1923 1924<p> The smtp_sasl_tls_security_options parameter controls Postfix 1925SASL mechanism policy during a TLS-encrypted SMTP session. The 1926default is to copy the settings from the unencrypted session: </p> 1927 1928<blockquote> 1929<pre> 1930/etc/postfix/main.cf: 1931 smtp_sasl_tls_security_options = $smtp_sasl_security_options 1932</pre> 1933</blockquote> 1934 1935<p> A more sophisticated policy allows plaintext mechanisms, but 1936only over a TLS-encrypted connection: </p> 1937 1938<blockquote> 1939<pre> 1940/etc/postfix/main.cf: 1941 smtp_sasl_security_options = noanonymous, noplaintext 1942 smtp_sasl_tls_security_options = noanonymous 1943</pre> 1944</blockquote> 1945 1946<h3><a name="client_sasl_filter">Postfix SMTP/LMTP client policy - 1947SASL mechanism <em>names</em></a></h3> 1948 1949<p> Given the SASL security options of the previous section, the 1950Cyrus SASL library will choose the most secure authentication 1951mechanism that both the SMTP client and server implement. Unfortunately, 1952that authentication mechanism may fail because the client or server 1953is not configured to use that mechanism.</p> 1954 1955<p> To prevent this, the Postfix SMTP client can filter the names 1956of the authentication mechanisms from the remote SMTP server. Used 1957correctly, the filter hides unwanted mechanisms from the Cyrus SASL 1958library, forcing the library to choose from the mechanisms the 1959Postfix SMTP client filter passes through. </p> 1960 1961<p> The following example filters out everything but the mechanisms 1962<code>PLAIN</code> and <code>LOGIN</code>: </p> 1963 1964<blockquote> 1965<pre> 1966/etc/postfix/main.cf: 1967 smtp_sasl_mechanism_filter = plain, login 1968</pre> 1969</blockquote> 1970 1971<blockquote> 1972 1973<strong>Note</strong> 1974 1975<p> If the remote server does not offer any of the mechanisms on 1976the filter list, authentication will fail. </p> 1977 1978</blockquote> 1979 1980<p> We close this section with an example that passes every mechanism 1981except for <code>GSSAPI</code> and <code>LOGIN</code>: </p> 1982 1983<blockquote> 1984<pre> 1985/etc/postfix/main.cf: 1986 smtp_sasl_mechanism_filter = !gssapi, !login, static:all 1987</pre> 1988</blockquote> 1989 1990<h2><a name="postfix_build">Building Postfix with SASL support</a></h2> 1991 1992<p> As mentioned elsewhere, Postfix supports two SASL implementations: 1993Cyrus SASL (SMTP client and server) and Dovecot SASL (SMTP server 1994only). Both implementations can be built into Postfix simultaneously. 1995</p> 1996 1997<ul> 1998 1999<li><a href="#build_dovecot">Building Dovecot SASL support</a></li> 2000 2001<li><a href="#sasl_support">Building Cyrus SASL support</a></li> 2002 2003</ul> 2004 2005<h3><a name="build_dovecot">Building Dovecot SASL support</a></h3> 2006 2007<p> These instructions assume that you build Postfix from source 2008code as described in the INSTALL document. Some modification may 2009be required if you build Postfix from a vendor-specific source 2010package. </p> 2011 2012<p> Support for the Dovecot version 1 SASL protocol is available 2013in Postfix 2.3 and later. At the time of writing, only server-side 2014SASL support is available, so you can't use it to authenticate the 2015Postfix SMTP client to your network provider's server. </p> 2016 2017<p> Dovecot uses its own daemon process for authentication. This 2018keeps the Postfix build process simple, because there is no need 2019to link extra libraries into Postfix. </p> 2020 2021<p> To generate the necessary Makefiles, execute the following in 2022the Postfix top-level directory: </p> 2023 2024<blockquote> 2025<pre> 2026% <strong>make tidy</strong> # if you have left-over files from a previous build 2027% <strong>make makefiles CCARGS='-DUSE_SASL_AUTH \ 2028 -DDEF_SERVER_SASL_TYPE=\"dovecot\"'</strong> 2029</pre> 2030</blockquote> 2031 2032<p> After this, proceed with "<code>make</code>" as described in 2033the INSTALL document. </p> 2034 2035<strong>Note</strong> 2036 2037<ul> 2038 2039<li> 2040 2041<p> The <code>-DDEF_SERVER_SASL_TYPE=\"dovecot\"</code> is not 2042necessary; it just makes Postfix configuration a little more 2043convenient because you don't have to specify the SASL plug-in type 2044in the Postfix main.cf file (but this may cause surprises when you 2045switch to a later Postfix version that is built with the default 2046SASL type of <code>sasl</code>). </p> 2047 2048</li> 2049 2050<li> 2051 2052<p> If you also want support for LDAP or TLS (or for Cyrus SASL), 2053you need to merge their <code>CCARGS</code> and <code>AUXLIBS</code> 2054options into the above command line; see the LDAP_README and 2055TLS_README for details. </p> 2056 2057<blockquote> 2058<pre> 2059% <strong>make tidy</strong> # if you have left-over files from a previous build 2060% <strong>make makefiles CCARGS='-DUSE_SASL_AUTH \ 2061 -DDEF_SERVER_SASL_TYPE=\"dovecot\" \ 2062 ...<i>CCARGS options for LDAP or TLS etc.</i>...' \ 2063 AUXLIBS='...<i>AUXLIBS options for LDAP or TLS etc.</i>...'</strong> 2064</pre> 2065</blockquote> 2066 2067</li> 2068 2069</ul> 2070 2071<h3><a name="sasl_support">Building Cyrus SASL support</a></h3> 2072 2073<h4><a name="build_sasl">Building the Cyrus SASL library</a></h4> 2074 2075<p> Postfix works with cyrus-sasl-1.5.x or cyrus-sasl-2.1.x, which are 2076available from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/. </p> 2077 2078<blockquote> 2079 2080<strong>Important</strong> 2081 2082<p> If you install the Cyrus SASL libraries as per the default, you will have 2083to create a symlink <code>/usr/lib/sasl</code> -> 2084<code>/usr/local/lib/sasl</code> for version 1.5.x or 2085<code>/usr/lib/sasl2</code> -> <code>/usr/local/lib/sasl2</code> 2086for version 2.1.x. </p> 2087 2088</blockquote> 2089 2090<p> Reportedly, Microsoft Outlook (Express) requires the non-standard LOGIN 2091and/or NTLM authentication mechanism. To enable these authentication 2092mechanisms, build the Cyrus SASL libraries with: </p> 2093 2094<blockquote> 2095<pre> 2096% <strong>./configure --enable-login --enable-ntlm</strong> 2097</pre> 2098</blockquote> 2099 2100<h4><a name="build_postfix">Building Postfix with Cyrus SASL support</a></h4> 2101 2102<p> These instructions assume that you build Postfix from source 2103code as described in the INSTALL document. Some modification may 2104be required if you build Postfix from a vendor-specific source 2105package. </p> 2106 2107<p> The following assumes that the Cyrus SASL include files are in 2108<code>/usr/local/include</code>, and that the Cyrus SASL libraries are in 2109<code>/usr/local/lib</code>. </p> 2110 2111<p> On some systems this generates the necessary <code>Makefile</code> 2112definitions: </p> 2113 2114<dl> 2115 2116<dt>Cyrus SASL version 2.1.x</dt> 2117 2118<dd> 2119 2120<pre> 2121% <strong>make tidy</strong> # if you have left-over files from a previous build 2122% <strong>make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \ 2123 -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib -lsasl2"</strong> 2124</pre> 2125 2126</dd> 2127 2128<dt>Cyrus SASL version 1.5.x</dt> 2129 2130<dd> 2131 2132<pre> 2133% <strong>make tidy</strong> # if you have left-over files from a previous build 2134% <strong>make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \ 2135 -I/usr/local/include" AUXLIBS="-L/usr/local/lib -lsasl"</strong> 2136</pre> 2137 2138</dd> 2139 2140</dl> 2141 2142<p> On Solaris 2.x you need to specify run-time link information, 2143otherwise the ld.so run-time linker will not find the SASL shared 2144library: </p> 2145 2146<dl> 2147 2148<dt>Cyrus SASL version 2.1.x</dt> 2149 2150<dd> 2151 2152<pre> 2153% <strong>make tidy</strong> # remove left-over files from a previous build 2154% <strong>make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \ 2155 -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib \ 2156 -R/usr/local/lib -lsasl2"</strong> 2157</pre> 2158 2159</dd> 2160 2161<dt>Cyrus SASL version 1.5.x</dt> 2162 2163<dd> 2164 2165<pre> 2166% <strong>make tidy</strong> # if you have left-over files from a previous build 2167% <strong>make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \ 2168 -I/usr/local/include" AUXLIBS="-L/usr/local/lib \ 2169 -R/usr/local/lib -lsasl"</strong> 2170</pre> 2171 2172</dd> 2173 2174</dl> 2175 2176<h2><a name="cyrus_legacy">Using Cyrus SASL version 1.5.x</a></h2> 2177 2178<p> Postfix supports Cyrus SASL version 1.x, but you shouldn't use 2179it unless you are forced to. The makers of Cyrus SASL write: </p> 2180 2181<blockquote> <i> This library is being deprecated and applications 2182should transition to using the SASLv2 library</i> (source: <a 2183href="http://cyrusimap.web.cmu.edu/downloads.html">Project Cyrus: 2184Downloads</a>). </blockquote> 2185 2186<p> If you still need to set it up, here's a quick rundown: </p> 2187 2188<p> Read the regular section on SMTP server configurations for the 2189Cyrus SASL framework. The differences are: </p> 2190 2191<ul> 2192 2193<li> <p> Cyrus SASL version 1.5.x searches for configuration 2194(<code>smtpd.conf</code>) in <code>/usr/lib/sasl/</code> only. You 2195must place the configuration in that directory. Some systems may 2196have modified Cyrus SASL and put the files into e.g. 2197<code>/var/lib/sasl/</code>. </p> </li> 2198 2199<li> <p> Use the <code>saslpasswd</code> command instead of 2200<code>saslpasswd2</code> to create users in <code>sasldb</code>. 2201</p> </li> 2202 2203<li> <p> Use the <code>sasldblistusers</code> command instead of 2204<code>sasldblistusers2</code> to find users in <code>sasldb</code>. 2205</p> </li> 2206 2207<li> <p> In the <code>smtpd.conf</code> file you can't use 2208<code>mech_list</code> to limit the range of mechanisms offered. 2209Instead, remove their libraries from <code>/usr/lib/sasl/</code> 2210(and remember remove those files again when a system update 2211re-installs new versions). </p> </li> 2212 2213</ul> 2214 2215<h2><a name="credits">Credits</a></h2> 2216 2217<ul> 2218 2219<li> Postfix SASL support was originally implemented by Till Franke 2220of SuSE Rhein/Main AG. </li> 2221 2222<li> Wietse trimmed down the code to only the bare necessities. 2223 </li> 2224 2225<li> Support for Cyrus SASL version 2 was contributed by Jason Hoos. 2226</li> 2227 2228<li> Liviu Daia added smtpd_sasl_application_name, separated 2229reject_sender_login_mismatch into 2230reject_authenticated_sender_login_mismatch and 2231reject_unauthenticated_sender_login_mismatch, and revised the docs. 2232 </li> 2233 2234<li> Wietse made another iteration through the code to add plug-in 2235support for multiple SASL implementations, and for reasons that 2236have been lost, also changed smtpd_sasl_application_name into 2237smtpd_sasl_path. </li> 2238 2239<li> The Dovecot SMTP server-only plug-in was originally implemented 2240by Timo Sirainen of Procontrol, Finland. </li> 2241 2242<li> Patrick Ben Koetter revised this document for Postfix 2.4 and 2243made much needed updates. </li> 2244 2245<li> Patrick Ben Koetter revised this document again for Postfix 22462.7 and made much needed updates. </li> 2247 2248</ul> 2249 2250</body> 2251 2252</html> 2253 2254