After upgrading from Sierra to Mojave (macOS 10.14), Apple mail started to display the warning Unable to verify message signature above all signed and encrypted emails. When clicking on Details, it says:
The digital signature is incorrect. The message may have been tampered with or corrupted since signed by (sender's name).
We are using S/MIME certificates signed by a self-signed root CA, but I doubt that this is the problem. When checking the certificates in the Keychain app, they are reported to be valid and good. However, if in Apple Mail, I get the above message and click on Show Certificate, the root certificate is reported to be valid and trusted, but the S/MIME certificate is nonetheless invalid for no obvious reason.
Note that some report similar problems for emails with attachments only.