without taking mail and chacking over LMTP see:
/etc/imapd.conf
# If enabled, lmtpd returns a permanent failure code when a user's # mailbox is over quota. By default, the failure is temporary, # causing the MTA to queue the message and retry later. lmtp_over_quota_perm_failure: 1
This is one of the ways to do it.
en: /var/spool/cyrus/mail
tar cvfz /safeplace/cyrus-mailboxspool-backup.tgz /var/spool/cyrus/mail
su - cyrus -c "/usr/sbin/ctl_mboxlist -d > /tmp/mailboxes-dump.txt"
/var/lib/cyrus
just in case everything goes to ..Whole Cyrus backup guide
TODO
Patches:
in your cyrus dbd dir do:
db_stat -m
db/DB_CONFIG
# Sample BDB configuration file. # Please adjust as necessary! # See http://www.openldap.org/faq/data/cache/893.html for hints and tips # even if you are not using openldap. # cache # use "db4.2_stat -m" to measure cache performance # see http://www.sleepycat.com/docs/api_c/env_set_cachesize.html # syntax: gigabytes_of_cache additional_bytes_of_cache number_of_caches set_cachesize 0 524288 1 # buffer size for transaction log # The default of 32Kbytes is too small # see http://www.sleepycat.com/docs/api_c/env_set_lg_bsize.html set_lg_bsize 524288 # other options you may be interested in # set_lg_dir: configure a separate directory for the transaction logs # For optimum performance, these should reside on a different disk # see http://www.sleepycat.com/docs/api_c/env_set_lg_dir.html # set_lg_max: configure the maximum size of the transaction log file, in bytes # See http://www.sleepycat.com/docs/api_c/env_set_lg_max.html # Note that lg_max must at least be 4x the size of lg_bsize. The default is 10Mb.
example (2-8GB RAM)
set_cachesize 2 0 8 set_lg_regionmax 268435456 set_lg_bsize 67108864 set_flags DB_TXN_WRITE_NOSYNC
DB_CONFIG from one of the largest cyrus sites
set_cachesize 0 2097152 1 set_lg_regionmax 2097152 set_lg_bsize 2097152 set_lg_max 16777216 set_tx_max 100
Stop cyrus server, run db_recover -h /var/lib/imap/db
and start cyrus
Getting something like this
Sep 25 16:39:34 localhost cyrus/lmtp[1544]: DBERROR db4: 558 lockers
see this: http://www.web-cyradm.org/pipermail/web-cyradm/2003-November/016829.html
require "fileinto"; if header :contains "X-BeenThere" "some-list" { fileinto "INBOX.some-list"; }
require [ "fileinto", "imapflags" ]; if header :contains "X-BeenThere" "some-list" { if header :contains "From" [ "somejerk@example.com", "anotherjerk@example.net" ] { addflag "\\Seen"; } fileinto "INBOX.some-list";
}
echo "spam fooSpam" /usr/bin/sa-learn --spam $SPOOLDIR/d/user/dwight/Spam/*. echo "ham dwight/Trash" /usr/bin/sa-learn --ham $SPOOLDIR/d/user/dwight/Trash/*. /usr/bin/sa-learn --rebuild su cyrus -c '/usr/lib/cyrus-imapd/ipurge -f -d 14 user/dwight/Trash' su cyrus -c '/usr/lib/cyrus-imapd/ipurge -f -d 1 user/dwight/Spam'