summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ08nY2017-06-18 02:13:56 +0200
committerJ08nY2017-06-18 02:13:56 +0200
commite21a52b751ad7d692d03b78c06f5164f6fabe79a (patch)
treeec328e6520c59893923cf41f8ebb2fa3146d8176 /src
parentb8767a634966b2c4ea9b2c8a71174ca49e3c2f2f (diff)
downloadmailman-pgp-e21a52b751ad7d692d03b78c06f5164f6fabe79a.tar.gz
mailman-pgp-e21a52b751ad7d692d03b78c06f5164f6fabe79a.tar.zst
mailman-pgp-e21a52b751ad7d692d03b78c06f5164f6fabe79a.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman_pgp/runners/incoming.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mailman_pgp/runners/incoming.py b/src/mailman_pgp/runners/incoming.py
index f13b971..ddc08aa 100644
--- a/src/mailman_pgp/runners/incoming.py
+++ b/src/mailman_pgp/runners/incoming.py
@@ -1,5 +1,6 @@
"""The encryption-aware incoming runner."""
+from gpgmime import is_encrypted, is_signed
from mailman.config import config as mailman_config
from mailman.core.runner import Runner
from mailman.email.message import Message
@@ -24,16 +25,12 @@ class IncomingRunner(Runner):
listid=mlist.list_id)
return False
# Is the message encrypted?
- if msg.get_content_type() == 'multipart/signed' and msg.get_param(
- 'protocol') == 'application/pgp-signature':
+ if is_signed(msg):
# only signed.
pass
- elif msg.get_content_type() == 'multipart/encrypted' and msg.get_param(
- 'protocol') == 'application/pgp-encrypted':
+ elif is_encrypted(msg):
# definitely encrypted, might still be signed
pass
else:
# not encrypted or signed
pass
- from email.iterators import _structure
- _structure(msg)