[Dovecot] A namespace error on 2.1rc5

Bill Ryder bryder at wetafx.co.nz
Mon Jan 30 02:05:58 EET 2012


Hello all,

I'm not sure if this is a bug. It's probably just an upgrade note.

In summary I had no namespace section in my 2.0.17 config.  When trying out 2.1rc5 no user could login because of a namespace error.

2.1rc5 adds a default namespace clause which broke my logins (It was noted in the changelog)


I seemed to fix it by just putting this in the config file:

namespace inbox {
     inbox = yes
}





Long story:

I've been recently testing dovecot against cyrus to decide where we should go for our next mail server(s)

I loaded up the mail server with mail delivered via postfix all on dovecot 2.0.15 (I've since moved to 2.0.17)

I have three dovecot directors, two backends on the same NFS mail store.

With dovecot 2.0.xx the tester works fine (it't just a script which logins in and emulates thunderbird when a user is idle - 
without using IDLE so the client asks for mail every few minutes).

When I moved  to 2.1rc5 I got namespace errors and the user can not login.

The server said:

dovecot-error.log-20120128:Jan 27 13:37:59 imap(ethab01): Error: user ethab01: Initialization failed: namespace configuration 
error: inbox=yes namespace missing

The client says:

  * BYE Internal error occurred. Refer to server log for more information.

The session looks like

   0.000000 192.168.121.37 -> 192.168.121.2 TCP 33213 > imap [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1056649457 TSER=0 WS=5
   0.000036 192.168.121.2 -> 192.168.121.37 TCP imap > 33213 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=3264407631 
TSER=1056649457 WS=7
   0.000187 192.168.121.37 -> 192.168.121.2 TCP 33213 > imap [ACK] Seq=1 Ack=1 Win=5856 Len=0 TSV=1056649458 TSER=3264407631
   0.006338 192.168.121.2 -> 192.168.121.37 IMAP Response: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
   0.006889 192.168.121.37 -> 192.168.121.2 TCP 33213 > imap [ACK] Seq=1 Ack=124 Win=5856 Len=0 TSV=1056649465 TSER=3264407637
   0.006973 192.168.121.37 -> 192.168.121.2 IMAP Request: I ID ("x-originating-ip" "192.168.114.249" "x-originating-port" "49403" 
"x-connected-ip" "192.168.121.37" "x-connected-port" "143")
   0.006980 192.168.121.2 -> 192.168.121.37 TCP imap > 33213 [ACK] Seq=124 Ack=178 Win=6912 Len=0 TSV=3264407638 TSER=1056649465
   0.007086 192.168.121.2 -> 192.168.121.37 IMAP Response: * ID NIL
   0.018471 192.168.121.2 -> 192.168.121.37 IMAP Response: * BYE Internal error occurred. Refer to server log for more information.

(interestingly the tshark output strips out the user name and password which is convenient but which may mean there's not enough 
information?)
I rolled back to 2.0.17 and it was fine again.

It's the same config files for both, same maildirs etc etc. All I did was change the dovecot version from 2.0.17 to 2.1rc5


However I see from the changelog that 2.1rc5 added a default namespace inbox:


  diff doveconf-n.2.0.17 doveconf-n.2.1-rc5
1c1
< # 2.0.17 (684381041dc4+): /etc/dovecot/dovecot.conf
---
 > # 2.1.rc5: /etc/dovecot/dovecot.conf
20a21,39
 > namespace inbox {
 >   location =
 >   mailbox Drafts {
 >     special_use = \Drafts
 >   }
 >   mailbox Junk {
 >     special_use = \Junk
 >   }
 >   mailbox Sent {
 >     special_use = \Sent
 >   }
 >   mailbox "Sent Messages" {
 >     special_use = \Sent
 >   }
 >   mailbox Trash {
 >     special_use = \Trash
 >   }
 >   prefix =
 > }

We had this section commented out in 2.0.x so there was no namespace inbox anywhere.




==============

doveconf -n for 2.0.17 (for the backends)


# 2.0.17 (684381041dc4+): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-131.6.1.el6.x86_64 x86_64 Scientific Linux release 6.1 (Carbon) nfs
auth_mechanisms = plain login
auth_username_format = %n
auth_verbose = yes
debug_log_path = /var/log/dovecot/dovecot-debug.log
disable_plaintext_auth = no
first_valid_uid = 200
info_log_path = /var/log/dovecot/dovecot-info.log
log_path = /var/log/dovecot/dovecot-error.log
mail_debug = yes
mail_fsync = always
mail_gid = vmail
mail_location = maildir:/vol/dt_mailstore1/spool/%n:INDEX=/var/indexes/%n
mail_nfs_storage = yes
mail_plugins = " fts fts_solr mail_log notify quota"
mail_uid = vmail
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric 
relational regex imap4flags copy include variables body enotify environment mailbox date ihave
passdb {
   driver = pam
}
plugin {
   autocreate = Trash
   autocreate2 = Drafts
   autocreate3 = Sent
   autocreate4 = Templates
   autosubscribe = Trash
   autosubscribe2 = Drafts
   autosubscribe3 = Sent
   autosubscribe4 = Templates
   fts = solr
   fts_solr = break-imap-search debug url=http://dovecot-solr1.wetafx.co.nz:8080/solr/
   mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth {
   unix_listener auth-userdb {
     group = vmail
     user = vmail
   }
}
service lmtp {
   inet_listener lmtp {
     address = 192.168.121.2 127.0.0.1
     port = 24
   }
   process_min_avail = 20
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0660
     user = postfix
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
   inet_listener sieve_deprecated {
     port = 2000
   }
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
   args = uid=vmail gid=vmail home=/vol/dt_mailstore1/%n/%u
   driver = passwd
}
protocol lmtp {
   mail_plugins = sieve
}
protocol lda {
   mail_plugins = " fts fts_solr mail_log notify quota sieve"
}
protocol imap {
   mail_plugins = " fts fts_solr mail_log notify quota imap_quota"
}
protocol sieve {
   managesieve_notify_capability =
   managesieve_sieve_capability =
}


=====
doveconf for 2.1rc5
# 2.1.rc5: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-131.6.1.el6.x86_64 x86_64 Scientific Linux release 6.1 (Carbon) nfs
auth_mechanisms = plain login
auth_username_format = %n
auth_verbose = yes
debug_log_path = /var/log/dovecot/dovecot-debug.log
disable_plaintext_auth = no
first_valid_uid = 200
info_log_path = /var/log/dovecot/dovecot-info.log
log_path = /var/log/dovecot/dovecot-error.log
mail_debug = yes
mail_fsync = always
mail_gid = vmail
mail_location = maildir:/vol/dt_mailstore1/spool/%n:INDEX=/var/indexes/%n
mail_nfs_storage = yes
mail_plugins = " fts fts_solr mail_log notify quota"
mail_uid = vmail
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric 
relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace inbox {
   location =
   mailbox Drafts {
     special_use = \Drafts
   }
   mailbox Junk {
     special_use = \Junk
   }
   mailbox Sent {
     special_use = \Sent
   }
   mailbox "Sent Messages" {
     special_use = \Sent
   }
   mailbox Trash {
     special_use = \Trash
   }
   prefix =
}
passdb {
   driver = pam
}
plugin {
   autocreate = Trash
   autocreate2 = Drafts
   autocreate3 = Sent
   autocreate4 = Templates
   autosubscribe = Trash
   autosubscribe2 = Drafts
   autosubscribe3 = Sent
   autosubscribe4 = Templates
   fts = solr
   fts_solr = break-imap-search debug url=http://dovecot-solr1.wetafx.co.nz:8080/solr/
   mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth {
   unix_listener auth-userdb {
     group = vmail
     user = vmail
   }
}
service lmtp {
   inet_listener lmtp {
     address = 192.168.121.2 127.0.0.1
     port = 24
   }
   process_min_avail = 20
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0660
     user = postfix
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
   inet_listener sieve_deprecated {
     port = 2000
   }
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
   args = uid=vmail gid=vmail home=/vol/dt_mailstore1/%n/%u
   driver = passwd
}
protocol lmtp {
   mail_plugins = sieve
}
protocol lda {
   mail_plugins = " fts fts_solr mail_log notify quota sieve"
}
protocol imap {
   mail_plugins = " fts fts_solr mail_log notify quota imap_quota"
}
protocol sieve {
   managesieve_notify_capability =
   managesieve_sieve_capability =
}





More information about the dovecot mailing list