Diferencia entre revisiones de «Cyrus Imap»
De gacq wiki
Línea 5: | Línea 5: | ||
*[[Cyrus - Migrating from Courier-IMAP]] | *[[Cyrus - Migrating from Courier-IMAP]] | ||
*[[Cyrus - LDAP]] | *[[Cyrus - LDAP]] | ||
− | = | + | = Utils = |
== Search and expunge a set of folders == | == Search and expunge a set of folders == | ||
<pre> | <pre> | ||
Línea 22: | Línea 22: | ||
</pre> | </pre> | ||
− | |||
== Migrate mbolixt script == | == Migrate mbolixt script == | ||
<pre> | <pre> |
Revisión del 16:56 22 sep 2010
Contenido
Subpages
- Cyrus - Basic Configuration
- Cyrus - Exim4 configuration
- Cyrus - Sieve filtering
- Cyrus - Migrating from Courier-IMAP
- Cyrus - LDAP
Utils
Search and expunge a set of folders
import imaplib imap = imaplib.IMAP4() imap.login('manager', 'thepasswd') for mbox in imap.list('', '*quotatest1*')[1]: mailbox=mbox.split('"')[3] imap.setacl(mailbox,'manager', 'lrswikxtecda') print imap.select(mailbox) print imap.expunge() imap.setacl(mailbox,'manager', '')
Migrate mbolixt script
import fileinput for line in fileinput.input( "source-ctl_mboxlist-d" ): mailbox_end = line.find(".",5) if ( mailbox_end == -1 ): mailbox_end = line.find("\t",5) folder = "" else: folder = line[mailbox_end+1:line.find("\t",mailbox_end)] mailbox=line[5:mailbox_end] if folder: print "mailserver.gacq.com!user.%s.%s\t0 default %s@mailserver.gacq.com\tlrswipkxtecda\t" % (mailbox,folder,mailbox) else: print "mailserver.gacq.com!user.%s\t0 default %s@mailserver.gacq.com\tlrswipkxtecda\t" % (mailbox,mailbox)
Recreate cyrus spool and database folders
#rm -fr /var/spool/cyrus #rm -fr /var/lib/cyrus mkdir /var/spool/cyrus mkdir /var/lib/cyrus ./cyrus-makedirs --cleansquat chown -R cyrus:mail /var/spool/cyrus chown -R cyrus:mail /var/lib/cyrus