Skip to content

[Mailer][Mime] Document PGP/MIME signing and encryption - #22732

Open
lacatoire wants to merge 2 commits into
symfony:8.2from
lacatoire:docs/mailer-pgp-mime
Open

[Mailer][Mime] Document PGP/MIME signing and encryption#22732
lacatoire wants to merge 2 commits into
symfony:8.2from
lacatoire:docs/mailer-pgp-mime

Conversation

@lacatoire

Copy link
Copy Markdown
Contributor

Documents the PGP/MIME support added in symfony/symfony#64540.

mailer.rst gets a new "PGP/MIME Signing and Encryption" section: requirements (the gpg binary and the Process component, no OpenSSL extension), the warning that only the body is protected while Subject, From and To stay in cleartext, standalone usage of PgpSigner/PgpEncrypter, the global pgp_signer/pgp_encrypter configuration, the X-Pgp-Sign/X-Pgp-Encrypt headers that select the messages to protect (sign-then-encrypt, after templates are rendered and before logging), the three on_missing_key modes with the envelope.recipients caveat, and encrypt_for_sender/hide_recipients.

reference/configuration/framework.rst gets the full reference for both configuration nodes.

Fixes #22726

@Spomky

Spomky commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Thanks for documenting this, as the author of the feature I am happy to see it covered so thoroughly.

One inaccuracy worth fixing:

Unlike S/MIME, PGP/MIME is not applied to every message

That is true of the S/MIME signer, but not of the S/MIME encrypter: SmimeEncryptedMessageListener has always required the X-SMime-Encrypt header too, it just was not documented. Something like "Unlike the S/MIME signer, PGP/MIME is not applied to every message" would avoid the confusion.

For the record, I opened #22764 to document the S/MIME side (#22719), which includes that X-SMime-Encrypt header, the new certificates, on_missing_certificate and encrypt_for_sender options and the listener priorities. It touches the same part of mailer.rst and framework.rst, so whichever gets merged first, the other will need a rebase. Happy to do it on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants