Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
|
fortgeschrittene:postfix-sasl [2011/09/30 13:39] ingo_wichmann |
fortgeschrittene:postfix-sasl [2022/05/20 20:43] (aktuell) ingo_wichmann |
||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | |||
| ====== Benutzerauthentifizierung für postfix ====== | ====== Benutzerauthentifizierung für postfix ====== | ||
| Vorraussetzung: [[postfix]] [[sasl]] | Vorraussetzung: [[postfix]] [[sasl]] | ||
| Zeile 5: | Zeile 6: | ||
| ===== Benötigte Pakete ===== | ===== Benötigte Pakete ===== | ||
| - | SuSE: | + | * ''postfix'' ( SuSE ) |
| - | postfix | + | * ''postfix sasl2-bin'' ( Debian ab 4.0 ): |
| - | Debian ( ab 3.1 ): | + | * ''cyrus-sasl cyrus-sasl-plain'' (CentOS ab 7 ) |
| - | postfix postfix-tls sasl2-bin | + | |
| - | Debian ( ab 4.0 ): | + | |
| - | postfix sasl2-bin | + | |
| - | Fedora ( ab 2 ) / CentOS ( ab 4 ): | + | |
| - | ?? | + | |
| ===== postfix - saslauthd ===== | ===== postfix - saslauthd ===== | ||
| Zeile 48: | Zeile 43: | ||
| </file> | </file> | ||
| + | === saslauthd testen === | ||
| + | testsaslauthd -s login -u username -p password | ||
| ==== Konfiguration mit Postfix-Chroot ==== | ==== Konfiguration mit Postfix-Chroot ==== | ||
| Zeile 74: | Zeile 71: | ||
| /etc/init.d/postfix restart | /etc/init.d/postfix restart | ||
| | | ||
| - | == SuSE 10.2 == | + | == SuSE 12.1 == |
| + | mkdir -p /var/spool/postfix/var/run/ | ||
| mv /var/run/sasl2 /var/spool/postfix/var/run/ | mv /var/run/sasl2 /var/spool/postfix/var/run/ | ||
| ln -s /var/spool/postfix/var/run/sasl2 /var/run/sasl2 | ln -s /var/spool/postfix/var/run/sasl2 /var/run/sasl2 | ||
| + | (( | ||
| + | Nicht notwendig, erhöht aber vielleicht die Sicherheit: | ||
| + | groupadd sasl | ||
| groupmod -A postfix sasl | groupmod -A postfix sasl | ||
| + | chgrp sasl /var/spool/postfix/var/run/sasl2 | ||
| + | chmod 750 /var/spool/postfix/var/run/sasl2 | ||
| + | )) | ||
| /etc/init.d/saslauthd restart | /etc/init.d/saslauthd restart | ||
| /etc/init.d/postfix restart | /etc/init.d/postfix restart | ||
| === SASL Testen === | === SASL Testen === | ||
| + | == Debian == | ||
| testsaslauthd -u username -p password -f /var/spool/postfix/var/run/saslauthd/mux | testsaslauthd -u username -p password -f /var/spool/postfix/var/run/saslauthd/mux | ||
| + | == openSuSE 12.1 == | ||
| + | testsaslauthd -u username -p password -s login -f /var/spool/postfix/var/run/sasl2/mux | ||
| ===== postfix - auxprop ===== | ===== postfix - auxprop ===== | ||
| Zeile 93: | Zeile 100: | ||
| smtpd_sasl_auth_enable = yes | smtpd_sasl_auth_enable = yes | ||
| smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination | smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination | ||
| + | broken_sasl_auth_clients = yes | ||
| </file> | </file> | ||
| Zeile 138: | Zeile 146: | ||
| Authentifizierung testen: | Authentifizierung testen: | ||
| - | netcat localhost 25 | + | netcat -v localhost 25 |
| 220 notebook12.linuxhotel.de ESMTP Postfix (Debian/GNU) | 220 notebook12.linuxhotel.de ESMTP Postfix (Debian/GNU) | ||
| EHLO localhost | EHLO localhost | ||
| Zeile 155: | Zeile 163: | ||
| ==== Debian ==== | ==== Debian ==== | ||
| * /usr/share/doc/sasl2-bin/README.Debian | * /usr/share/doc/sasl2-bin/README.Debian | ||
| - | |||
| - | |||
| - | ===== Bug Debian Etch ===== | ||
| - | Fehlermeldung: | ||
| - | ''looking for plugins in '/usr/lib/sasl2', failed to open directory, error: No such file or directory'' | ||
| - | |||
| - | Workaround: | ||
| - | mkdir -p /var/spool/postfix/usr/lib/sasl2 | ||
| - | |||
| - | Siehe auch: | ||
| - | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426338 | ||
| - | |||