Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to send S/MIME encrypted mails using certificates provided by the receiver? #2080

Open
JayEn84 opened this issue Jul 8, 2020 · 3 comments

Comments

@JayEn84
Copy link

JayEn84 commented Jul 8, 2020

One of our customers asked us to S/MIME encrypt the mails we send to them and provided us with only two .crt files. Is it possible to do that? I see the example on https://github.com/PHPMailer/PHPMailer/blob/master/examples/smime_signed_mail.phps and read the issues concerning S/MIME in this project's issue, but the example requires a private key which I do not have. Will it be possible to send send encrypted mails to the customer anyway? Please excuse me if this is rather an S/MIME-related topic...

@Synchro
Copy link
Member

Synchro commented Jul 8, 2020

Take a look at #1611 – it's not been merged as I'm very wary of breaking DKIM, but you may be able to get it to work.

To sign a message you will need a private key - you can make one using openssl, or corresponding functions in PHP. To encrypt a message you will need a private key, and also the public key of the person you're sending the message to, which may be available from a keyserver somewhere. Note that though it's "non-standard", PGP encryption is generally more popular than S/MIME, at least in my experience.

@JayEn84
Copy link
Author

JayEn84 commented Jul 10, 2020

Is DKIM active by default? (I mean the current stable version, not the PR in reference to #1611 ).

@Synchro
Copy link
Member

Synchro commented Jul 10, 2020

No it's not, but having DKIM work requires incredible attention to detail, and it's very easy to break it as it's very sensitive (by design), so while it may be possible to get S/MIME working in here, It's not a significant target. I'd say that DKIM is generally far more important than S/MIME, in that pretty much every major email provider supports DKIM, but many have no support for S/MIME.
SwiftMailer may have S/MIME support, so you may be better off using that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants