Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 2nd February 2011, 01:48
gu35t gu35t is offline
Junior Member
 
Join Date: Feb 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail

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
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (mdv2010) taylor-made HOWTO-Related Questions 1 21st July 2010 05:18
Update for Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail de Freitas HOWTO-Related Questions 6 7th July 2010 22:49
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.10) keyslapper HOWTO-Related Questions 4 20th April 2010 15:46
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04) Master One HOWTO-Related Questions 4 1st July 2009 15:38
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10) VTCop HOWTO-Related Questions 9 9th April 2009 16:17


All times are GMT +2. The time now is 15:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.