Solved

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

Posted on 2004-08-10
5
518 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

626 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