Solved

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

Posted on 2004-08-10
5
516 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 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

Suggested Solutions

Title # Comments Views Activity
unable to put logic for reading multiple repo in a single file 4 66
AWS ELB 5 109
CENTOS DHCP Server / PXE/TFTP 14 202
Linux Samba using Kerberos to Auth from Active Directory 9 88
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). …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

679 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