Ivars Strazdiņš
2009-Jan-20 21:38 UTC
[Dovecot] userdb didn't return a home directory with v1.1.7
Hi all, I am running Dovecot v1.1.7 in a relatively quiet and calm environment. Suddenly overnight cron job has started throwing out errors like: /usr/sbin/dovecot --exec-mail ext /usr/lib/dovecot/expire-tool Error: userdb(user1 at mail.example) didn't return a home directory Error: userdb(user2 at mail.example) didn't return a home directory Indeed, running this command produces: ------------------------- $ sudo /usr/sbin/dovecot --exec-mail ext /usr/lib/dovecot/expire-tool --test Error: userdb(user1 at mail.example) didn't return a home directory Info: User lookup failed: user1 at mail.example Error: userdb(user2 at mail.example) didn't return a home directory Info: User lookup failed: user2 at mail.example ------------------------- Yet these mailboxes are valid, corresponding users can login, send and receive mail. Other mailboxes are OK, too. Where to to start looking? I found that similar error message with v1.1.6 is fixed in v1.1.7, but I am running v.1.1.7 already. Please see dovecot configuration below. Thank you for your time, Ivars # 1.1.7: /etc/dovecot/dovecot.conf # OS: Linux 2.6.27-9-server i686 Ubuntu 8.10 ext3 base_dir: /var/run/dovecot/ syslog_facility: local1 protocols: imap imaps pop3 pop3s managesieve ssl_cert_file: /etc/certs/mail.mail.example.crt ssl_key_file: /etc/certs/mail.mail.example.key disable_plaintext_auth: no login_dir: /var/run/dovecot//login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login login_user: postfix login_greeting: VDEAVK epasta serveris. login_processes_count: 2 first_valid_uid: 107 mail_location: maildir:/home/vmail/%d/%n mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): expire fts fts_squat antispam mail_plugins(imap): expire fts fts_squat antispam mail_plugins(pop3): expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve managesieve_implementation_string(default): dovecot managesieve_implementation_string(imap): dovecot managesieve_implementation_string(pop3): dovecot managesieve_implementation_string(managesieve): Cyrus timsieved v2.2.13 sieve_storage(default): sieve_storage(imap): sieve_storage(pop3): sieve_storage(managesieve): /etc/dovecot/sieve/ sieve(default): sieve(imap): sieve(pop3): sieve(managesieve): /home/vmail/sieve-scripts/%u.sieve auth default: mechanisms: PLAIN LOGIN user: vmail username_format: %n at mail.example verbose: yes passdb: driver: sql args: /etc/dovecot/dovecot-mysql.conf userdb: driver: sql args: /etc/dovecot/dovecot-mysql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail group: vmail plugin: sieve: /home/vmail/sieve-scripts/%u.sieve expire: Trash 30 Trash/* 30 Spam 60 expire_dict: proxy::expire fts: squat antispam_signature: X-DSPAM-Signature antispam_trash: trash;Trash;Deleted Items antispam_spam: Spam antispam_dspam_binary: /usr/bin/dspam antispam_dspam_args: --deliver=;--user;%u;-s antispam_mail_tmpdir: /tmp antispam_mail_sendmail: /usr/sbin/sendmail antispam_mail_spam: spam-%u at mail.example antispam_mail_notspam: notspam-%u at mail.example antispam_crm_binary: /bin/false dict: expire: mysql:/etc/dovecot/dovecot-dict-expire.conf root at mail:~# cat /etc/dovecot/dovecot-dict-expire.conf connect = host=127.0.0.1 dbname=postfix user=postfix password=removed table = expire select_field = timestamp where_field = path username_field = username root at mail:~# -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: conf.txt URL: <http://dovecot.org/pipermail/dovecot/attachments/20090120/00423761/attachment-0002.txt>
Timo Sirainen
2009-Jan-26 02:18 UTC
[Dovecot] userdb didn't return a home directory with v1.1.7
On Tue, 2009-01-20 at 23:38 +0200, Ivars Strazdi?? wrote:> $ sudo /usr/sbin/dovecot --exec-mail ext /usr/lib/dovecot/expire-tool --test > Error: userdb(user1 at mail.example) didn't return a home directory..> userdb: > driver: sql > args: /etc/dovecot/dovecot-mysql.confWhat is the user_query in dovecot-mysql.conf? Does it return a field called "home"? If it does, set auth_debug=yes and show the logs when running the command? Although I don't see why 1.1.6 wouldn't have given this error also.. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090125/8c4f0840/attachment-0002.bin>
Ivars Strazdiņš
2009-Jan-26 06:55 UTC
[Dovecot] userdb didn't return a home directory with v1.1.7
Timo Sirainen wrote:> On Tue, 2009-01-20 at 23:38 +0200, Ivars Strazdi?? wrote: > >> $ sudo /usr/sbin/dovecot --exec-mail ext /usr/lib/dovecot/expire-tool --test >> Error: userdb(user1 at mail.example) didn't return a home directory >> > .. > >> userdb: >> driver: sql >> args: /etc/dovecot/dovecot-mysql.conf >> > > What is the user_query in dovecot-mysql.conf? Does it return a field > called "home"? If it does, set auth_debug=yes and show the logs when > running the command? > > Although I don't see why 1.1.6 wouldn't have given this error also.. >root at mail:/etc/dovecot# cat dovecot-mysql.conf | grep quer password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 1000 AS uid, 1000 AS gid FROM mailbox WHERE username = '%u' root at mail:/etc/dovecot# But I think I found the reason yet still do not know why this had happen... Expire table had records with strangely looking timestamp record for those two users. I deleted them and expire-tool errors vanished. If this will ever happen again I let you know and show these timestamps. BR, Ivars