Solved

PostFix + MySQL, SMTP Auth Doesn't work??

Posted on 2004-08-10
5
512 Views
Last Modified: 2008-02-26
I have PostFix, Courier, Squirrel, MySQL installed, everything is running great except SMTP Authentication.  My webmail works, people can send email to me, i can send anywhere in the organization, and i can send from squirrel mail to any outside client.  However, using Outlook or any other 3rd party desktop mail client, i get SMTP Relay denied error messages and such when sending through the account, even if i have "My SMTP Server requires authentication" checked.  I'm using Gentoo with all the latest packages above.

Thanks,
Nick
0
Comment
Question by:NickUA
5 Comments
 
LVL 1

Author Comment

by:NickUA
Comment Utility
So i guess my question is how do i get Postfix to use the mysql username/password table to authenticate so i can send email?

Thanks.
0
 
LVL 22

Expert Comment

by:pjedmond
Comment Utility
I'm tempted to say that SMTP authentication is not the problem. The problem is that your configuration is setup to act as a relay for certain email addresses only. Probably the only addresses that it is accepting is from a domain such as test.com or if default is secure, then it will not relay anything until you configure the domains that the setup is supposed to support correctly.

Also, another possibility is that relaying is allowed from the localhost (as squirrelmail is working, and I suppose that it is running on the same server), therefore perhaps Postfix is only accepting emails from localhost and needs to be configured to accept from a few more ips?

Look at the mynetworks_style, and mynetworks entries in the /etc/postfix.conf file.

HTH:)
0
 
LVL 7

Accepted Solution

by:
troopern earned 500 total points
Comment Utility
I use Cyrus-SASL2 for my server.
in postfix.cfg Add:

smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =

my /etc/sasl/smtpd.conf:

#pwcheck_method: saslauthd
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql
sql_engine: mysql
mysql_user: username
mysql_passwd: pwd
mysql_hostnames: localhost
mysql_database: database
mysql_statement: SELECT clear FROM user WHERE email = '%u@%r'
mysql_verbose: yes



0
 
LVL 7

Expert Comment

by:troopern
Comment Utility
More questions, or if my help is too strict.. just ask =)
0
 
LVL 12

Expert Comment

by:mburdick
Comment Utility
You will need to add SASL2 to your configuration, and reconfigure Postfix to use it. Then, you will need to put your users in the MySQL database, and assign passwords. I have done this on a few different systems running on SuSE, but the premise is the same...

Did you biuld your own install of Postfix, or are you using a pre-compiled distribution?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now