aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/mta/personalized.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/mta/personalized.py')
-rw-r--r--src/mailman_pgp/mta/personalized.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mailman_pgp/mta/personalized.py b/src/mailman_pgp/mta/personalized.py
index d05cc4b..2b6d228 100644
--- a/src/mailman_pgp/mta/personalized.py
+++ b/src/mailman_pgp/mta/personalized.py
@@ -49,10 +49,10 @@ class PGPIndividualMixin:
recipient = msgdata['recipient']
pgp_address = PGPAddress.for_email(recipient)
if pgp_address is None:
- # TODO: log failure here
+ msgdata['no_deliver'] = True
return
if pgp_address.key is None or not pgp_address.key_confirmed:
- # TODO: log failure here?
+ msgdata['no_deliver'] = True
return
key = pgp_address.key
@@ -84,3 +84,9 @@ class PGPPersonalizedDelivery(IndividualDelivery, VERPMixin, DecoratingMixin,
self.personalize_to,
self.sign_encrypt
])
+
+ def _deliver_to_recipients(self, mlist, msg, msgdata, recipients):
+ if msgdata.get('no_deliver', False):
+ return dict((recipient, (444, BaseException)) for recipient in
+ recipients)
+ return super()._deliver_to_recipients(mlist, msg, msgdata, recipients)