VirtualMailManager/Handler.py
branchv0.6.x
changeset 223 5c7b7cbb01cd
parent 222 d0c16e70a9fb
child 233 55503d63ba30
equal deleted inserted replaced
222:d0c16e70a9fb 223:5c7b7cbb01cd
   244 
   244 
   245     def __subscribe(self, folderlist, uid, gid):
   245     def __subscribe(self, folderlist, uid, gid):
   246         """Creates a subscriptions file with the mailboxes from `folderlist`"""
   246         """Creates a subscriptions file with the mailboxes from `folderlist`"""
   247         fname = os.path.join(self._Cfg.dget('maildir.name'), 'subscriptions')
   247         fname = os.path.join(self._Cfg.dget('maildir.name'), 'subscriptions')
   248         sf = open(fname, 'w')
   248         sf = open(fname, 'w')
   249         for f in folderlist:
   249         sf.write('\n'.join(folderlist))
   250             sf.write('%s\n' % f)
   250         sf.write('\n')
   251         sf.flush()
   251         sf.flush()
   252         sf.close()
   252         sf.close()
   253         os.chown(fname, uid, gid)
   253         os.chown(fname, uid, gid)
   254         os.chmod(fname, 384)
   254         os.chmod(fname, 384)
   255 
   255