Description
Currently if "Valid signatures only" is enabled, all unencrypted+unsigned mail will be rejected, regardless of the per-project activation setting. If you're validating signatures, you cannot have a project which is intended to receive unencrypted email (by leaving the OpenPGP module disabled on it) at the same time.
The decryption method should ideally be aware of the whether the OpenPGP module is enabled on the target project of the email.
Because of the odd order of operations and my lack of aptitude with Ruby on Rails, I'm not sure whether it could be implemented without modifying core. One issue is that the target_project
is apparently not available at the time of MailHandler's receive operation, only afterward. So we need to patch the MailHandler to decrypt the email, check the signature, get the target project, then check that project's per-project activation setting, and finally determine whether to accept or reject the email.