[Postfixbuch-users] SMTP-AUTH über MySql unter SuSE 9.1 pro

Thomas Arndt thomas.arndt at netcologne.de
Sa Okt 16 16:50:14 CEST 2004


Hallo Liste,
habe die Hinweise von Andreas und Patrick umgesetzt.
> Hmm, entweder saslauthd oder das sql-auxprop-plugin. saslauthd/pam dürfte
> bei Suse dabei sein. Das sql-auxprop-plugin müsstest Du selber erstellen.
> Hast DU das getan?

Habe auf meiner Testmaschine Cyrus_Sasl deinstalliert und aus den Quellen neu 
installiert.
Link von /usr/local/lib/sasl2 > /usr/lib/sasl2 gesetzt.

Mit dem Saslfinger von Patrick's Site getestet, resultat nachfolgend:

Welcome to SuSE Linux 9.0 (i586) - Kernel \r (\l).
-- smtpd is linked to --
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x40094000)

-- active SMTP AUTH parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous

-- listing of /usr/lib/sasl2 --
total 1728
drwxr-xr-x    2 root     root         4096 Oct 16 16:35 .
drwxr-xr-x    3 root     root         4096 Oct 16 14:16 ..
-rwxr-xr-x    1 root     root          686 Oct 16 14:16 libanonymous.la
-rwxr-xr-x    1 root     root        47937 Oct 16 14:16 libanonymous.so
-rwxr-xr-x    1 root     root        47937 Oct 16 14:16 libanonymous.so.2
-rwxr-xr-x    1 root     root        47937 Oct 16 14:16 libanonymous.so.2.0.19
-rwxr-xr-x    1 root     root          674 Oct 16 14:16 libcrammd5.la
-rwxr-xr-x    1 root     root        52801 Oct 16 14:16 libcrammd5.so
-rwxr-xr-x    1 root     root        52801 Oct 16 14:16 libcrammd5.so.2
-rwxr-xr-x    1 root     root        52801 Oct 16 14:16 libcrammd5.so.2.0.19
-rwxr-xr-x    1 root     root          704 Oct 16 14:16 libdigestmd5.la
-rwxr-xr-x    1 root     root        99137 Oct 16 14:16 libdigestmd5.so
-rwxr-xr-x    1 root     root        99137 Oct 16 14:16 libdigestmd5.so.2
-rwxr-xr-x    1 root     root        99137 Oct 16 14:16 libdigestmd5.so.2.0.19
-rwxr-xr-x    1 root     root          670 Oct 16 14:16 liblogin.la
-rwxr-xr-x    1 root     root        48833 Oct 16 14:16 liblogin.so
-rwxr-xr-x    1 root     root        48833 Oct 16 14:16 liblogin.so.2
-rwxr-xr-x    1 root     root        48833 Oct 16 14:16 liblogin.so.2.0.19
-rwxr-xr-x    1 root     root          659 Oct 16 14:16 libotp.la
-rwxr-xr-x    1 root     root       102921 Oct 16 14:16 libotp.so
-rwxr-xr-x    1 root     root       102921 Oct 16 14:16 libotp.so.2
-rwxr-xr-x    1 root     root       102921 Oct 16 14:16 libotp.so.2.0.19
-rwxr-xr-x    1 root     root          670 Oct 16 14:16 libplain.la
-rwxr-xr-x    1 root     root        48695 Oct 16 14:16 libplain.so
-rwxr-xr-x    1 root     root        48695 Oct 16 14:16 libplain.so.2
-rwxr-xr-x    1 root     root        48695 Oct 16 14:16 libplain.so.2.0.19
-rwxr-xr-x    1 root     root          686 Oct 16 14:16 libsasldb.la
-rwxr-xr-x    1 root     root        81609 Oct 16 14:16 libsasldb.so
-rwxr-xr-x    1 root     root        81609 Oct 16 14:16 libsasldb.so.2
-rwxr-xr-x    1 root     root        81609 Oct 16 14:16 libsasldb.so.2.0.19
-rwxr-xr-x    1 root     root          681 Oct 16 14:16 libsql.la
-rwxr-xr-x    1 root     root        57865 Oct 16 14:16 libsql.so
-rwxr-xr-x    1 root     root        57865 Oct 16 14:16 libsql.so.2
-rwxr-xr-x    1 root     root        57865 Oct 16 14:16 libsql.so.2.0.19
-rw-------    1 root     root          231 Oct 16 16:37 smtpd.conf
-rw-------    1 root     root           49 Oct 16 16:35 smtpd.conf.org

-- mechanisms on localhost --
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN

-- content of /usr/lib/sasl2/smtpd.conf --
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
sql_engine:     mysql
sql_hostnames:  localhost
sql_user: --- replaced ---
sql_passwd:      --- replaced ---
sql_database:   provider
sql_select:     select password from users where email='%u@%r'

