Valamiért nem jön össze az SMTP autentikáció, segítsetek kibogozni.
A rendszer egy frissen telepített Debian Lenny.
A napló fájlokba a következő sorok kerülnek be levél küldésénél:
"postfix/smtpd[3747]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory"
Tehát a leveleket megkapom (thunderbird-et használok), de küldésnél a jelszó beírásánál a rendszer rossz helyen keresi a felhasználót. Mysql-ből szeretnék autentikálni.
A releváns config fájlok:
#postconf -n
alias_maps = mysql:/etc/postfix/virtual.mysql
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
delay_warning_time = 4h
fallback_transport = virtual
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_size_limit = 0
mailbox_transport = cyrus
mydestination = mail.xxxxxx.com, localhost.xxxxxx.com, localhost, mysql:/etc/postfix/mydestination.mysql
mydomain = $myhostname
myhostname = xxxxxx.com
mynetworks = xxxFIXIPxxx
myorigin = /etc/mailname
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
sender_canonical_maps = mysql:/etc/postfix/canonical.mysql
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = cyrus
smtpd_sasl_security_options = noanonymous
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = no
virtual_alias_domains = mysql:/etc/postfix/mydestination.mysql
virtual_alias_maps = mysql:/etc/postfix/virtual.mysql
virtual_mailbox_base = mysql:/etc/postfix/virtual.mysql
virtual_mailbox_maps = mysql:/etc/postfix/virtual.mysql
#cat /etc/postfix/master.cf
# ==========================================================================
250 inet n - - - - smtpd
submission inet n - - - - smtpd
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
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
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry 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}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
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}
cyrus unix - n n - - pipe
flags= user=cyrus argv=/usr/sbin/cyrdeliver -r ${sender} -m ${extension} ${user}
# cat /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd
mech_list : PLAIN LOGIN
allow_plaintext: true
log_level: 3
saslauthd_path: /var/run/saslauthd/mux
#sql_select: dummy
# cat /etc/default/saslauthd
START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="pam"
MECH_OPTIONS=""
THREADS=5
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
#OPTIONS="-c -m /var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
~# cat /etc/pam.d/smtp
#%PAM-1.0
auth sufficient pam_mysql.so user=mail passwd=mailhezjelszo host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
auth sufficient pam_unix.so
account required pam_mysql.so user=mail passwd=mailhezjelszo host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
account sufficient pam_unix.so
# ls -l /var/spool/postfix/var/run/saslauthd/
összesen 932
-rw------- 1 root root 0 márc 1 11.08 cache.flock
-rw------- 1 root root 945152 márc 1 11.11 cache.mmap
srwxrwxrwx 1 root root 0 márc 1 11.08 mux
-rw------- 1 root root 0 márc 1 11.08 mux.accept
-rw------- 1 root root 5 márc 1 11.08 saslauthd.pid
~# ls -l /var/spool/postfix/etc/postfix/sasl/
összesen 4
-rw-r--r-- 1 root root 329 márc 1 11.25 smtpd.conf
A postfix újraindításánál az smtpd.conf idemásolódik.
Egyenlőre a 250-es porton próbálkoztam, gondoltam, ha megy a rendes levélküldés, akkor utána átrakom 465-re és SSL-re.
De valamit biztos elrontottam, csak már nem látom, hogy hol, és hogyan tovább.
Próbálkoztam a
smtpd_sasl_path = smtp beállítással is, ekkor
"postfix/master[4018]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling"
próbáltam ezt is kiguglizni, de a talált doksik alapján nem jutottam előre.
mysql-log-ba nem kerül be semmi.