I'm working on a program that encrypts email after receiving so that at least it can be stored encrypted on the receiving mail server (although still would be transmitted in plain text). While it is designed to not double-encrypt already-encrypted emails, it still seems to fail on encrypting already-signed emails.
I tested this sequence of commands and it also fails; and this is essentially what the program is doing:
echo "Hello" > blah.txt gpg --clearsign blah.txt gpg --encrypt --armor blah.txt.asc gpg --decrypt blah.txt.asc.asc
The last command normally would decrypt and also validate the signature. However, it instead decrypts only and a second --validate pass is needed to validate the signature. This means that email clients display the mail incorrectly, even if they include PGP support.