cyrus/lmtpunix: db4: Logging region out of memory / kmail2 sucks

Today I was wondering that I had almost no new mail in my inbox in the morning. After a while I decided to have a look into the server logfiles .... so I learned that postfix wasn't able to deliver mails via lmtp cause of:

Oct  7 07:45:56 post cyrus/lmtpunix[307]: DBERROR db4: Logging region out of memory; you may need to increase its size
Oct  7 07:45:56 post cyrus/lmtpunix[307]: DBERROR: opening /var/lib/cyrus/deliver.db: Cannot allocate memory
Oct  7 07:45:56 post cyrus/lmtpunix[307]: DBERROR: opening /var/lib/cyrus/deliver.db: cyrusdb error
Oct  7 07:45:56 post cyrus/lmtpunix[307]: FATAL: lmtpd: unable to init duplicate delivery database
Oct  7 07:45:56 post cyrus/master[754]: service lmtpunix pid 307 in READY state: terminated abnormally

Seems like this can be fixed with:

# /etc/init.d/cyrus2.2 stop
# cat< /var/lib/cyrus/db/DB_CONFIG
set_cachesize 0 2097152 1
set_lg_regionmax 1048576
EOM
# /etc/init.d/cyrus2.2 start

Looking more closer into the logs, it turned out that this trouble started last night when I connected with a client running the soon to be released Ubuntu Oneiric Ocelot using the new kmail2.

So it looks like the KDE/Ubuntu folks broke again kmail (or any KDE subsystem), as it also has troubles when migrating over from kmail(1) and it looks like it's not able to access most of the imap subfolders. Well done!