Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


fortgeschrittene:postfix-sasl

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Nächste Überarbeitung
Vorherige Überarbeitung
fortgeschrittene:postfix-sasl [2009/10/21 17:38]
127.0.0.1 Externe Bearbeitung
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 )
-  postfix ​postfix-tls ​sasl2-bin +
-Debian ​ab 4.0 ): +
-  ​postfix sasl2-bin +
-Fedora ​ab 2 ) / CentOS ​ ​( ​ab )+
-  ?? +
  
 ===== postfix - saslauthd ===== ===== postfix - saslauthd =====
Zeile 25: Zeile 20:
 ''/​etc/​postfix/​sasl/​smtpd.conf''​ : Debian (ab 3.1) ''/​etc/​postfix/​sasl/​smtpd.conf''​ : Debian (ab 3.1)
  
-''/​usr/lib/​sasl2/​smtpd.conf''​ : openSuSE ( 11.), CentOS (ab 4):+''/​etc/​sasl2/​smtpd.conf''​ : openSuSE ( ab 11.), CentOS (ab 4):
  
 <​file>​ <​file>​
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.==+== SuSE 12.== 
 +  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 131: Zeile 139:
   swaks -f from@example.com -t to@example.com -s localhost -a -au nutzer14 -ap test -apt   swaks -f from@example.com -t to@example.com -s localhost -a -au nutzer14 -ap test -apt
  
-=== telnet ===+=== netcat / telnet ===
 Encodiertes Passwort erzeugen: Encodiertes Passwort erzeugen:
   perl -MMIME::​Base64 -e 'print encode_base64("​iw\0iw\0passwort"​)'​   perl -MMIME::​Base64 -e 'print encode_base64("​iw\0iw\0passwort"​)'​
Zeile 138: Zeile 146:
  
 Authentifizierung testen: Authentifizierung testen:
-  ​telnet ​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 
- 
  
fortgeschrittene/postfix-sasl.1256146698.txt.gz · Zuletzt geändert: 2011/04/21 08:38 (Externe Bearbeitung)