usrflo / DKIM-for-JavaMail

DKIM for JavaMail is a small JAR that can be easily implemented in existing Java projects using JavaMail for sending DKIM signed emails.
Apache License 2.0
34 stars 48 forks source link

Stop requiring To header for DKIM signing #1

Closed charlesconnell closed 7 years ago

charlesconnell commented 8 years ago

I was surprised when I discovered that this library will only sign emails that have a "From", "To", and "Subject" header. It's perfectly valid to send an email without a "To" header, so long as there are CC or BCC headers instead. It's also valid to create a DKIM signature for any set of headers -- I can't find anywhere in the spec that requires specific ones to be present. In my use case I need to send emails that don't have a To header, and I'd like to keep using this DKIM library. Can you please remove the "To" requirement? I'd be happy to write the patch.

ghilios commented 8 years ago

What about BCC-only emails?

charlesconnell commented 8 years ago

Those are also fine, and would be allowed by my pull request

aarishramesh commented 8 years ago

Even in my case I had to deal with signing mails without To or Subject header. So I just removed them from the mandatory tags

usrflo commented 7 years ago

According to http://www.ietf.org/rfc/rfc6376.txt just the FROM header is mandatory. "Subject" is advised to be included but not mandatory. Therefore I accepted the pull requests.