View Full Version : [ubuntu] 12.04 cannot make postfix/dovecot work

June 23rd, 2012, 10:02 AM
when installing, i asked for Mail Server installation (amongst other things) so i found postfix and dovecot in my installation. all i wanted was local mail inside my lan, pop3 because i had that before, and imap for to experimentation. the remainder is about the pop3 connections.

my clients can see the server, but some things are not right:
- the smtp server is declared offline by my client (a mac box), and any attempts to send a test mail just fail with time-out.
- server side, all such mail sending attempts (from the client) lead to /var/log/syslog entries of form
Jun 20 08:17:10 victoria postfix/smtpd[2093]: warning: SASL: Connect to private/auth-client failed: No such file or directory
Jun 20 08:17:10 victoria postfix/smtpd[2093]: fatal: no SASL authentication mechanisms

i googled for fixes to this and found a number of links (such as http://www.howtoforge.com/postfix-dovecot-warning-sasl-connect-to-private-auth-failed-no-such-file-or-directory) stating that /etc/dovecot/dovecot.conf should contain these lines:
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
but when i do that and restart dovecot, i get a message in /var/log/upstart/dovecot.log saying that client is an unknown setting, and in syslog i can see that dovecot terminates with status 89, whatever that may mean. /var/spool/postfix/private exists, but a file named auth is not created, so obviously this didn't work as intended.
strangely enough, i once had a running mail server based on 10.04, and the hard disk that carried that installation is still around for inspection. there was no /var/spool/postfix/private/auth file then, either. (and no auth-client file either)

actually, quite a few sources suggest conf file text as the above, but there seem to be varying amounts of decoration around it. i tried it naked as above and that may have failed for complete lack of decoration. in the case of the 12.04 server guide, the suggested decoration is socket listen {...}, but there are other issues, see below

also, practically very help source suggests to do telnet my.server.org 25, followed by ehlo command.
sadly, this telnet command opens a connection that is instantaneously closed again. the advice for these cases is to check the system logs, but when i do, i can find nothing. and i do look in every darned file in /var/log and subsdirs. no joy.

the 12.04 server guide:
i tried that of course but stumbled several times:

in section stmp authentication, it is suggested to run
sudo postconf -e 'smtpd_sasl_local_domain ='.
ok, i edit /etc/postfix/main.cf manually, but this line was flagged as unused option when i checked the result with postconf. so is this really needed? for the time being, i have removed it with no visible impact on my overall problem situation.

the link to the example main.cf is broken. https://help.ubuntu.com/12.04/sample/postfix_configuration

In the configure sasl section, one is invited to edit /etc/dovecot/doveecot.conf. This is one of the cases where a reference into the current conf file structure would help: the named file has no auth_default section (any more, presumably). but the /etc/dovecot/conf.d/10-auth.conf and (ibid.) auth-*.conf.ext files have no such section either. so where should this go, then?

- how can i find out what kills that telnet connection? my guess is that the smtpd just dies due to misconfiguration and that's the end the mystery, but how can i be sure?
- is there an up to date guide for dovecot that matches config file structure in 12.04 ?
- what is the answer to the dovecot config riddle?

many thanks

June 24th, 2012, 08:57 AM
answering my own questions....
a happy accident brought to mind the existence of the doveconf command. capturing its profuse output in a file allowed a deeper study, which in turn revealed the existence of a configuration item named service auth

service auth {
unix.listener auth-client {
mode = 0600
user =

so here are settings that i'd want to change.
old fashioned searching found serv auth{} settings in /etc/dovecot/conf.d/10-master.conf.
added an entry for unix_listener auth-client with user and group set to potfix and mode to 0660 and restarted dovecot.
- no more logging messages.
- no more server offline detection at client side
-no more spontaneous telnet connection closures
and the test mail goes out as well.
end of problem, then.