Postfix + SASL + MySQL,,What did I miss >"<
¿WÃÈ LanceLoTest
lancelotest at hotmail.com
Wed Jul 28 00:27:37 PDT 2004
Hi, everyone
Originally, I used /usr/local/etc/sasldb2 to store accounts/passwords(plain
text) data,
and used Mozilla Thunderbird as my MUA. I can pass the SASL
authentication(both smtp and imap) successfully.
After that, I wanted to use MySQL to store accounts/passwords(plain text),
but I got fail of SASL authentication.
I am using FreeBSD 5.2 release, and have complete installed these softwares
from port:
cyrus-imapd-2.2.6
cyrus-sasl-2.1.19
cyrus-sasl-saslauthd-2.1.19
postfix-2.1.4,1 (build with MySQL)
I follow these instructions to set up smtpd.conf
http://lists.freebsd.org/mailman/htdig/freebsd-questions/2004-April/042847.html
http://lists.freebsd.org/pipermail/freebsd-questions/2004-March/039296.html
I have been searched and read many documents on mail-listing and google, but
I still don't
know what I miss @@, and /var/log/maillog doesn't provide enough information
to me to solve
the problem. I am sure that I have enter correct accounts/passwords.
Please note that it works well with /usr/local/etc/sasldb2, but not MySQL
>"<
It seems to me that it doesn't talk to MySQL at all, because I tried
to use incorrect sql_user/sql_passwd in smtpd.conf, it gived me the same log
in /var/log/maillog
Please give me some hints to fix this problem, I have tried it for several
weeks, kind of tired,
but I don't want to give up. Thank you in advance.
These are some logs, and configurations:
(the accounts and password are real, you can test it if you want)
# cat /var/log/maillog
Jul 27 21:09:01 me postfix/smtpd[771]: connect from
S01060050fc412395.vf.shawcable.net[70.68.235.3]
Jul 27 21:09:04 me postfix/smtpd[771]: warning: SASL authentication failure:
Password verification failed
Jul 27 21:09:04 me postfix/smtpd[771]: warning:
S01060050fc412395.vf.shawcable.net[70.68.235.3]: SASL PLAIN authentication
failed
Jul 27 21:09:05 me postfix/smtpd[771]: warning:
S01060050fc412395.vf.shawcable.net[70.68.235.3]: SASL LOGIN authentication
failed
Jul 27 21:09:11 me postfix/smtpd[771]: lost connection after AUTH from
S01060050fc412395.vf.shawcable.net[70.68.235.3]
Jul 27 21:09:11 me postfix/smtpd[771]: disconnect from
S01060050fc412395.vf.shawcable.net[70.68.235.3]
mysql> use mail;
mysql> select * from user;
+----+----------+----------+---------+---------------+------------------------+--------
| ID | USERNAME | PASSWORD | FORWARD | DOMAIN | MAIL
| FILTER
+----+----------+----------+---------+---------------+------------------------+--------
| 1 | test | zzzzzz | test | me.uos.idv.tw | test at me.uos.idv.tw
| OK
| 2 | cyrus | zzzzzz | cyrus | me.uos.idv.tw | cyrus at me.uos.idv.tw
| OK
| 3 | kkk | zzzzzz | kkk | me.uos.idv.tw |
kkk at mail.me.uos.idv.tw | OK
+----+----------+----------+---------+---------------+------------------------+--------
3 rows in set (0.02 sec)
I have these parameters in main.cf:
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sender_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_sender
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
permit_auth_destination,
permit_mx_backup,
check_relay_domains,
reject_unknown_recipient_domain,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject
smtpd_client_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_pipelining
reject_unknown_client
# cat /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
sql_engine: mysql
sql_hostnames: localhost
sql_user: mail
sql_passwd: secret
sql_database: mail
sql_select: select PASSWORD from user where USERNAME='%u'
sql_verbose: true
I have tried to change auxprop_plugin: mysql and USERNAME='%u@%r' as well.
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
More information about the freebsd-questions
mailing list