SMTP AUTH & MySQL
Maybe I'm going about this the wrong way. I have Postfix installed, with Courier Imapd (and POP3d). I am planning on hosting several websites, and have setup Postfix and Courier to use virtual mailboxes. In otherwords, users don't need to have a system account to receive and get mail. So far, everything is working fine. I can log in using IMAP and get my email. All info is stored in MySQL table (passwords, using ENCRYPT() function).
Now, I want to set up Postfix to allow sending email. I would like to use SMTP AUTH. Users will have to authenticate using the same login information that courier uses. I've read quite a bit of google articles on how to set this up, but seem to be coming up blank.
First, my environment:
CentOS 64 3.4
AMD 64 processor
postfix-2.2.1
courier-imap-4.0.2
Here's what I've done so far:
Postfix's main.cf contains the following sasl options:
smtpd_sasl_auth_enable=yes
smtpd_sasl_security_options=noanonymous
broken_sasl_auth_clients=yes
smtpd_recipient_restrictions=permit_sasl_authenticated, permit_mynetworks, reject
smtpd_sasl_local_domain =
In the file /usr/lib64/sasl2/smtpd.conf:
pwcheck_method: pam
The file /etc/pam.d/smtp:
#%PAM-1.0
auth sufficient pam_mysql.so user=postfix passwd=secret db=maildb table=mailbox usercolumn=username passwdcolumn=password crypt=1
auth required pam_mysql.so user=postfix passwd=secret db=maildb table=mailbox usercolumn=username passwdcolumn=password crypt=1
I am unable to successfully authenticate when I attempt to send an email. The following is what's written in /var/log/maillog (host and IP removed):
warning: SASL authentication problem: unknown password verifier
warning: .....com[.......]: SASL LOGIN authentication failed
Any suggestions?
THanks in advance
|