Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cyrus [2012/10/11 18:41]
94.23.1.28 xkjCXHRPI
cyrus [2012/10/15 11:58] (current)
zagi old revision restored
Line 1: Line 1:
-I've been using Cyrus-IMSP on my production srever in the past as backend for the Horde Framework.It canas the snippet statesprimarily be used to store contact data, egfor shared and/or personal address booksSome applications can store user-specific configuration data in IMSP as well.There are just three problems ​with it:1IMSP itself ​is obsolete since LDAPAnything that can be done with IMSP can be done better ​in LDAP.2. (Cyrus-)IMSP never worked reliably ​and consistently for me.3.  ​Few applications ​ is an understatementI've tried hard to find another use for IMSP besides Horde   ​and failed.I've long abandoned IMSP for those three reasonsI'​d ​say: Perform the last rites!+====== ​Cyrus  ​====== 
 + 
 +===== Configuration ===== 
 +  * [[http://​cyrusimap.web.cmu.edu/​twiki/​]] 
 +  * [[cyrus:​performance|Performance note]] 
 + 
 +==== LMTP over quota-reject ==== 
 + 
 +without taking mail and chacking over LMTP see:  
 +   * [[http://​article.gmane.org/​gmane.mail.exim.user/​39609]] 
 + 
 +**''/​etc/​imapd.conf''​** 
 +  # If  enabled, ​ lmtpd returns ​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 
 + 
 +----- 
 + 
 +===== Cyrus 2.1.x to 2.2.x migration (debian) ===== 
 +''​//This is one of the ways to do it.//''​ 
 + 
 +==== backup ==== 
 +  * stop all cyrus proccesses 
 +  * create a full backup of the mailbox spooldir ''​en:​ /​var/​spool/​cyrus/​mail''​ 
 + 
 +    tar cvfz /​safeplace/​cyrus-mailboxspool-backup.tgz /​var/​spool/​cyrus/​mail 
 + 
 +  * dump mboxlist ​in textfile ​as cyrus user 
 + 
 +   su - cyrus -c "/​usr/​sbin/​ctl_mboxlist -d > /​tmp/​mailboxes-dump.txt" 
 + 
 +  * create a backup of ''/​var/​lib/​cyrus'' ​just in case everything goes to .. 
 + 
 +**Whole Cyrus backup guide** 
 +  * http://​cyrusimap.web.cmu.edu/​twiki/​bin/​view/​Cyrus/​Backup 
 +  * [[http://​tldp.org/​HOWTO/​LVM-HOWTO/​snapshots_backup.html|Snapshot backups]] 
 + 
 +==== TODO ==== 
 + 
 +**TODO** 
 + 
 + 
 +===== Cyrus extra ===== 
 + 
 +Patches: 
 +   * [[http://​cyrus.brong.fastmail.fm/​|FastMail.FM Cyrus Imapd Patches]] 
 + 
 +===== Working ​with BerkeleyDB ===== 
 + 
 + 
 +==== Testing performances ==== 
 + 
 +in your cyrus dbd dir do: 
 +   ​db_stat -m 
 + 
 + 
 +==== Twicking DBD settings ==== 
 +**''​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 
 + 
 +==== rehasing DB ==== 
 + 
 +Stop cyrus server, run **''​db_recover -h /​var/​lib/​imap/​db''​** ​and start cyrus  
 + 
 +===== Troubleshooting ===== 
 +==== DBERROR db4: 21 lockers ==== 
 +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 
 + 
 + 
 + 
 + 
 +===== Sieve filtering ===== 
 + 
 +==== Filtering Mailing Lists ==== 
 +  require "​fileinto";​ 
 +  if header :contains "​X-BeenThere"​ "​some-list"​ { 
 +    fileinto "INBOX.some-list";​ 
 +  } 
 + 
 +==== Marking Messages As Read ==== 
 + 
 +  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";​ 
 + } 
 + 
 +==== Spamassassin-learn / Spam-folder purge ==== 
 +  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 -14 user/​dwight/​Trash'​ 
 +  su cyrus -c '/​usr/​lib/​cyrus-imapd/​ipurge -f -d 1 user/​dwight/​Spam'​
cyrus.txt · Last modified: 2012/10/15 11:58 by zagi
CC Attribution-Noncommercial-Share Alike 4.0 International
Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0 ipv6 ready