Ich habe Postfix, Courier, libsasl... nach folgender Anleitung installiert: http://help.ubuntu.com/community/Postfi ... ystemHowto
Was nicht funktioniert ist die Authentifizierung über SMTP, die über die MySQL Datenbank stattfinden soll.
Ich habe das Gefühl, dass die Datenbank gar nicht erst abgefragt wird. Wenn ich mich verbinde, sehe ich:
Code: Select all
250-STARTTLS
250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN NTLM PLAIN
250-AUTH=DIGEST-MD5 CRAM-MD5 LOGIN NTLM PLAIN
Code: Select all
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication failure: no secret in database
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: unknown[111.222.333.444]: SASL NTLM authentication failed: authentication failure
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication failure: no secret in database
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: unknown[111.222.333.444]: SASL CRAM-MD5 authentication failed: authentication failure
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: SASL authentication failure: Password verification failed
Sep 23 15:50:37 example postfix/smtpd[28477]: warning: unknown[111.222.333.444]: SASL PLAIN authentication failed: authentication failure
Ich frage mich auch, ob ich den saslauthd (über "pam") überhaupt brauche. Das lese ich zwar oft als mögliche Lösung, aber wenn ich das richtig verstanden habe, funktioniert das auch ohne. Jedenfalls wurde dieser im oben verlinkten HOWTO nicht verwendet. Würde gerne auf einen zusätzlichen Dienst verzichten, wenn ich den nicht wirklich brauche. Oder hat das Teil irgendwelche besonderen Vorteile?
meine /etc/postfix/main.cf sieht so aus:
Code: Select all
# 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
readme_directory = no
# 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:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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.
mydomain = example.com
myhostname = mail.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = # localhost
#relayhost = #
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# Virtual Mailbox Domain Settings
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit = 51200000
virtual_minimum_uid = 5000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_transport = virtual
# Additional for quota support
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the your maildir has overdrawn your diskspace quota, please free up some of spaces of your mailbox try again.
virtual_overquota_bounce = yes
# SMTP Auth
#smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unauth_destination, check_policy_service inet
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unauth_destination, check_policy_service
# modify the existing smtpd_sender_restrictions
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
# then add these
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
Code: Select all
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: geheim
sql_database: postfix
sql_select: select passwd from mailbox where username='%u@%r' and active = 1
Grüße
Andreas