postfix + mysql + php

cedric
Posts: 14
Joined: 2002-12-26 20:18

postfix + mysql + php

Post by cedric »

Hallo,

ich habe folgende Konfiguration:
Server1 - Webserver
Server2 - Mailserver(Postfix+MySQL)

Server1 macht Relay (mit Postfix) auf Server2, damit den Kunden mails versenden können. Nun existieren aber keine lokalen Benutzer und ich bekomme im mail.err log die fehlermeldung

postfix/sendmail[12256]: fatal: no login name found for user ID 10000

wenn ich eine Mail via PHP versende. Nun möchte ich den Kunden nicht zumuten immer SMTP Verbindungen aufzubauen, allerdings beachtet PHP die SMTP Einstellung nicht (steht ja auch nur Win32 da).

Wie kann ich das lösen?
(PHP Scripte laufen unter keinem Systemnutzer sondern nur unter einer (virtuellen) UserID via suPHP
hier meine Configs:

# saslfinger -s
---
saslfinger - postfix Cyrus sasl configuration Fri Mar 30 11:49:16 UTC 2007
version: 1.0.1
mode: server-side SMTP AUTH

-- basics --
Postfix: 2.3.8
System: Debian GNU/Linux 4.0 n l

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

-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.key
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s


-- listing of /usr/lib/sasl2 --
total 932
drwxr-xr-x 2 root root 4096 2007-03-30 10:59 .
drwxr-xr-x 30 root root 16384 2007-03-27 16:21 ..
-rw-r--r-- 1 root root 18868 2006-12-13 21:52 libanonymous.a
-rw-r--r-- 1 root root 855 2006-12-13 21:52 libanonymous.la
-rw-r--r-- 1 root root 15792 2006-12-13 21:52 libanonymous.so
-rw-r--r-- 1 root root 15792 2006-12-13 21:52 libanonymous.so.2
-rw-r--r-- 1 root root 15792 2006-12-13 21:52 libanonymous.so.2.0.22
-rw-r--r-- 1 root root 21754 2006-12-13 21:52 libcrammd5.a
-rw-r--r-- 1 root root 841 2006-12-13 21:52 libcrammd5.la
-rw-r--r-- 1 root root 19184 2006-12-13 21:52 libcrammd5.so
-rw-r--r-- 1 root root 19184 2006-12-13 21:52 libcrammd5.so.2
-rw-r--r-- 1 root root 19184 2006-12-13 21:52 libcrammd5.so.2.0.22
-rw-r--r-- 1 root root 60216 2006-12-13 21:52 libdigestmd5.a
-rw-r--r-- 1 root root 864 2006-12-13 21:52 libdigestmd5.la
-rw-r--r-- 1 root root 48504 2006-12-13 21:52 libdigestmd5.so
-rw-r--r-- 1 root root 48504 2006-12-13 21:52 libdigestmd5.so.2
-rw-r--r-- 1 root root 48504 2006-12-13 21:52 libdigestmd5.so.2.0.22
-rw-r--r-- 1 root root 19094 2006-12-13 21:52 liblogin.a
-rw-r--r-- 1 root root 835 2006-12-13 21:52 liblogin.la
-rw-r--r-- 1 root root 16424 2006-12-13 21:52 liblogin.so
-rw-r--r-- 1 root root 16424 2006-12-13 21:52 liblogin.so.2
-rw-r--r-- 1 root root 16424 2006-12-13 21:52 liblogin.so.2.0.22
-rw-r--r-- 1 root root 38700 2006-12-13 21:52 libntlm.a
-rw-r--r-- 1 root root 829 2006-12-13 21:52 libntlm.la
-rw-r--r-- 1 root root 32520 2006-12-13 21:52 libntlm.so
-rw-r--r-- 1 root root 32520 2006-12-13 21:52 libntlm.so.2
-rw-r--r-- 1 root root 32520 2006-12-13 21:52 libntlm.so.2.0.22
-rw-r--r-- 1 root root 19134 2006-12-13 21:52 libplain.a
-rw-r--r-- 1 root root 835 2006-12-13 21:52 libplain.la
-rw-r--r-- 1 root root 16392 2006-12-13 21:52 libplain.so
-rw-r--r-- 1 root root 16392 2006-12-13 21:52 libplain.so.2
-rw-r--r-- 1 root root 16392 2006-12-13 21:52 libplain.so.2.0.22
-rw-r--r-- 1 root root 29100 2006-12-13 21:52 libsasldb.a
-rw-r--r-- 1 root root 856 2006-12-13 21:52 libsasldb.la
-rw-r--r-- 1 root root 21456 2006-12-13 21:52 libsasldb.so
-rw-r--r-- 1 root root 21456 2006-12-13 21:52 libsasldb.so.2
-rw-r--r-- 1 root root 21456 2006-12-13 21:52 libsasldb.so.2.0.22
-rw-r--r-- 1 root root 33056 2006-12-13 21:52 libsql.a
-rw-r--r-- 1 root root 964 2006-12-13 21:52 libsql.la
-rw-r--r-- 1 root root 27872 2006-12-13 21:52 libsql.so
-rw-r--r-- 1 root root 27872 2006-12-13 21:52 libsql.so.2
-rw-r--r-- 1 root root 27872 2006-12-13 21:52 libsql.so.2.0.22




-- content of /etc/postfix/sasl/smtpd.conf --
pwcheck_method: saslauthd auxprop
mech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
allowanonymouslogin: no
allowplaintext: yes
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: --- replaced ---
sql_passwd: --- replaced ---
sql_database: syscp
sql_statement: select password_enc from mail_users where email='%u@%r'
sql_verbose: yes


-- 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 - - smtpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - - - - smtp
-o fallback_relay=
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}

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

