hi
i m setting up postfix with virtual users & domains using falko`s HowTo and other manuals.
i probably made a syntax error or i misunderstood something.
os:
freebsd
main error is(/var/log/maillog):
Code:
Feb 2 00:54:23 tonic postfix/smtpd[8336]: disconnect from [...][xxx.xxx.xxx.xxx]
Feb 2 00:55:03 tonic postfix/smtpd[8336]: connect from [...][xxx.xxx.xxx.xxx]
Feb 2 00:55:03 tonic postfix/smtpd[8336]: warning: SASL authentication failure: Password verification failed
Feb 2 00:55:03 tonic postfix/smtpd[8336]: warning: [...][xxx.xxx.xxx.xxx]: SASL PLAIN authentication failed: authentication failure
Feb 2 00:55:03 tonic postfix/smtpd[8336]: warning: [...][xxx.xxx.xxx.xxx]: SASL LOGIN authentication failed: authentication failure
Feb 2 00:55:03 tonic postfix/smtpd[8336]: NOQUEUE: reject: RCPT from [...][xxx.xxx.xxx.xxx]: 554 5.7.1 <user@gmail.com>: Relay access denied; from=<dawid@mydomain.pl> to=<user@gmail.com> proto=ESMTP helo=<hostname>
/var/log/debug.log
Code:
Feb 2 00:56:20 tonic postfix/smtpd[8336]: commit transaction
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin Parse the username dawid@mydomain.pl
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin try and connect to a host
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin trying to open db 'mail' on host 'localhost'
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin Parse the username dawid@mydomain.pl
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin try and connect to a host
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin trying to open db 'mail' on host 'localhost'
Feb 2 00:56:20 tonic postfix/smtpd[8336]: begin transaction
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin create statement from userPassword dawid mydomain.pl
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin doing query select password from users where email='dawid';
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin create statement from cmusaslsecretPLAIN dawid mydomain.pl
Feb 2 00:56:20 tonic postfix/smtpd[8336]: sql plugin doing query select password from users where email='dawid';
mysql-general log:
Code:
110202 0:56:20 65 Connect mail_admin@localhost on mail
65 Quit
66 Connect mail_admin@localhost on mail
66 Query START TRANSACTION
66 Query select password from users where email='dawid'
66 Query select password from users where email='dawid'
66 Query COMMIT
66 Quit
67 Connect mail_admin@localhost on mail
67 Quit
68 Connect mail_admin@localhost on mail
68 Query START TRANSACTION
68 Query select password from users where email='dawid'
68 Query select password from users where email='dawid'
68 Query COMMIT
68 Quit
69 Connect mail_admin@localhost on mail
69 Quit
70 Connect mail_admin@localhost on mail
70 Query START TRANSACTION
70 Query select password from users where email='dawid'
70 Query select password from users where email='dawid'
70 Query COMMIT
70 Quit
71 Connect mail_admin@localhost on mail
71 Quit
config files:
sasl:
Code:
cat /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
auxprop_plugin: sql
sql_engine: mysql
sql_user: mail_admin
sql_passwd: pass
sql_hostnames: localhost
sql_database: mail
sql_select: select password from users where email='%u'
sql_verbose: yes
log_level: 7
pam.d/smtp
Code:
cat /usr/local/etc/pam.d/smtp
auth required pam_mysql.so user=mail_admin passwd=pass host=/tmp/mysql.sock db=mail table=users usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=mail_admin passwd=pass host=/tmp/mysql.sock db=mail table=users usercolumn=email passwdcolumn=password crypt=1
postfix-mysql users table:
Code:
mysql> select * from users;
+-----------------------+--------------------------+----------+
| email | ENCRYPT(password) | quota |
+-----------------------+--------------------------+----------+
| dawid@mydomain.pl | xxxxxxxx | 10485760 |
| jeff@mydomain.pl | xxxxxxxx | 10485760 |
+-----------------------+--------------------------+----------+
2 rows in set (0.00 sec)
as you can see pam_mysql send only first part of email('dawid') in sql query but should send full username(mysql email cell -> 'dawid@mydomain.pl')
what couses this error? how to fix it ?
kind regards
gu35t