summaryrefslogtreecommitdiff
path: root/src/leap/mail/smtp/gateway.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/mail/smtp/gateway.py')
-rw-r--r--src/leap/mail/smtp/gateway.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/mail/smtp/gateway.py b/src/leap/mail/smtp/gateway.py
index 954a7d0..dd2c32d 100644
--- a/src/leap/mail/smtp/gateway.py
+++ b/src/leap/mail/smtp/gateway.py
@@ -39,7 +39,7 @@ from twisted.python import log
from email.Header import Header
from leap.common.check import leap_assert_type
-from leap.common.events import proto, signal
+from leap.common.events import emit, catalog
from leap.keymanager.openpgp import OpenPGPKey
from leap.keymanager.errors import KeyNotFound
from leap.mail.utils import validate_address
@@ -201,19 +201,19 @@ class SMTPDelivery(object):
# verify if recipient key is available in keyring
def found(_):
log.msg("Accepting mail for %s..." % user.dest.addrstr)
- signal(proto.SMTP_RECIPIENT_ACCEPTED_ENCRYPTED, user.dest.addrstr)
+ emit(catalog.SMTP_RECIPIENT_ACCEPTED_ENCRYPTED, user.dest.addrstr)
def not_found(failure):
failure.trap(KeyNotFound)
# if key was not found, check config to see if will send anyway
if self._encrypted_only:
- signal(proto.SMTP_RECIPIENT_REJECTED, user.dest.addrstr)
+ emit(catalog.SMTP_RECIPIENT_REJECTED, user.dest.addrstr)
raise smtp.SMTPBadRcpt(user.dest.addrstr)
log.msg("Warning: will send an unencrypted message (because "
"encrypted_only' is set to False).")
- signal(
- proto.SMTP_RECIPIENT_ACCEPTED_UNENCRYPTED,
+ emit(
+ catalog.SMTP_RECIPIENT_ACCEPTED_UNENCRYPTED,
user.dest.addrstr)
def encrypt_func(_):
@@ -306,7 +306,7 @@ class EncryptedMessage(object):
"""
log.msg("Connection lost unexpectedly!")
log.err()
- signal(proto.SMTP_CONNECTION_LOST, self._user.dest.addrstr)
+ emit(catalog.SMTP_CONNECTION_LOST, self._user.dest.addrstr)
# unexpected loss of connection; don't save
self._lines = []