-- end of saslfinger output --
# saslfinger -c
saslfinger - postfix Cyrus sasl configuration Fri Mar 30 11:51:17 UTC 2007
version: 1.0.1
mode: client-side SMTP AUTH

-- basics --
Postfix: 2.3.8
System: Debian GNU/Linux 4.0 n l

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

-- active SMTP AUTH and TLS parameters for smtp --
relayhost = mx1.domain.tld
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes


-- listing of /usr/lib/sasl2 --
total 932
drwxr-xr-x 2 root root 4096 2007-03-30 10:59 .
drwxr-xr-x 30 root root 16384 2007-03-27 16:21 ..
-rw-r--r-- 1 root root 18868 2006-12-13 21:52 libanonymous.a
-rw-r--r-- 1 root root 855 2006-12-13 21:52 libanonymous.la
-rw-r--r-- 1 root root 15792 2006-12-13 21:52 libanonymous.so
-rw-r--r-- 1 root root 15792 2006-12-13 21:52 libanonymous.so.2
-rw-r--r-- 1 root root 15792 2006-12-13 21:52 libanonymous.so.2.0.22
-rw-r--r-- 1 root root 21754 2006-12-13 21:52 libcrammd5.a
-rw-r--r-- 1 root root 841 2006-12-13 21:52 libcrammd5.la
-rw-r--r-- 1 root root 19184 2006-12-13 21:52 libcrammd5.so
-rw-r--r-- 1 root root 19184 2006-12-13 21:52 libcrammd5.so.2
-rw-r--r-- 1 root root 19184 2006-12-13 21:52 libcrammd5.so.2.0.22
-rw-r--r-- 1 root root 60216 2006-12-13 21:52 libdigestmd5.a
-rw-r--r-- 1 root root 864 2006-12-13 21:52 libdigestmd5.la
-rw-r--r-- 1 root root 48504 2006-12-13 21:52 libdigestmd5.so
-rw-r--r-- 1 root root 48504 2006-12-13 21:52 libdigestmd5.so.2
-rw-r--r-- 1 root root 48504 2006-12-13 21:52 libdigestmd5.so.2.0.22
-rw-r--r-- 1 root root 19094 2006-12-13 21:52 liblogin.a
-rw-r--r-- 1 root root 835 2006-12-13 21:52 liblogin.la
-rw-r--r-- 1 root root 16424 2006-12-13 21:52 liblogin.so
-rw-r--r-- 1 root root 16424 2006-12-13 21:52 liblogin.so.2
-rw-r--r-- 1 root root 16424 2006-12-13 21:52 liblogin.so.2.0.22
-rw-r--r-- 1 root root 38700 2006-12-13 21:52 libntlm.a
-rw-r--r-- 1 root root 829 2006-12-13 21:52 libntlm.la
-rw-r--r-- 1 root root 32520 2006-12-13 21:52 libntlm.so
-rw-r--r-- 1 root root 32520 2006-12-13 21:52 libntlm.so.2
-rw-r--r-- 1 root root 32520 2006-12-13 21:52 libntlm.so.2.0.22
-rw-r--r-- 1 root root 19134 2006-12-13 21:52 libplain.a
-rw-r--r-- 1 root root 835 2006-12-13 21:52 libplain.la
-rw-r--r-- 1 root root 16392 2006-12-13 21:52 libplain.so
-rw-r--r-- 1 root root 16392 2006-12-13 21:52 libplain.so.2
-rw-r--r-- 1 root root 16392 2006-12-13 21:52 libplain.so.2.0.22
-rw-r--r-- 1 root root 29100 2006-12-13 21:52 libsasldb.a
-rw-r--r-- 1 root root 856 2006-12-13 21:52 libsasldb.la
-rw-r--r-- 1 root root 21456 2006-12-13 21:52 libsasldb.so
-rw-r--r-- 1 root root 21456 2006-12-13 21:52 libsasldb.so.2
-rw-r--r-- 1 root root 21456 2006-12-13 21:52 libsasldb.so.2.0.22
-rw-r--r-- 1 root root 33056 2006-12-13 21:52 libsql.a
-rw-r--r-- 1 root root 964 2006-12-13 21:52 libsql.la
-rw-r--r-- 1 root root 27872 2006-12-13 21:52 libsql.so
-rw-r--r-- 1 root root 27872 2006-12-13 21:52 libsql.so.2
-rw-r--r-- 1 root root 27872 2006-12-13 21:52 libsql.so.2.0.22


-- permissions for /etc/postfix/sasl_passwd --
-rw-r--r-- 1 root root 52 2007-03-30 10:54 /etc/postfix/sasl_passwd

-- permissions for /etc/postfix/sasl_passwd.db --
-rw-r--r-- 1 root root 12288 2007-03-30 10:56 /etc/postfix/sasl_passwd.db

/etc/postfix/sasl_passwd.db is up to date.

-- 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 - - smtpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - - - - smtp
-o fallback_relay=
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}

-- mechanisms on mx1.domain.tld --
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN


-- end of saslfinger output --
Jemand eine Idee?
Top

cedric
Posts: 14
Joined: 2002-12-26 20:18

Re: postfix + mysql + php

Post by cedric »

hat sich erledigt, hab das mit libnss-mysql und nscd gelöst
Top