...
parent
9956b94649
commit
3b43af2b2f
10
mech_imap.py
10
mech_imap.py
|
@ -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):
|
||||
|
|
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue