PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix -> Anmeldung geht nicht



nr8
14.11.07, 13:20
huhu.

bin dabei meinen alten mail server durch einen neuen zu ersetzten.
als distri kommt ubuntu server 7.10 zum einsatz.

ich verwende postfix und cyrus-imap
beides authe ich über auxprop per mysql

main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = host.domain.at
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.domain.at, localhost
relayhost =
relay_domains = $mydestination
mynetworks = 0.0.0.0
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all


mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
virtual_maps = hash:/etc/postfix/virtual
#smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_recipient_access hash:/etc/postfix/access
virtual_alias_domains = domain1.at domain2.at domain3.at
virtual_alias_maps = hash:/etc/postfix/virtual
content_filter=smtp-amavis:[127.0.0.1]:10024

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = mail.domain.at
brocken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restriction =
permit_sasl_authenticated

smtpd.conf:

pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: LOGIN PLAIN CRAM-MD5 DIGEST-MD5 NTLM
log_level: 3

sql_engine: mysql
sql_hostname: localhost
sql_database: meinedb
sql_user: meinuser
sql_passwd: meinpw
sql_select: SELECT passwort FROM user WHERE nick = '%u'
sql_usessel: no

für den cyrus-imap verwende ich genau die gleiche DB und die gleichen settings und ich kann mich ohne probleme am cyrus anmelden und auch die mails eines alten backups lesen.

bei postfix wenn ich eine mail senden will geht dies leider nicht.
hier sind zwei logeinträge aus dem log:

Nov 13 17:15:33 hostname postfix/smtpd[9914]: warning: SASL authentication failure: Password verification failed
Nov 13 17:15:33 hostname postfix/smtpd[9914]: warning: IP-ADY: SASL PLAIN authentication failed: authentication failure

hat da jemand eine idee?
danke

nr8
19.11.07, 19:32
hat keiner eine idee?

nr8
25.11.07, 21:47
habe gerade mit

perl -MMIME::Base64 -e 'print encode_base64("username\0passwort);'
meine logindaten verschlüsselt und dann versucht mit einem telnet localhost 25 mich versucht zu authen.


root@server:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 host.domain.at ESMTP Postfix (Ubuntu)
ehlo domain.at
250-host.domain.at
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH CRAM-MD5 DIGEST-MD5 PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN c3Rvb...usw....
535 5.7.0 Error: authentication failed: bad protocol / cancel


hat da jemand eine idee wo das problem sein könnte?
weiss nicht mehr weiter.

bla!zilla
26.11.07, 15:14
Nimm mal bitte alles bis auf plain aus der mech_list raus.

nr8
28.11.07, 12:13
hab ich gemacht aber leider hat es nichts gebracht.
hab noch immer den gleichen fehler.

edit:
hier noch ein auszug von postconf | grep sasl

postconf | grep sasl
broken_sasl_auth_clients = no
lmtp_sasl_auth_enable = no
lmtp_sasl_mechanism_filter =
lmtp_sasl_password_maps =
lmtp_sasl_path =
lmtp_sasl_security_options = noplaintext, noanonymous
lmtp_sasl_tls_security_options = $lmtp_sasl_security_options
lmtp_sasl_tls_verified_security_options = $lmtp_sasl_tls_security_options
lmtp_sasl_type = cyrus
send_cyrus_sasl_authzid = no
smtp_sasl_auth_enable = no
smtp_sasl_mechanism_filter =
smtp_sasl_password_maps =
smtp_sasl_path =
smtp_sasl_security_options = noplaintext, noanonymous
smtp_sasl_tls_security_options = $smtp_sasl_security_options
smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options
smtp_sasl_type = cyrus
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_exceptions_networks =
smtpd_sasl_local_domain = mail.domain1.at
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = cyrus

nr8
28.11.07, 19:49
ich hab jetzt noch etwas anderes versucht.
man kann ja auch über pam das ganze machen.

ich bin dazu nach diesem howto (http://helpdesk.std-service.de/staticpages/index.php/2004111610415756) vorgegangen.

mein problem dabei ist jetzt wenn ich postfix neu starte bekomme ich diese meldung:


/etc/init.d/postfix start
* Starting Postfix Mail Transport Agent postfix
[: 117: /etc/pam.d/chfn: unexpected operator
[: 117: /usr/lib/sasl2/libanonymous.la: unexpected operator

langsam weiss ich echt nicht mehr weiter.
das kann ja nicht so ein problem sein postfix über sql authen zu lassen :(

vielleicht fällt ja einem von euch etwas ein.

danke

403
28.11.07, 22:57
Du hast einen Tipfehler in Zeile 117 von /etc/init.d/postfix, poste mal die Zeile
Und setz mal das Loglevel auf 7.

Mit auxprop_plugin: sql habe ich auch grade Schwierigkeiten. Ist das vielleicht
veraltet?

nr8
29.11.07, 08:08
ok. also in zeile 117 steht bei mir

exit 1 ;-)

und die editierte zeile sieht so aus

FILES="etc/localtime etc/services etc/resolv.conf etc/hosts \
etc/nsswitch.conf etc/nss_mdns.config etc/sasldb2 \
etc/pam.d/* usr/lib/sasl2/*"

403
02.12.07, 02:19
Ich vermute es liegt an der Expansion von *, versuch mal die Files einzeln anzugeben.

Gruss 403

nr8
03.12.07, 08:22
das sind aber nicht wenig :)

nr8
05.12.07, 08:51
hab das problem mit dem starten von postfix weg bekommen aber leider kann ich mit "testsaslauthd -u username -p password -f /var/spool/postfix/var/run/saslauthd/mux" keinen testlogin machen.

hier der log auszug:

Nov 28 21:10:08 u710f saslauthd[6036]: server_exit : master exited: 6036
Nov 28 21:10:08 u710f saslauthd[6228]: detach_tty : master pid is: 6228
Nov 28 21:10:08 u710f saslauthd[6228]: ipc_init : listening on socket: /var/spool/postfix/var/run/saslauthd/mux
Nov 28 21:10:16 u710f saslauthd[6229]: pam_unix(imap:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=stone
Nov 28 21:10:19 u710f saslauthd[6229]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Nov 28 21:10:19 u710f saslauthd[6229]: do_auth : auth failure: [user=stone] [service=imap] [realm=] [mech=pam] [reason=PAM auth error]


weiss jemand woran das liegen könnte?

danke

edit: vielleicht stimmt was mit meiner DB nicht. gibt es wo eine beispiel DB das ich weiss wie sie aussehen muss?