[Postfixbuch-users] SASL authentication failure: Can only find author (no password)

Kai Kuehne kai.kuehne at gmail.com
Di Okt 11 10:34:16 CEST 2005


Hallo Liste!

Ich habe ein Problem.. mein SMTP Auth will einfach nicht funktionieren.
Beim Login mit "AUTH PLAIN base64-code" erhalte ich obige
Fehlermeldung in den Maillogs. Den Code habe ich per "perl
-MMIME::Base64 -e 'print encode_base64('test\0test\0testpass')';"
erstellt.


Hier einmal die Ausgabe von saslfinger -s:

#######################################

saslfinger - postfix Cyrus sasl configuration Tue Oct 11 10:12:19 GMT 2005
version: 0.9.9.1
mode: server-side SMTP AUTH

-- basics --
Postfix: 2.1.5
System:
This is \n.\O (\s \m \r) \t

-- smtpd is linked to --
	libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x270c5000)

-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = example.com
smtpd_sasl_security_options = noanonymous


-- listing of /usr/lib/sasl2 --
total 772
drwxr-xr-x   2 root root  4096 Oct  8 15:47 .
drwxr-xr-x  26 root root 16384 Oct  9 12:36 ..
-rwxr-xr-x   1 root root   686 Oct  8 15:47 libanonymous.la
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 libanonymous.so
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 libanonymous.so.2
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 libanonymous.so.2.0.20
-rwxr-xr-x   1 root root   674 Oct  8 15:47 libcrammd5.la
-rwxr-xr-x   1 root root 22192 Oct  8 15:47 libcrammd5.so
-rwxr-xr-x   1 root root 22192 Oct  8 15:47 libcrammd5.so.2
-rwxr-xr-x   1 root root 22192 Oct  8 15:47 libcrammd5.so.2.0.20
-rwxr-xr-x   1 root root   704 Oct  8 15:47 libdigestmd5.la
-rwxr-xr-x   1 root root 55184 Oct  8 15:47 libdigestmd5.so
-rwxr-xr-x   1 root root 55184 Oct  8 15:47 libdigestmd5.so.2
-rwxr-xr-x   1 root root 55184 Oct  8 15:47 libdigestmd5.so.2.0.20
-rwxr-xr-x   1 root root   670 Oct  8 15:47 liblogin.la
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 liblogin.so
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 liblogin.so.2
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 liblogin.so.2.0.20
-rwxr-xr-x   1 root root   665 Oct  8 15:47 libntlm.la
-rwxr-xr-x   1 root root 38608 Oct  8 15:47 libntlm.so
-rwxr-xr-x   1 root root 38608 Oct  8 15:47 libntlm.so.2
-rwxr-xr-x   1 root root 38608 Oct  8 15:47 libntlm.so.2.0.20
-rwxr-xr-x   1 root root   670 Oct  8 15:47 libplain.la
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 libplain.so
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 libplain.so.2
-rwxr-xr-x   1 root root 18096 Oct  8 15:47 libplain.so.2.0.20
-rwxr-xr-x   1 root root   691 Oct  8 15:47 libsasldb.la
-rwxr-xr-x   1 root root 26312 Oct  8 15:47 libsasldb.so
-rwxr-xr-x   1 root root 26312 Oct  8 15:47 libsasldb.so.2
-rwxr-xr-x   1 root root 26312 Oct  8 15:47 libsasldb.so.2.0.20
-rwxr-xr-x   1 root root   713 Oct  8 15:47 libsql.la
-rwxr-xr-x   1 root root 26244 Oct  8 15:47 libsql.so
-rwxr-xr-x   1 root root 26244 Oct  8 15:47 libsql.so.2
-rwxr-xr-x   1 root root 26244 Oct  8 15:47 libsql.so.2.0.20

-- listing of /var/lib/sasl2 --
total 9
drwxr-xr-x   2 root root 4096 Oct 11 10:06 .
drwxr-xr-x  13 root root 4096 Oct  8 15:47 ..
-rw-r--r--   1 root root    0 Oct  8 15:47 .keep
-rw-r--r--   1 root root  323 Oct 11 10:08 smtpd.conf




-- content of /var/lib/sasl2/smtpd.conf --
log_level: 3
pwcheck_method: auxprop
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: localhost
sql_database: mail
sql_user: --- replaced ---
sql_passwd: --- replaced ---
sql_select: SELECT %p FROM virtual_users WHERE username = '%u' AND
userrealm = '%r' AND auth = '1'
sql_usessl: no



-- active services in /etc/postfix/master.cf --
#                     (yes)   (yes)   (yes)   (never) (100)
smtp            inet   n       -       n       -       -       smtpd -v
127.0.0.1:10025 inet   n       -       n       -       -       smtpd
	-o content_filter=
	-o local_recipient_maps=
	-o relay_recipient_maps=
	-o smtpd_restriction_classes=
	-o smtpd_client_restrictions=
	-o smtpd_helo_restrictions=
	-o smtpd_sender_restrictions=
	-o smtpd_recipient_restrictions=permit_mynetworks,reject
	-o mynetworks=127.0.0.0/8
	-o strict_rfc821_envelopes=yes

pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

amavisd-new	 unix    -    -    n    -    2    smtp
    -o smtp_data_done_timeout=1200s
    -o disable_dns_lookups=yes

-- mechanisms on localhost --
250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5
250-AUTH=LOGIN PLAIN DIGEST-MD5 CRAM-MD5

-- end of saslfinger output --

#######################################

Meine Benutzertabelle sieht so aus:

mysql> SELECT * FROM virtual_users;
|id|username|userrealm|userpassword|email|virtual_mailbox|virtual_uid|virtual_gid|auth|active|
|1|test|mail.example.com|testpass|||0|0|1||
1 row in set (0.00 sec)

mysql>

#######################################

Und hier noch die Ausgabe von postconf -n:

server # postconf -n
alias_maps = hash:/etc/mail/aliases
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
config_directory = /etc/postfix
content_filter = amavisd-new:[127.0.0.1]:10024
inet_interfaces = all
mail_owner = postfix
mydestination = $myhostname, $mydomain, localhost, localhost.$mydomain
mydomain = example.com
myhostname = mail.example.com
mynetworks = 192.168.0.0/24, 127.0.0.0/8
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions =
    reject_non_fqdn_sender
    reject_unknown_sender_domain
    permit_sasl_authenticated
    permit_mynetworks
    reject_unauth_destination
    check_recipient_access hash:/etc/postfix/roleaccount_exceptions
    reject_multi_recipient_bounce
    reject_non_fqdn_hostname
    reject_invalid_hostname
    check_helo_access pcre:/etc/postfix/helo_checks
    permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = example.com
smtpd_sasl_security_options = noanonymous
virtual_alias_maps = hash:/etc/postfix/virtual_mailbox_aliases
virtual_gid_maps = static:600
virtual_mailbox_base = /var/spool/virtual_mailboxes
virtual_mailbox_domains = abc.de, def.net, omg.org, wtf.de
virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_recipients
virtual_uid_maps = static:600


#######################################


Was habe ich bloß gemacht?
Danke schonmal fuer die Hilfe. :)

Gruß
Kai

PS: Falls ich irgendwas vergessen habe tuts mir leid. Bitte bescheid sagen.



Mehr Informationen über die Mailingliste Postfixbuch-users