Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Mailer] Add configuration for dkim and smime signers#58501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

eliasfernandez
Copy link
Contributor

@eliasfernandezeliasfernandez commentedOct 8, 2024
edited
Loading

QA
Branch?7.2
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#53941
LicenseMIT

DKIM is becoming a must have for emails but the current workflow to sign messages on symfony requires to do it in the controller or the application and it causes failures when the email is signed before some other listener needs to get it.

This PR adds the needed configuration as part of the mailer configuration and sign all the messages if configured at the mailer level. By instance, we can add these two new blocks under mailer.yml:

framework:mailer:dsn:'%env(MAILER_DSN)%'dkim_signer:key:'file://private.key'domain:'symfony.com'select:'s1'passphrase:''options:

or

framework:mailer:dsn:'%env(MAILER_DSN)%'smime_signer:key:'/path/to/certificate-private-key.key'certificate:'/path/to/certificate.crt'passphrase:''extra_certificates:'/path/to/certificate.crt'sign_options:1

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@eliasfernandezeliasfernandezforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch 4 times, most recently fromd749ca4 toa1242f1CompareOctober 8, 2024 16:38
@eliasfernandezeliasfernandezforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch froma1242f1 to0765515CompareOctober 9, 2024 13:18
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Don't miss updating the XSD file also.

eliasfernandez reacted with thumbs up emoji
@nicolas-grekasnicolas-grekas changed the titleBugfix/53941 dkim and smime signer as configuration[FrameworkBundle][Mailer] Add configuration for dkim and smime signersOct 9, 2024
@eliasfernandezeliasfernandezforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch from0765515 to0a0611cCompareOctober 9, 2024 14:31
@eliasfernandezeliasfernandezforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch 9 times, most recently fromead8485 tof514909CompareOctober 10, 2024 07:28
@eliasfernandezeliasfernandezforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch 2 times, most recently fromc7f41d7 to005a990CompareFebruary 5, 2025 19:40
@eliasfernandezeliasfernandezforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch from005a990 toeea246eCompareFebruary 5, 2025 19:47
Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.
I've made some rewording suggestions.

@carsonbotcarsonbot changed the title[FrameworkBundle][Mailer] Add configuration for dkim and smime signersAdd configuration for dkim and smime signersFeb 7, 2025
@carsonbotcarsonbot changed the titleAdd configuration for dkim and smime signers[Mailer] Add configuration for dkim and smime signersFeb 7, 2025
@eliasfernandezeliasfernandezforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch 2 times, most recently fromf8df5f6 toeb6c711CompareFebruary 7, 2025 12:40
@fabpotfabpotforce-pushed thebugfix/53941-dkim-and-smime-signer-as-configuration branch fromeb6c711 to244cbf1CompareFebruary 10, 2025 09:33
@fabpot
Copy link
Member

Thank you@eliasfernandez.

eliasfernandez reacted with heart emoji

@fabpotfabpot merged commit3918524 intosymfony:7.3Feb 10, 2025
4 of 5 checks passed
fabpot added a commit that referenced this pull requestMar 26, 2025
…`SMimeEncryptionListener` (Spomky)This PR was merged into the 7.3 branch.Discussion----------[Mailer][Mime] Refactor S/MIME encryption handling in `SMimeEncryptionListener`| Q             | A| ------------- | ---| Branch?       | 7.3| Bug fix?      | yes| New feature?  | yes| Deprecations? | no| Issues        || License       | MITIt appears that the smime_encrypter introduced in#58501 is incorrect, as the email is encrypted only for the sender instead of being encrypted per recipient.This PR introduces a new `SmimeCertificateRepositoryInterface`, responsible for retrieving recipient certificates.An email is encrypted under the following conditions:* A certificate is found for all recipients.* The custom header `X-SMime-Encrypt` is present.If either of these conditions is not met, the email is sent unencrypted.Commits-------7c76c54 Refactor S/MIME encrypter to use certificate repository
@fabpotfabpot mentioned this pull requestMay 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasAwaiting requested review from nicolas-grekas

@alexandre-dauboisalexandre-dauboisAwaiting requested review from alexandre-daubois

@OskarStarkOskarStarkAwaiting requested review from OskarStark

@stofstofAwaiting requested review from stof

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

[RFC] Email signing (and encryption) workflow
8 participants
@eliasfernandez@carsonbot@fabpot@nicolas-grekas@stof@OskarStark@alexandre-daubois@elias-playfinder

[8]ページ先頭

©2009-2025 Movatter.jp