master
inpos 2016-06-08 23:09:12 +03:00
parent 9956b94649
commit 3b43af2b2f
2 changed files with 6 additions and 6 deletions

View File

@ -118,15 +118,15 @@ class IMAPUserAccount(object):
move(os.path.join(self.dir, old), os.path.join(self.dir, new))
IMAP_MBOX_REG[self.dir][new] = self._getMailbox(new)
IMAP_MBOX_REG[self.dir][new].subscribe()
return IMAP_MBOX_REG[self.dir][newname]
return True
def subscribe(self, name):
if isinstance(name, unicode):
name = name.encode('imap4-utf-7')
if name in IMAP_MBOX_REG[self.dir].keys():
IMAP_MBOX_REG[self.dir][name].subscribe()
return True
raise imap4.NoSuchMailbox, name
return True
#raise imap4.NoSuchMailbox, name
def unsubscribe(self, name):
if name in conf.imap_auto_mbox:
@ -135,8 +135,8 @@ class IMAPUserAccount(object):
name = name.encode('imap4-utf-7')
if name in IMAP_MBOX_REG[self.dir].keys():
IMAP_MBOX_REG[self.dir][name].unsubscribe()
return True
raise imap4.NoSuchMailbox, name
return True
#raise imap4.NoSuchMailbox, name
def isSubscribed(self, name):
if isinstance(name, unicode):

View File

@ -8,7 +8,7 @@ conf.SRVNAME = 'Serpent'
conf.srv_version = '%s %s' % (conf.SRVNAME, conf.VERSION)
conf.local_domains = ['dom.lan'] # Список доменов, для которых будет приниматься почта
conf.tls = True
conf.tls_pem = './serpent.pem'
conf.tls_pem = u'./serpent.pem'
conf.smtp_open_relay = False # Разрешить ли пересылку откуда угодно куда угодно
conf.smtp_email_delim = '@'
conf.smtp_header = '''from [{sender_ip}] (helo={sender_host})