Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-10
5
Medium Priority
?
523 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
ID: 11762983
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
ID: 11765586
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 1500 total points
ID: 11766200
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
ID: 11766207
More questions, or if my help is too strict.. just ask =)
0
 
LVL 12

Expert Comment

by:mburdick
ID: 11769013
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

916 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