PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : courier-imap und mysql-db Auth klappt leider nicht



Pestilence
05.06.06, 12:18
Ich richte gerade einen Mailserver
mittels courier-imap und mysql-db Auth ein.

Ich habe mich da nach folgendem Howto gerichtet.
http://www.linux-club.de/ftopic59167.html#339829

Nur leider scheint die Authorisierung nicht wirklich zu funtionieren.
Alle Services laufen soweit und lassen sich z.B. mit Outlook ansprechen.
Nur leider kann ich micht nicht einloggen.

Fehlermeldung (Server) beim Abholen per Client



Jun 5 12:06:34 h636726 postfix/smtpd[23861]: connect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:34 h636726 postfix/smtpd[23861]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Jun 5 12:06:34 h636726 postfix/smtpd[23861]: warning: pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]: SASL LOGIN authentication failed
Jun 5 12:06:34 h636726 postfix/smtpd[23861]: lost connection after AUTH from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:34 h636726 postfix/smtpd[23861]: disconnect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:38 h636726 postfix/smtpd[23861]: connect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:38 h636726 postfix/smtpd[23861]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Jun 5 12:06:38 h636726 postfix/smtpd[23861]: warning: pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]: SASL LOGIN authentication failed
Jun 5 12:06:38 h636726 postfix/smtpd[23861]: lost connection after AUTH from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:38 h636726 postfix/smtpd[23861]: disconnect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:39 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 12:06:39 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 12:06:39 h636726 pop3d: authentication error: Input/output error
Jun 5 12:06:40 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 12:06:41 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 12:06:41 h636726 pop3d: authentication error: Input/output error
Jun 5 12:06:41 h636726 postfix/smtpd[23861]: connect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:42 h636726 postfix/smtpd[23861]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Jun 5 12:06:42 h636726 postfix/smtpd[23861]: warning: pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]: SASL LOGIN authentication failed
Jun 5 12:06:42 h636726 postfix/smtpd[23861]: lost connection after AUTH from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:42 h636726 postfix/smtpd[23861]: disconnect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:44 h636726 postfix/smtpd[23861]: connect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:44 h636726 postfix/smtpd[23861]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Jun 5 12:06:44 h636726 postfix/smtpd[23861]: warning: pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]: SASL LOGIN authentication failed
Jun 5 12:06:44 h636726 postfix/smtpd[23861]: lost connection after AUTH from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 12:06:44 h636726 postfix/smtpd[23861]: disconnect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]



Beim Versuch das pber nen "Telnet localhost 110" auf imap zu versuchen kommt dann sowas.



-ERR Temporary problem, please try again later
Connection closed by foreign host.


Hiernochmal ein postconf -n



biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = phpforge.de
myhostname = phpforge.de
mynetworks = xx.xxx.xx.xxx/32, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/packages/postfix/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions = permit_mynetworks,check_client_access hash:/etc/postfix/pop-before-smtp,permit_sasl_authenticated,reject_unauth_desti nation
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options =
smtpd_tls_auth_only = no
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:5001
virtual_mailbox_base = /var/spool/maildirs
virtual_mailbox_maps = mysql:/etc/postfix/mailbox.mysql
virtual_minimum_uid = 5000
virtual_uid_maps = static:5001


SIeht da wer vielleicht einen Ansatzpunkt wie ich weiter kommen könnte?

Jeder noch so kleine Schritt könnte mir helfen.

drcux
05.06.06, 13:38
rcsaslauthd start

Pestilence
05.06.06, 13:41
Hm war jetzt im Momment nicht gestartet, aber war es bei früheren Versuchen.

Wenn dieser gestartet ist, sieht die Maillog so aus:



Jun 5 13:36:45 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 13:36:45 h636726 pop3d: authentication error: Input/output error
Jun 5 13:36:46 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 13:36:46 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 13:36:46 h636726 pop3d: authentication error: Input/output error
Jun 5 13:36:46 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 13:36:47 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 13:36:47 h636726 pop3d: authentication error: Input/output error
Jun 5 13:38:50 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 13:38:50 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 13:38:50 h636726 pop3d: authentication error: Input/output error
Jun 5 13:38:52 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 13:38:52 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 13:38:52 h636726 pop3d: authentication error: Input/output error
Jun 5 13:38:52 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 13:38:52 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 13:38:52 h636726 pop3d: authentication error: Input/output error
Jun 5 13:38:53 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 13:38:53 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 13:38:53 h636726 pop3d: authentication error: Input/output error



Bin da irgendwie schon stark am verzweifeln woran es überhaupt liegt.

michael.sprick
05.06.06, 14:07
mysql Server gestartet?
Zugangsdaten für courier richtig gesetzt und gültig?

Setz doch mal



log = /tmp/mysqld.sql


in Deiner my.cnf und mach während des Loginvorgangs mal ein



tail -f /tmp/mysqld.log


Gruß, Michael

Pestilence
05.06.06, 14:15
Nur um das vielleicht verständlicher dar zu stellen.


Man meldet sich über den authdaemond an.

Dieser tut laut "ps ax | grep authdaemond" seinen Dienst:



