PDA

View Full Version : [SOLVED] Dovecot errors on one user authentication failure



sheehys
28th April 2011, 01:46 AM
Greetings all.
I am new to to dovecot and would like some help, so please be kind.
I have one user that can send mail but not read it either by pop3 or imap.
I am running Dovecot 2.0.11 on Fedora 14 with the following conf

dovecot -n
# 2.0.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.35.11-83.fc14.i686.PAE i686 Fedora release 14 (Laughlin)
base_dir = /var/run/dovecot/
login_trusted_networks = 172.18.1.0/24
mbox_write_locks = fcntl
passdb {
driver = pam
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
driver = passwd
}

I have one user that I keep getting the following error messages in the mail log

dovecot: imap(gewirtzman): Error: Invalid user settings. Refer to server log for more information.
dovecot: imap-login: Login: user=<gewirtzman>, method=PLAIN, rip=172.18.1.252, lip=69.174.165.199, mpid=27887, TLS
dovecot: imap(gewirtzman): Error: user gewirtzman: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/gewirtzman
dovecot: imap(gewirtzman): Error: Invalid user settings. Refer to server log for more information.



and in secure log I get

auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=gewirtzman rhost=172.18.1.101

auth: pam_succeed_if(dovecot:auth): error retrieving information about user gewirtzman


my dovecot.conf

## Dovecot configuration file

# If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration

# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.

# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
# value inside quotes, eg.: key = "# char and trailing whitespace "

# Default values are shown for each setting, it's not required to uncomment
# those. These are exceptions to this though: No sections (e.g. namespace {})
# or plugin settings are added by default, they're listed only as examples.
# Paths are also just examples with the real defaults being based on configure
# options. The paths listed here are for configure --prefix=/usr
# --sysconfdir=/etc --localstatedir=/var

# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 00-prefixes
# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf

# Protocols we want to be serving.
protocols = imap pop3 lmtp

# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = *, ::

# Base directory where to store runtime data.
base_dir = /var/run/dovecot/

# Greeting message for clients.
#login_greeting = Dovecot ready.

# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
login_trusted_networks = 172.18.1.0/24

# Sepace separated list of login access check sockets (e.g. tcpwrap)
#login_access_sockets =

# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no

# Should all processes be killed when Dovecot master process shuts down.
# Setting this to "no" means that Dovecot can be upgraded without
# forcing existing client connections to close (although that could also be
# a problem if the upgrade is e.g. because of a security fix).
#shutdown_clients = yes

# If non-zero, run mail commands via this many connections to doveadm server,
# instead of running them directly in the same process.
#doveadm_worker_count = 0
# UNIX socket or host:port used for connecting to doveadm server
#doveadm_socket_path = doveadm-server
##
## Dictionary server settings
##

# Dictionary can be used to store key=value lists. This is used by several
# plugins. The dictionary can be accessed either directly or though a
# dictionary server. The following dict block maps dictionary names to URIs
# when the server is used. These can then be referenced using URIs in format
# "proxy::<name>".

dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}

# A config file can also tried to be included without giving an error if
# it's not found:
#!include_try /etc/dovecot/local.conf

Any suggestions or help would be greatly appreciated.

vallimar
28th April 2011, 01:45 PM
It told you rather clearly what the problem is:

dovecot: imap(gewirtzman): Error: user gewirtzman: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/gewirtzman
Configure mail_location to be valid with wherever you are storing mail and restart.

sheehys
28th April 2011, 08:18 PM
I am sorry you missed understood the other accounts on the server are working find just this one that is not. And I do not understand why it is not.

cefiro1
30th January 2012, 11:53 AM
I have managed to resolve this on CentOS 6.2 after lots of research and almost going crazy because of the log entries hint at a permission problem - which it obviously is not, rather seems to a real weird Dovecot bug.

Solution of the problem:

1. Change Dovecot mail_location setting to


mail_location = maildir:~/mail

2. Change Postfix home_mailbox setting to


home_mailbox = mail/

(Mind the trailing slash! Won't work if omitted.)

That's it. Mail sending and retrieval works fine with these adjustments. Mail will be stored in the user's home directory.

If you prefer the mail folder not to be visible in your home directory, you can use hidden directories for mail storage:


mail_location = maildir:~/.mail

home_mailbox = .mail/