Authentication issue with SMTP

6 posts / 0 new
Last post
#1 Thu, 03/26/2009 - 02:09
nickorr

Authentication issue with SMTP

I've setup a stock install of ubuntu 8.04 server and put virtualmin pro on it. I've since setup a single domain (goya.com.au), and I'm able to login via IMAP and read mail and copy it to and from the server.

However, any attempt to send mail via smtp fails. I've tried every combination of ssl and auth types as well as port numbers etc. I'm using the full email address "name@goya.com.au" as the username.

I've also seen the note in the FAQ about domains with an @ in them, but I'm not quite sure what I'm meant to do. I've created 2 accounts, one with that setting set to @ and one with it set to . and I'm not able to send (relay) mail with authentication on either account.

Is there something I'm missing?

The only other thing I can think of is that this is a temp/test server, so my domain (goya.com.au) is hosted elsewhere until I get everything running. So I gave an answer of test.goya.com.au for the hostname for this box and I've added a single domain of goya.com.au. I haven't setup any special DNS for this apart from the A record for test.goya.com.

Is there something else I need to do in the config, or have I just got the settings wrong.

Thanks, Nick

Thu, 03/26/2009 - 04:42
andreychek

Well, you may want to look in /var/log/auth.log for the actual error being produced.

However, you may want do enable SMTPS and Submission in /etc/postfix/master.cf by uncommenting these lines:

[code:1]
submission inet n - - - - smtpd
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
[/code:1]

And then restart Postfix.
-Eric

Thu, 03/26/2009 - 05:01
malinens

I had the same problem some time ago on Ubutnu 8.04. I found that I had some Postfix permission problems (error log will show why You have this error...)

Thu, 03/26/2009 - 05:06 (Reply to #3)
andreychek

[code:1]
I had the same problem some time ago on Ubutnu 8.04. I found that I had some Postfix permission problems (error log will show why You have this error...)
[/code:1]

Yeah, good call. The mail or auth log would show all that, but if you see saslauth permission problems, you may need to run this:

chmod 711 /var/spool/postfix/var/run/saslauthd

Thu, 03/26/2009 - 07:21 (Reply to #4)
Joe
Joe's picture

<div class='quote'>Yeah, good call. The mail or auth log would show all that, but if you see saslauth permission problems, you may need to run this:

chmod 711 /var/spool/postfix/var/run/saslauthd</div>

Jamie pointed me to a better solution to this problem, which is to add the postfix user to the sasl group. That fix is in the virtualmin-base package for Debian 5, but not for older systems (including Ubuntu 8.04). It will go into virtualmin-base for Ubuntu in the next roll up of that package (this package is still a little more fragile on Debian/Ubuntu, because they change package names a lot more frequently than Red Hat based systems, and so I have to test this package a lot more heavily...so new rolls take longer).

--

Check out the forum guidelines!

Thu, 03/26/2009 - 16:22
nickorr

Thank-you all for your replies.

I had enabled the smtps and submission interfaces via webmin already, it's under webmin, postfix, server processes, and that works and got those up and runnning.

I didn't get anything in the auth log, nor in mail.err, but there was obvious issues in the mail.log file :

Mar 26 21:06:39 ubuntu postfix/smtpd[1440]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Mar 26 21:06:39 ubuntu postfix/smtpd[1440]: warning: SASL authentication failure: Password verification failed
Mar 26 21:06:39 ubuntu postfix/smtpd[1440]: warning: unknown[203.173.40.234]: SASL PLAIN authentication failed: generic failure
Mar 26 21:06:39 ubuntu postfix/smtpd[1440]: lost connection after AUTH from unknown[203.173.40.234]
Mar 26 21:06:39 ubuntu postfix/smtpd[1440]: disconnect from unknown[203.173.40.234]

I looked at that and wasn't sure if the error was a wrong password or a permissions issue. I'm guessing now it's permissions based, which is causing the auth issue.

I've added postfix to the sasl group and restarted postfix and all is working.

Thanks to all for the help.

Cheers,
Nick

Topic locked