-- active services in /etc/postfix/master.cf --
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
smtp      inet  n       -       n       -       2       smtpd
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
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
localhost:10025 inet    n       -       n       -       -       smtpd -o 
content_filter=
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/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
vscan     unix  -       n       n       -       10       pipe
  user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail  unix  -       n       n       -       -       pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} 
${recipient}
smtp-amavis unix -      -       n       -       2       smtp
  -o smtp_data_done_timeout=1800
  -o disable_dns_lookups=yes
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
discard   unix  -       -       n       -       -       discard
-- end of saslfinger output --

Logauszug:
.....
Oct 16 16:38:06 mail postfix/smtpd[32079]: connect from unknown[192.168.2.234]
Oct 16 16:38:07 mail postfix/smtpd[32079]: 4993D240CE: 
client=unknown[192.168.2.234], sasl_method=PLAIN, sasl_username=klaus at test.de
Oct 16 16:38:07 mail postfix/cleanup[32089]: 4993D240CE: 
message-id=<200410161636.38023.klaus at test.de>
Oct 16 16:38:07 mail postfix/qmgr[31892]: 4993D240CE: from=<klaus at test.de>, 
size=497, nrcpt=1 (queue active)
Oct 16 16:38:07 mail amavis[30861]: (30861-01) 
ESMTP::10024 /var/spool/amavis/amavis-20041016T163807-30861: 
<klaus at test.de>-> <klaus at test.de> Received: SIZE=497 from mail.mein.netz 
([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with 
ESMTP id 30861-01 for <klaus at test.de>; Sat, 16 Oct 2004 16:38:07 +0200 (CEST)
Oct 16 16:38:07 mail postfix/smtpd[32079]: disconnect from 
unknown[192.168.2.234]
Oct 16 16:38:07 mail amavis[30861]: (30861-01) Checking: <klaus at test.de> -> 
<klaus at test.de>
Oct 16 16:38:08 mail amavis[30861]: (30861-01) spam_scan: hits=0 tests=
Oct 16 16:38:08 mail amavis[30861]: (30861-01) FWD via SMTP: [127.0.0.1:10025] 
<klaus at test.de> -> <klaus at test.de>
Oct 16 16:38:08 mail postfix/smtpd[32096]: connect from localhost[127.0.0.1]
Oct 16 16:38:08 mail postfix/smtpd[32096]: 571B4240CF: 
client=localhost[127.0.0.1]
Oct 16 16:38:08 mail postfix/cleanup[32089]: 571B4240CF: 
message-id=<200410161636.38023.klaus at test.de>
Oct 16 16:38:08 mail postfix/qmgr[31892]: 571B4240CF: from=<klaus at test.de>, 
size=900, nrcpt=1 (queue active)
Oct 16 16:38:08 mail amavis[30861]: (30861-01) Passed, <klaus at test.de> -> 
<klaus at test.de>, Message-ID: <200410161636.38023.klaus at test.de>, Hits: 0
Oct 16 16:38:08 mail amavis[30861]: (30861-01) TIMING [total 1075 ms] - SMTP 
EHLO: 2 (0%), SMTP pre-MAIL: 0 (0%), mkdir tempdir: 0 (0%), create email.txt: 
0 (0%), SMTP pre-DATA-flush: 3 (0%), SMTP DATA: 37 (3%), body hash: 1 (0%), 
mkdir parts: 1 (0%), mime_decode: 10 (1%), get-file-type: 7 (1%), 
decompose_part: 1 (0%), parts: 0 (0%), AV-scan-1: 174 (16%), AV-scan-2: 390 
(36%), SA msg read: 1 (0%), SA parse: 1 (0%), SA check: 339 (32%), 
fwd-connect: 20 (2%), fwd-mail-from: 1 (0%), fwd-rcpt-to: 8 (1%), 
write-header: 2 (0%), fwd-data: 0 (0%), fwd-data-end: 71 (7%), fwd-rundown: 1 
(0%), unlink-1-files: 3 (0%), rundown: 0 (0%)
Oct 16 16:38:08 mail postfix/smtp[32092]: 4993D240CE: to=<klaus at test.de>, 
relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=30861-01, 
from MTA: 250 Ok: queued as 571B4240CF)
Oct 16 16:38:08 mail postfix/qmgr[31892]: 4993D240CE: removed
Oct 16 16:38:08 mail postfix/smtpd[32096]: disconnect from 
localhost[127.0.0.1]
Oct 16 16:38:08 mail postfix/virtual[32099]: 571B4240CF: to=<klaus at test.de>, 
relay=virtual, delay=0, status=sent (deliveredto maildir)
.....

Mailversand mit SMTP-AUTH über MySQL klappt somit.
Danke für eure Hilfe und Hinweise.
Man wird halt Betriebsblind.


Grüße
Thomas Arndt
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : nicht verfügbar
Dateityp    : application/pgp-signature
Dateigröße  : 189 bytes
Beschreibung: nicht verfügbar
URL         : <https://listi.jpberlin.de/pipermail/postfixbuch-users/attachments/20041016/3f19466d/attachment.sig>


Mehr Informationen über die Mailingliste Postfixbuch-users