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!

Creative Commons License
The cyrus/lmtpunix: db4: Logging region out of memory / kmail2 sucks by Cyconet Blog, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Terms and conditions beyond the scope of this license may be available at blog.waja.info.

4 Responses to “cyrus/lmtpunix: db4: Logging region out of memory / kmail2 sucks”


  • If one mail client manages to break your running IMAP server, it definitely is the fault of the mail client… wait, what?

  • I don’t think your MUA is responsible for that breakage.

    That delivery.db cyrus DB maintains is for avoiding delivery of duplicate _incoming_ email… (possibly by tracking the ID of messages) so chances you MUA has something to do with the problem (either with its SMTP or POP/IMAP client functionalities) are near null.

    Also, Cyrus is, per-definition, a closed-box IMAP solution whre MUAs have no access to the low-level innards of its operation. Only way they have is using the network protocols.

    I’d suggest to:

    1. Migrate all your Cyrus DB from the Berkeley DB format to the skiplist format.
    2. Upgrade to Cyrus 2.4, 2.2 isn’t supported upstream anymore.

  • KMail definetly sucks actually … anyways … If I think about that this could be also used as DoS, that isn’t totally unrelated to thins cyrus setup.

  • Anyways … squeeze ships cyrus 2.2.13 and squeeze is the recent supported Debian distribution.

Comments are currently closed.

Too Cool for Internet Explorer