Friesi
12.09.04, 09:35
Hallo.
Also mein Postfix Server rennt super. POP3 Funktioniert und das senden mit pop-befor-smtp geht auch.
Nun würde ich aber gerne noch IMAP verwenden und dazu brauch ich SASL, damit ich mich anmelden kann um Email zu senden, pop-befor-smtp geht ja nicht :)
Ich verwende eine MysqlDatenbank, in der tabelle "mailbox" gibt es eine spalte "username" im Format "name@domain.tld" und eine spalte "password" wo das Passwort in einer md5 verschlüsslung steht.
Ich habe dann in der /etc/postfix/sasl/smtpd.conf dieses geschrieben:
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: xxx.xxx.xxx.xx
sql_user: xxxxxx
sql_passwd: xxxxxxx
sql_database: postfix
sql_select: select password from mailbox where username ='%u@%r'
In meiner /etc/postfix/main.cf steht dieses:
queue_directory = /var/spool/postfix
content_filter = amavis:[127.0.0.1]:10024
command_directory = /usr/sbin
config_directory = /etc/postfix
alias_maps = hash:/etc/aliases
debug_peer_level = 2
mail_owner = postfix
mailbox_size_limit = 25600000
myhostname = xxxxxx.xxxxxx.xxx
mydestination = localhost, xxxxxx, xxxxx.domain.tld
mynetwork = 127.0.0.1/8 xxx.xxx.xxx.xx/24
maximal_queue_lifetime = 3
transport_map = hash:/etc/postfix/transport
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:108
virtual_uid_maps = static:106
virtual_mailbox_base = /usr/local/virtual
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 = 106
virtual_transport = virtual
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks,
check_client_access hash:/var/lib/pop-before-smtp/hosts
permit_sasl_authenticated,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname,
reject_rbl_client opm.blitzed.org,
reject_rbl_client list.dsbl.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client sbl-xbl.spamhaus.org
Doch wenn ich nun über einen Mailclient (Evolution) eine Email versenden möchte kommt dieses:
Sep 11 13:23:21 xxxxx postfix/smtpd[4439]: warning: SASL authentication failure: client response doesn't match what we generated
Sep 11 13:23:21 xxxxx postfix/smtpd[4439]: warning: xxxxx.dip.t-dialin.net[217.xxx.xxx.xxx]: SASL DIGEST-MD5 authentication failed
Ein telnet hostname 25 / ehlo localhost sagt dieses:
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxxxx.xxxxxxxxxxx.xxx ESMTP Postfix
ehlo localhost
250-xxxxx.xxxxxxxxxxx.xxx
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH DIGEST-MD5 CRAM-MD5
250-AUTH=DIGEST-MD5 CRAM-MD5
250 8BITMIME
Fehlt mir vielleicht noch irgendetwas? Es muss ja am Sasl liegen, doch was mach ich da falsch :-/
Verwende Debian Sarge
Hoffe mir kann man noch helfen ;)
Gruß
Kai
Also mein Postfix Server rennt super. POP3 Funktioniert und das senden mit pop-befor-smtp geht auch.
Nun würde ich aber gerne noch IMAP verwenden und dazu brauch ich SASL, damit ich mich anmelden kann um Email zu senden, pop-befor-smtp geht ja nicht :)
Ich verwende eine MysqlDatenbank, in der tabelle "mailbox" gibt es eine spalte "username" im Format "name@domain.tld" und eine spalte "password" wo das Passwort in einer md5 verschlüsslung steht.
Ich habe dann in der /etc/postfix/sasl/smtpd.conf dieses geschrieben:
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: xxx.xxx.xxx.xx
sql_user: xxxxxx
sql_passwd: xxxxxxx
sql_database: postfix
sql_select: select password from mailbox where username ='%u@%r'
In meiner /etc/postfix/main.cf steht dieses:
queue_directory = /var/spool/postfix
content_filter = amavis:[127.0.0.1]:10024
command_directory = /usr/sbin
config_directory = /etc/postfix
alias_maps = hash:/etc/aliases
debug_peer_level = 2
mail_owner = postfix
mailbox_size_limit = 25600000
myhostname = xxxxxx.xxxxxx.xxx
mydestination = localhost, xxxxxx, xxxxx.domain.tld
mynetwork = 127.0.0.1/8 xxx.xxx.xxx.xx/24
maximal_queue_lifetime = 3
transport_map = hash:/etc/postfix/transport
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:108
virtual_uid_maps = static:106
virtual_mailbox_base = /usr/local/virtual
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 = 106
virtual_transport = virtual
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks,
check_client_access hash:/var/lib/pop-before-smtp/hosts
permit_sasl_authenticated,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname,
reject_rbl_client opm.blitzed.org,
reject_rbl_client list.dsbl.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client sbl-xbl.spamhaus.org
Doch wenn ich nun über einen Mailclient (Evolution) eine Email versenden möchte kommt dieses:
Sep 11 13:23:21 xxxxx postfix/smtpd[4439]: warning: SASL authentication failure: client response doesn't match what we generated
Sep 11 13:23:21 xxxxx postfix/smtpd[4439]: warning: xxxxx.dip.t-dialin.net[217.xxx.xxx.xxx]: SASL DIGEST-MD5 authentication failed
Ein telnet hostname 25 / ehlo localhost sagt dieses:
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxxxx.xxxxxxxxxxx.xxx ESMTP Postfix
ehlo localhost
250-xxxxx.xxxxxxxxxxx.xxx
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH DIGEST-MD5 CRAM-MD5
250-AUTH=DIGEST-MD5 CRAM-MD5
250 8BITMIME
Fehlt mir vielleicht noch irgendetwas? Es muss ja am Sasl liegen, doch was mach ich da falsch :-/
Verwende Debian Sarge
Hoffe mir kann man noch helfen ;)
Gruß
Kai