Cyrus Imap

De gacq wiki
Saltar a: navegación, buscar

Subpages

Util

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