2018-05-28 15:35:30 +02:00
|
|
|
# pylint: disable=too-many-instance-attributes,attribute-defined-outside-init
|
|
|
|
"""
|
|
|
|
account.py
|
|
|
|
==========
|
2015-10-03 01:17:47 +02:00
|
|
|
|
2018-05-28 15:35:30 +02:00
|
|
|
Account related functions.
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
|
|
|
import inspect
|
2015-10-03 01:17:47 +02:00
|
|
|
import re
|
|
|
|
import sys
|
2018-05-28 15:35:30 +02:00
|
|
|
import time
|
|
|
|
|
|
|
|
from PyQt4 import QtGui
|
|
|
|
|
|
|
|
import queues
|
2015-10-03 17:24:21 +02:00
|
|
|
from addresses import decodeAddress
|
2017-02-22 09:34:54 +01:00
|
|
|
from bmconfigparser import BMConfigParser
|
2018-05-28 15:35:30 +02:00
|
|
|
from helper_ackPayload import genAckPayload
|
|
|
|
from helper_sql import sqlQuery, sqlExecute
|
|
|
|
from .foldertree import AccountMixin
|
|
|
|
from .utils import str_broadcast_subscribers
|
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
|
2015-10-19 20:03:06 +02:00
|
|
|
def getSortedAccounts():
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Get a sorted list of configSections"""
|
|
|
|
|
2017-05-15 12:18:07 +02:00
|
|
|
configSections = BMConfigParser().addresses()
|
2018-05-28 15:35:30 +02:00
|
|
|
configSections.sort(
|
|
|
|
cmp=lambda x, y: cmp(
|
|
|
|
unicode(
|
|
|
|
BMConfigParser().get(
|
|
|
|
x,
|
|
|
|
'label'),
|
|
|
|
'utf-8').lower(),
|
|
|
|
unicode(
|
|
|
|
BMConfigParser().get(
|
|
|
|
y,
|
|
|
|
'label'),
|
|
|
|
'utf-8').lower()))
|
2015-10-19 20:03:06 +02:00
|
|
|
return configSections
|
|
|
|
|
2018-05-28 15:35:30 +02:00
|
|
|
|
|
|
|
def getSortedSubscriptions(count=False):
|
|
|
|
"""
|
|
|
|
Actually return a grouped dictionary rather than a sorted list
|
|
|
|
|
|
|
|
:param count: Whether to count messages for each fromaddress in the inbox
|
|
|
|
:type count: bool, default False
|
|
|
|
:retuns: dict keys are addresses, values are dicts containing settings
|
|
|
|
:rtype: dict, default {}
|
|
|
|
"""
|
2015-11-19 04:05:58 +01:00
|
|
|
queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions ORDER BY label COLLATE NOCASE ASC')
|
|
|
|
ret = {}
|
|
|
|
for row in queryreturn:
|
|
|
|
label, address, enabled = row
|
|
|
|
ret[address] = {}
|
|
|
|
ret[address]["inbox"] = {}
|
|
|
|
ret[address]["inbox"]['label'] = label
|
|
|
|
ret[address]["inbox"]['enabled'] = enabled
|
|
|
|
ret[address]["inbox"]['count'] = 0
|
|
|
|
if count:
|
|
|
|
queryreturn = sqlQuery('''SELECT fromaddress, folder, count(msgid) as cnt
|
2016-05-23 11:10:55 +02:00
|
|
|
FROM inbox, subscriptions ON subscriptions.address = inbox.fromaddress
|
|
|
|
WHERE read = 0 AND toaddress = ?
|
|
|
|
GROUP BY inbox.fromaddress, folder''', str_broadcast_subscribers)
|
2015-11-19 04:05:58 +01:00
|
|
|
for row in queryreturn:
|
|
|
|
address, folder, cnt = row
|
2018-05-28 15:35:30 +02:00
|
|
|
if folder not in ret[address]:
|
2016-05-01 08:16:10 +02:00
|
|
|
ret[address][folder] = {
|
|
|
|
'label': ret[address]['inbox']['label'],
|
|
|
|
'enabled': ret[address]['inbox']['enabled']
|
|
|
|
}
|
2015-11-19 04:05:58 +01:00
|
|
|
ret[address][folder]['count'] = cnt
|
|
|
|
return ret
|
|
|
|
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
def accountClass(address):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Return a BMAccount for the address"""
|
2017-01-11 14:27:19 +01:00
|
|
|
if not BMConfigParser().has_section(address):
|
2018-05-28 15:35:30 +02:00
|
|
|
# .. todo:: This BROADCAST section makes no sense
|
2015-10-13 23:32:36 +02:00
|
|
|
if address == str_broadcast_subscribers:
|
|
|
|
subscription = BroadcastAccount(address)
|
2015-11-27 02:10:27 +01:00
|
|
|
if subscription.type != AccountMixin.BROADCAST:
|
2015-10-13 23:32:36 +02:00
|
|
|
return None
|
|
|
|
else:
|
|
|
|
subscription = SubscriptionAccount(address)
|
2015-11-27 02:10:27 +01:00
|
|
|
if subscription.type != AccountMixin.SUBSCRIPTION:
|
2017-02-22 12:15:52 +01:00
|
|
|
# e.g. deleted chan
|
|
|
|
return NoAccount(address)
|
2015-10-13 23:32:36 +02:00
|
|
|
return subscription
|
2015-10-03 01:17:47 +02:00
|
|
|
try:
|
2017-01-11 14:27:19 +01:00
|
|
|
gateway = BMConfigParser().get(address, "gateway")
|
2018-05-28 15:35:30 +02:00
|
|
|
for _, cls in inspect.getmembers(sys.modules[__name__], inspect.isclass):
|
2015-10-03 12:12:18 +02:00
|
|
|
if issubclass(cls, GatewayAccount) and cls.gatewayName == gateway:
|
|
|
|
return cls(address)
|
|
|
|
# general gateway
|
|
|
|
return GatewayAccount(address)
|
2015-10-03 01:17:47 +02:00
|
|
|
except:
|
2015-10-03 12:12:18 +02:00
|
|
|
pass
|
|
|
|
# no gateway
|
|
|
|
return BMAccount(address)
|
2018-05-28 15:35:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
class AccountColor(AccountMixin): # pylint: disable=too-few-public-methods
|
|
|
|
"""Set the type of account"""
|
|
|
|
|
|
|
|
def __init__(self, address, address_type=None):
|
2015-10-31 10:12:12 +01:00
|
|
|
self.isEnabled = True
|
|
|
|
self.address = address
|
2018-05-28 15:35:30 +02:00
|
|
|
if address_type is None:
|
2015-11-27 02:10:27 +01:00
|
|
|
if address is None:
|
|
|
|
self.type = AccountMixin.ALL
|
2017-01-11 14:27:19 +01:00
|
|
|
elif BMConfigParser().safeGetBoolean(self.address, 'mailinglist'):
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.MAILINGLIST
|
2017-01-11 14:27:19 +01:00
|
|
|
elif BMConfigParser().safeGetBoolean(self.address, 'chan'):
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.CHAN
|
2015-10-31 10:12:12 +01:00
|
|
|
elif sqlQuery(
|
2018-05-28 15:35:30 +02:00
|
|
|
'''select label from subscriptions where address=?''', self.address):
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.SUBSCRIPTION
|
2015-10-31 10:12:12 +01:00
|
|
|
else:
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.NORMAL
|
2015-10-31 10:12:12 +01:00
|
|
|
else:
|
2018-05-28 15:35:30 +02:00
|
|
|
self.type = address_type
|
|
|
|
|
2017-02-22 12:15:52 +01:00
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
class BMAccount(object):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Encapsulate a Bitmessage account"""
|
|
|
|
|
|
|
|
def __init__(self, address=None):
|
2015-10-03 01:17:47 +02:00
|
|
|
self.address = address
|
2015-12-02 11:12:37 +01:00
|
|
|
self.type = AccountMixin.NORMAL
|
2017-01-11 14:27:19 +01:00
|
|
|
if BMConfigParser().has_section(address):
|
|
|
|
if BMConfigParser().safeGetBoolean(self.address, 'chan'):
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.CHAN
|
2017-01-11 14:27:19 +01:00
|
|
|
elif BMConfigParser().safeGetBoolean(self.address, 'mailinglist'):
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.MAILINGLIST
|
2015-10-13 23:32:36 +02:00
|
|
|
elif self.address == str_broadcast_subscribers:
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.BROADCAST
|
2015-10-10 19:58:01 +02:00
|
|
|
else:
|
|
|
|
queryreturn = sqlQuery(
|
2015-10-13 23:32:36 +02:00
|
|
|
'''select label from subscriptions where address=?''', self.address)
|
2015-10-10 19:58:01 +02:00
|
|
|
if queryreturn:
|
2015-11-27 02:10:27 +01:00
|
|
|
self.type = AccountMixin.SUBSCRIPTION
|
2015-10-10 19:58:01 +02:00
|
|
|
|
2018-05-28 15:35:30 +02:00
|
|
|
def getLabel(self, address=None):
|
|
|
|
"""Get a label for this bitmessage account"""
|
2015-10-03 12:12:18 +02:00
|
|
|
if address is None:
|
|
|
|
address = self.address
|
|
|
|
label = address
|
2017-01-11 14:27:19 +01:00
|
|
|
if BMConfigParser().has_section(address):
|
|
|
|
label = BMConfigParser().get(address, 'label')
|
2015-10-03 12:12:18 +02:00
|
|
|
queryreturn = sqlQuery(
|
|
|
|
'''select label from addressbook where address=?''', address)
|
|
|
|
if queryreturn != []:
|
|
|
|
for row in queryreturn:
|
|
|
|
label, = row
|
|
|
|
else:
|
|
|
|
queryreturn = sqlQuery(
|
|
|
|
'''select label from subscriptions where address=?''', address)
|
|
|
|
if queryreturn != []:
|
|
|
|
for row in queryreturn:
|
|
|
|
label, = row
|
|
|
|
return label
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
def parseMessage(self, toAddress, fromAddress, subject, message):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Set metadata and address labels on self"""
|
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
self.toAddress = toAddress
|
|
|
|
self.fromAddress = fromAddress
|
2017-02-19 19:48:45 +01:00
|
|
|
if isinstance(subject, unicode):
|
|
|
|
self.subject = str(subject)
|
|
|
|
else:
|
|
|
|
self.subject = subject
|
2015-10-03 01:17:47 +02:00
|
|
|
self.message = message
|
2015-10-03 12:12:18 +02:00
|
|
|
self.fromLabel = self.getLabel(fromAddress)
|
|
|
|
self.toLabel = self.getLabel(toAddress)
|
2015-10-03 01:17:47 +02:00
|
|
|
|
2017-02-22 12:15:52 +01:00
|
|
|
|
|
|
|
class NoAccount(BMAccount):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Override the __init__ method on a BMAccount"""
|
|
|
|
|
|
|
|
def __init__(self, address=None): # pylint: disable=super-init-not-called
|
2017-02-22 12:15:52 +01:00
|
|
|
self.address = address
|
|
|
|
self.type = AccountMixin.NORMAL
|
|
|
|
|
2018-05-28 15:35:30 +02:00
|
|
|
def getLabel(self, address=None):
|
2017-02-22 12:15:52 +01:00
|
|
|
if address is None:
|
|
|
|
address = self.address
|
|
|
|
return address
|
|
|
|
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-10 19:58:01 +02:00
|
|
|
class SubscriptionAccount(BMAccount):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Encapsulate a subscription account"""
|
2015-10-10 19:58:01 +02:00
|
|
|
pass
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-13 23:32:36 +02:00
|
|
|
|
|
|
|
class BroadcastAccount(BMAccount):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Encapsulate a broadcast account"""
|
2015-10-13 23:32:36 +02:00
|
|
|
pass
|
2018-05-28 15:35:30 +02:00
|
|
|
|
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
class GatewayAccount(BMAccount):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Encapsulate a gateway account"""
|
|
|
|
|
2015-10-03 12:12:18 +02:00
|
|
|
gatewayName = None
|
2016-02-15 08:19:45 +01:00
|
|
|
ALL_OK = 0
|
|
|
|
REGISTRATION_DENIED = 1
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
def __init__(self, address):
|
2017-01-11 18:13:00 +01:00
|
|
|
super(GatewayAccount, self).__init__(address)
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 17:24:21 +02:00
|
|
|
def send(self):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Override the send method for gateway accounts"""
|
|
|
|
|
|
|
|
# pylint: disable=unused-variable
|
2015-10-03 17:24:21 +02:00
|
|
|
status, addressVersionNumber, streamNumber, ripe = decodeAddress(self.toAddress)
|
2017-09-30 11:19:44 +02:00
|
|
|
stealthLevel = BMConfigParser().safeGetInt('bitmessagesettings', 'ackstealthlevel')
|
|
|
|
ackdata = genAckPayload(streamNumber, stealthLevel)
|
2015-10-03 17:24:21 +02:00
|
|
|
sqlExecute(
|
|
|
|
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''',
|
|
|
|
'',
|
|
|
|
self.toAddress,
|
|
|
|
ripe,
|
|
|
|
self.fromAddress,
|
|
|
|
self.subject,
|
|
|
|
self.message,
|
|
|
|
ackdata,
|
2018-05-28 15:35:30 +02:00
|
|
|
int(time.time()), # sentTime (this will never change)
|
|
|
|
int(time.time()), # lastActionTime
|
|
|
|
0, # sleepTill time. This will get set when the POW gets done.
|
2015-10-03 17:24:21 +02:00
|
|
|
'msgqueued',
|
2018-05-28 15:35:30 +02:00
|
|
|
0, # retryNumber
|
|
|
|
'sent', # folder
|
|
|
|
2, # encodingtype
|
|
|
|
# not necessary to have a TTL higher than 2 days
|
|
|
|
min(BMConfigParser().getint('bitmessagesettings', 'ttl'), 86400 * 2)
|
2015-10-03 17:24:21 +02:00
|
|
|
)
|
|
|
|
|
2017-02-08 13:41:56 +01:00
|
|
|
queues.workerQueue.put(('sendmessage', self.toAddress))
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
|
|
|
|
class MailchuckAccount(GatewayAccount):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""Encapsulate a particular kind of gateway account"""
|
|
|
|
|
2015-10-03 12:12:18 +02:00
|
|
|
# set "gateway" in keys.dat to this
|
|
|
|
gatewayName = "mailchuck"
|
2015-10-03 01:17:47 +02:00
|
|
|
registrationAddress = "BM-2cVYYrhaY5Gbi3KqrX9Eae2NRNrkfrhCSA"
|
|
|
|
unregistrationAddress = "BM-2cVMAHTRjZHCTPMue75XBK5Tco175DtJ9J"
|
|
|
|
relayAddress = "BM-2cWim8aZwUNqxzjMxstnUMtVEUQJeezstf"
|
2018-05-28 15:35:30 +02:00
|
|
|
regExpIncoming = re.compile(r"(.*)MAILCHUCK-FROM::(\S+) \| (.*)")
|
|
|
|
regExpOutgoing = re.compile(r"(\S+) (.*)")
|
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
def __init__(self, address):
|
2017-01-11 18:13:00 +01:00
|
|
|
super(MailchuckAccount, self).__init__(address)
|
2016-02-15 08:19:45 +01:00
|
|
|
self.feedback = self.ALL_OK
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 17:24:21 +02:00
|
|
|
def createMessage(self, toAddress, fromAddress, subject, message):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""createMessage specific to a MailchuckAccount"""
|
2015-10-03 17:24:21 +02:00
|
|
|
self.subject = toAddress + " " + subject
|
|
|
|
self.toAddress = self.relayAddress
|
|
|
|
self.fromAddress = fromAddress
|
|
|
|
self.message = message
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 17:24:21 +02:00
|
|
|
def register(self, email):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""register specific to a MailchuckAccount"""
|
2015-10-03 17:24:21 +02:00
|
|
|
self.toAddress = self.registrationAddress
|
|
|
|
self.subject = email
|
|
|
|
self.message = ""
|
|
|
|
self.fromAddress = self.address
|
|
|
|
self.send()
|
2018-05-28 15:35:30 +02:00
|
|
|
|
2015-10-03 17:24:21 +02:00
|
|
|
def unregister(self):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""unregister specific to a MailchuckAccount"""
|
2015-10-03 17:24:21 +02:00
|
|
|
self.toAddress = self.unregistrationAddress
|
|
|
|
self.subject = ""
|
|
|
|
self.message = ""
|
|
|
|
self.fromAddress = self.address
|
|
|
|
self.send()
|
2015-10-03 01:17:47 +02:00
|
|
|
|
2016-02-14 20:13:23 +01:00
|
|
|
def status(self):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""status specific to a MailchuckAccount"""
|
2016-02-14 20:13:23 +01:00
|
|
|
self.toAddress = self.registrationAddress
|
|
|
|
self.subject = "status"
|
|
|
|
self.message = ""
|
|
|
|
self.fromAddress = self.address
|
|
|
|
self.send()
|
|
|
|
|
2016-02-14 21:37:53 +01:00
|
|
|
def settings(self):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""settings specific to a MailchuckAccount"""
|
|
|
|
|
2016-02-14 21:37:53 +01:00
|
|
|
self.toAddress = self.registrationAddress
|
|
|
|
self.subject = "config"
|
2018-05-28 15:35:30 +02:00
|
|
|
self.message = QtGui.QApplication.translate(
|
|
|
|
"Mailchuck",
|
|
|
|
"""# You can use this to configure your email gateway account
|
2016-02-14 21:37:53 +01:00
|
|
|
# Uncomment the setting you want to use
|
|
|
|
# Here are the options:
|
2018-05-28 15:35:30 +02:00
|
|
|
#
|
2016-02-14 21:37:53 +01:00
|
|
|
# pgp: server
|
|
|
|
# The email gateway will create and maintain PGP keys for you and sign, verify,
|
|
|
|
# encrypt and decrypt on your behalf. When you want to use PGP but are lazy,
|
|
|
|
# use this. Requires subscription.
|
|
|
|
#
|
|
|
|
# pgp: local
|
|
|
|
# The email gateway will not conduct PGP operations on your behalf. You can
|
|
|
|
# either not use PGP at all, or use it locally.
|
|
|
|
#
|
|
|
|
# attachments: yes
|
|
|
|
# Incoming attachments in the email will be uploaded to MEGA.nz, and you can
|
|
|
|
# download them from there by following the link. Requires a subscription.
|
|
|
|
#
|
|
|
|
# attachments: no
|
|
|
|
# Attachments will be ignored.
|
2018-05-28 15:35:30 +02:00
|
|
|
#
|
2016-02-14 21:37:53 +01:00
|
|
|
# archive: yes
|
|
|
|
# Your incoming emails will be archived on the server. Use this if you need
|
|
|
|
# help with debugging problems or you need a third party proof of emails. This
|
|
|
|
# however means that the operator of the service will be able to read your
|
|
|
|
# emails even after they have been delivered to you.
|
|
|
|
#
|
|
|
|
# archive: no
|
|
|
|
# Incoming emails will be deleted from the server as soon as they are relayed
|
|
|
|
# to you.
|
|
|
|
#
|
|
|
|
# masterpubkey_btc: BIP44 xpub key or electrum v1 public seed
|
|
|
|
# offset_btc: integer (defaults to 0)
|
|
|
|
# feeamount: number with up to 8 decimal places
|
|
|
|
# feecurrency: BTC, XBT, USD, EUR or GBP
|
|
|
|
# Use these if you want to charge people who send you emails. If this is on and
|
|
|
|
# an unknown person sends you an email, they will be requested to pay the fee
|
|
|
|
# specified. As this scheme uses deterministic public keys, you will receive
|
|
|
|
# the money directly. To turn it off again, set "feeamount" to 0. Requires
|
|
|
|
# subscription.
|
|
|
|
""")
|
|
|
|
self.fromAddress = self.address
|
|
|
|
|
2015-10-03 01:17:47 +02:00
|
|
|
def parseMessage(self, toAddress, fromAddress, subject, message):
|
2018-05-28 15:35:30 +02:00
|
|
|
"""parseMessage specific to a MailchuckAccount"""
|
|
|
|
|
2017-01-11 18:13:00 +01:00
|
|
|
super(MailchuckAccount, self).parseMessage(toAddress, fromAddress, subject, message)
|
2015-10-03 01:17:47 +02:00
|
|
|
if fromAddress == self.relayAddress:
|
|
|
|
matches = self.regExpIncoming.search(subject)
|
2018-05-28 15:35:30 +02:00
|
|
|
if matches is not None:
|
2015-10-03 01:17:47 +02:00
|
|
|
self.subject = ""
|
|
|
|
if not matches.group(1) is None:
|
|
|
|
self.subject += matches.group(1)
|
|
|
|
if not matches.group(3) is None:
|
|
|
|
self.subject += matches.group(3)
|
|
|
|
if not matches.group(2) is None:
|
2015-10-03 12:12:18 +02:00
|
|
|
self.fromLabel = matches.group(2)
|
2015-10-03 17:24:21 +02:00
|
|
|
self.fromAddress = matches.group(2)
|
2015-10-03 01:17:47 +02:00
|
|
|
if toAddress == self.relayAddress:
|
|
|
|
matches = self.regExpOutgoing.search(subject)
|
2018-05-28 15:35:30 +02:00
|
|
|
if matches is not None:
|
2015-10-03 01:17:47 +02:00
|
|
|
if not matches.group(2) is None:
|
|
|
|
self.subject = matches.group(2)
|
|
|
|
if not matches.group(1) is None:
|
2015-10-03 17:24:21 +02:00
|
|
|
self.toLabel = matches.group(1)
|
2016-02-14 20:13:23 +01:00
|
|
|
self.toAddress = matches.group(1)
|
2016-02-15 08:19:45 +01:00
|
|
|
self.feedback = self.ALL_OK
|
|
|
|
if fromAddress == self.registrationAddress and self.subject == "Registration Request Denied":
|
|
|
|
self.feedback = self.REGISTRATION_DENIED
|
|
|
|
return self.feedback
|