MySQL Forums
Forum List  »  Newbie

Postfix+SASL+MySQL
Posted by: Fratiman Vladut
Date: April 10, 2005 12:14PM

I want to configure my Postfix with SASL authentification throught MySQL
I have this configurarion file:

smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
sql_engine: mysql
mech_list: plain login
sql_hostnames: localhost
sql_user: postfix
sql_passwd: postfix
sql_database: postfix
sql_select: SELECT password FROM mailbox WHERE username = '%u@%r'

main.cf on Postfix
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1001
virtual_transport = virtual
virtual_uid_maps = static:1001
# 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 user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes

my.cnf on MySQL(all database are created for this aplication)
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
bind=127.0.0.1
#log = /etc/postfix/mysqld.log
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
i have virtual user in database created (test_one@my_domain.com)
When i want to send mail to this user receive this log from mysql:
Time Id Command Argument
050410 18:37:41 1 Connect Access denied for user: 'UNKNOWN_MYSQL_USER@localhost' (Using password: YES)
050410 18:37:48 2 Connect postfix@localhost on postfix
2 Query select goto from alias where address = 'yahoo.com'
3 Connect postfix@localhost on postfix
3 Query select description from domain where domain = 'yahoo.com'
2 Query select goto from alias where address = 'my_domain.com'
3 Query select description from domain where domain = 'my_domain.com'
4 Connect postfix@localhost on postfix
4 Query select goto from alias where address = 'test_one@my_domain.com'
4 Query select goto from alias where address = 'test_one'
4 Query select goto from alias where address = '@my_domain.com'
5 Connect postfix@localhost on postfix
5 Query select maildir from mailbox where username = 'test_one@my_domain.com'
6 Connect postfix@localhost on postfix
6 Query select goto from alias where address = 'test_one@my_domain.com'
6 Query select goto from alias where address = 'test_one'
6 Query select goto from alias where address = '@my_domain.com'
2 Query select goto from alias where address = 'my_domain.com'
3 Query select description from domain where domain = 'my_domain.com'
6 Query select goto from alias where address = 'vladone_2004@yahoo.com'
6 Query select goto from alias where address = '@yahoo.com'
2 Query select goto from alias where address = 'yahoo.com'
3 Query select description from domain where domain = 'yahoo.com'

Problem like to be: 1 Connect Access denied for user: 'UNKNOWN_MYSQL_USER@localhost' (Using password: YES)
This is probably generated when sasl try to verify user.
How can resolv this problem?
P.S MySQL work fine with anothe aplication!

Options: ReplyQuote


Subject
Written By
Posted
Postfix+SASL+MySQL
April 10, 2005 12:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.