5846 pts/1 Ss+ 0:00 /usr/local/libexec/courier-authlib/authdaemond
5847 pts/1 S+ 0:00 /usr/local/libexec/courier-authlib/authdaemond
5848 pts/1 S+ 0:00 /usr/local/libexec/courier-authlib/authdaemond
5849 pts/1 S+ 0:00 /usr/local/libexec/courier-authlib/authdaemond
5850 pts/1 S+ 0:00 /usr/local/libexec/courier-authlib/authdaemond
5851 pts/1 S+ 0:00 /usr/local/libexec/courier-authlib/authdaemond


Dieser hat dann die Daten für die MySQL Datenbank hinterlegt und sollte diese dann auch überprüfen laut:

/etc/postfix/ids.mysql und /etc/postfix/mailbox.mysql

Die Mails sollten dann aus und in die Virtuellen Postfächer gehen wie in der main.cf von Postfix eingetragen:



#Virtuelle Mailbox
virtual_mailbox_base =/var/spool/maildirs
virtual_mailbox_maps = mysql:/etc/postfix/mailbox.mysql
virtual_maps = hash:/etc/postfix/virtual
virtual_minimum_uid = 5000
virtual_uid_maps = static:5001
virtual_gid_maps = static:5001


Dann wurde noch die Datei etc/postfix/transport geändert und am Ende einfügen. (um das ganze mit den Virtuellen Postfach zu verknüpfen)

phpforge.de virtual:


Vielleicht ist es nun etwas klarer?!

Pestilence
05.06.06, 14:23
Also in den mysqld.log steht nach einem Neustart nix ausser:



/usr/sbin/mysqld-max: ready for connections.
Version: '4.1.10a-Max' socket: '/var/lib/mysql/mysql.sock' port: 3306 SUSE MySQL RPM

michael.sprick
05.06.06, 14:28
Für die Authentifizierung beim Abholen der Mails sind aber die Zugangsdaten in der /etc/courier/authmysqlrc relevant.



MYSQL_SERVER localhost
MYSQL_USERNAME VMAIL
MYSQL_PASSWORD GEHEIM
MYSQL_DATABASE VMAIL
MYSQL_USER_TABLE Accounts


Außerdem sollte in der authdeamonrc mindestens folgendes stehen:


authmodulelist="authmysql"


Zusätzlich könntest Du mal


DEBUG_LOGIN=2

reinsetzen... evtl. gibt das etwas mehr debugging info...

Zu meinem vorherigen Posting: Wenn die zugangsdaten nicht stimmen, oder der mysql Server nicht läuft, erhält man z. B. den von Dir geposteten Fehler... Das "tail ...." solltest Du machen um sicherzustellen, dass courier wirklich die richtigen Felder abfragt und die SELECTS richtig zusammengebaut sind...

Pestilence
05.06.06, 14:47
Inhalt meiner /usr/local/etc/authlib/authlibdaemonrc




authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=5
authdaemonvar=/usr/local/var/spool/authdaemon
DEBUG_LOGIN=2 <- nun geändert
DEFAULTOPTIONS=""
LOGGEROPTS=""



und meiner /usr/local/etc/authlib/authmysqlrc




MYSQL_SERVER localhost
MYSQL_USERNAME X
MYSQL_PASSWORD X
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE Postfix
MYSQL_USER_TABLE mailuser
MYSQL_CRYPT_PWFIELD crypt
MYSQL_CLEAR_PWFIELD password
DEFAULT_DOMAIN phpforge.de
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD account
MYSQL_HOME_FIELD home
MYSQL_NAME_FIELD account



MySQL läuft und die DB sieht so aus. (bitte Thumb klicken)

http://picit.pestiserve.com/thumbnail_postfix.jpg (http://picit.pestiserve.com/postfix.jpg)


edit:

Nach dem ändern des Loglevel siehts nun so aus ?



Jun 5 14:50:00 h636726 postfix/smtpd[7875]: warning: pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]: SASL LOGIN authentication failed
Jun 5 14:50:00 h636726 postfix/smtpd[7875]: lost connection after AUTH from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 14:50:00 h636726 postfix/smtpd[7875]: disconnect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 14:50:03 h636726 pop3d: Connection, ip=[::ffff:217.226.134.155]
Jun 5 14:50:03 h636726 pop3d: LOGIN FAILED, user=maltenintz@phpforge.de, ip=[::ffff:217.226.134.155]
Jun 5 14:50:03 h636726 pop3d: authentication error: Input/output error
Jun 5 14:50:03 h636726 postfix/smtpd[7875]: connect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 14:50:04 h636726 postfix/smtpd[7875]: warning: SASL authentication failure: cannot connect to Courier authdaemond: Permission denied
Jun 5 14:50:04 h636726 postfix/smtpd[7875]: warning: pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]: SASL LOGIN authentication failed
Jun 5 14:50:04 h636726 postfix/smtpd[7875]: lost connection after AUTH from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]
Jun 5 14:50:04 h636726 postfix/smtpd[7875]: disconnect from pD9E2869B.dip0.t-ipconnect.de[217.226.134.155]