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

DKIM signing #78

Open
alephyud opened this issue Oct 28, 2016 · 2 comments
Open

DKIM signing #78

alephyud opened this issue Oct 28, 2016 · 2 comments

Comments

@alephyud
Copy link

Is there an easy way to add a DKIM signature to an email before sending?

@drewr
Copy link
Owner

drewr commented Oct 28, 2016

This should be doable with just an extra header. There's an example in the docs. Have you tried something like this?

(send-message {:from "[email protected]"
                            :to ["[email protected]" "[email protected]"]
                            :cc "[email protected]"
                            :subject "Hi!"
                            :body "Test."
                            :DKIM-Signature "v=1; a=rsa-sha256; ....."})

@alephyud
Copy link
Author

The problem is that generating a DKIM-Signature header is not straightforward. There are libraries which can do it, like this one, but they require a MimeMessage object to make the header for.

Since Postal does not expose the MimeMessages it generates with make-jmessage, I have to fall back to javax.mail for the entire process.

This would be much easier if send-message had some kind of transform-before-send option - a function supplied by the user which could be applied to the message objects before sending. Would you consider introducing such an option?

May be I am overcomplicating this - please let me know if you know a better solution.

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