Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

After doing a major Ubuntu dist upgrade from 10.04 to 12.04, my virtual-user postfix / dovecot installation only offers "PLAIN" SMTP Authentication mechanism.

It used to offer PLAIN + LOGIN mechanisms, and I have tried everything under the sun to get the the LOGIN one back again, but it just won't do it.

Without the "LOGIN" version, a lot of MS-based clients (windows live, outlook express) can no longer send mail using SMTP Auth. I've had to put their IP addresses in to my 'mynetworks' list.

I even tried setting up a from-scratch postfix+dovecot+virtual users smtp server with 12.04.1, thinking that it had to be something to do with the upgrade, but can't get anything more than AUTH PLAIN to be offered on the new system either.

Has anyone successfully set up a working postfix + dovecot + virtual users mail server on 12.04 that properly does SMTP Auth?

My current dovecot config: http://pastie.org/5651874

and current postfix config: http://pastie.org/5651882

.

FYI here are the excerpts of configurations I've tried:

(A):

/etc/dovecot/conf.d/10-auth.conf:

auth_mechanisms = plain login

/etc/dovecot/conf.d/10-master.conf:

service auth {
  unix_listener auth-userdb {
  }
  inet_listener {
    port = 12345
  }
}

/etc/postfix/main.cf

smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = inet:127.0.0.1:12345

Results in

... warning: SASL: Connect to inet:127.0.0.1:12345 failed: Connection refused
... fatal: no SASL authentication mechanisms

from my logs.

.

.

And (B):

/etc/dovecot/conf.d/10-auth.conf:

auth_mechanisms = plain login

/etc/dovecot/conf.d/10-master.conf:

service auth {
  unix_listener auth-userdb {
  }
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
  }
}

/etc/postfix/main.cf

smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

Results in only the PLAIN mechanism being offered.

.

The documentation that adaptr referenced in his answer doesn't have any example of the UNIX socket style config for Dovecot 2, so I'm hoping that someone with more experience can guide me here.

share|improve this question
1  
As you would be told on both the Postfix and Dovecot mailing lists: post the configuration that is really used, not the one you think is used, no matter how sure you are. We need the output of postconf -n and doveconf -n. Otherwise we can only guess what might be wrong. –  daff Jan 8 '13 at 23:25
    
Thanks for the tip Daff. I've updated the question to include links to both of those. –  FoxInSocks Jan 9 '13 at 0:28
    
The 10.04 LTS -> 12.04 LTS upgrade is indeed broken, at least when it comes to the mail system. –  mbx Aug 2 '13 at 21:23
add comment

2 Answers

up vote 2 down vote accepted

Well, from what I see in your posted configuration you never set Dovecot's auth_mechanisms = plain login, thus the default of auth_mechanisms = plain is used. Try updating that setting and restarting Dovecot, afterwards re-check the output of doveconf -n.

Your auth socket settings seem correct to me, Postfix should be able to do SASL authentication against Dovecot.

share|improve this answer
    
I noticed the lack of that specification as i was looking through the results of doveconf -n ... but the auth_mechanisms = plain login is indeed in my /etc/dovecot/conf.d/10-auth.conf. So what would keep the settings in that file from being picked up? –  FoxInSocks Jan 9 '13 at 6:20
    
Aaaannnd it turns out that's the magic question after all. My /etc/dovecot/dovecot.conf was missing the !include conf.d/*.conf line from the bottom of it, thus never having a chance to read the auth_mechanisms I specified. Thank you gentlemen for all your help and support. –  FoxInSocks Jan 9 '13 at 6:44
add comment

As documented, dovecot must advertise the appropriate mechanisms.

share|improve this answer
    
I've been through that documentation... If I try TCP, I get "warning: SASL: Connect to inet:127.0.0.1:12345 failed: Connection refused fatal: no SASL authentication mechanisms" and if I try the unix socket version, it doens't give me any errors, but i still only get "Plain" mechanism offered. –  FoxInSocks Jan 8 '13 at 20:43
    
I edited my question to include both types of configurations that I've tried. –  FoxInSocks Jan 8 '13 at 21:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.