diff --git a/gpg-email-helper.py b/gpg-email-helper.py index ae5d62b..728567b 100644 --- a/gpg-email-helper.py +++ b/gpg-email-helper.py @@ -63,13 +63,21 @@ async def main(log): elif ( email.rfind('-----BEGIN PGP SIGNATURE-----') != -1 and email.rfind('-----END PGP SIGNATURE-----') != -1 - ): + ) or (email.rfind('-----BEGIN PGP MESSAGE-----') != -1 + and email.rfind('-----END PGP MESSAGE-----') != -1): signature = email[ email.rfind('-----BEGIN PGP SIGNATURE-----') : email.rfind( '-----END PGP SIGNATURE-----' ) + 27 ] + if signature == '': + signature = email[ + email.rfind('-----BEGIN PGP MESSAGE-----') : email.rfind( + '-----END PGP MESSAGE-----' + ) + + 25 + ] signature.replace('=3D', '=') try: