Why Is Smtplib.smtp().sendmail Not Sending A Dkim Signed Message
Solution 1:
It's hard to say for sure since you haven't included any configuration or log information. But the OpenDKIM information has this to say:
A message will be verified unless it conforms to the signing criteria, which are: (1) the domain on the From: address (if present) must be listed by the −d command line switch or the Domain configuration file setting, and (2) (a) the client connecting to the MTA must have authenticated, or (b) the client connecting to the MTA must be listed in the file referenced by the InternalHosts configuration file setting (or be in the default list for that option), or (c) the client must be connected to a daemon port named by the MTAs configuration file setting, or (d) the MTA must have set one or more macros matching the criteria set by the MacroList configuration file setting.
In your SMTP code, you have clearly not authenticated to the MTA. So then the question becomes, does your configuration allow OpenDKIM to notice your desire in any of the other ways, such as having localhost in InternalHosts? (I think that is the default, but maybe you've overridden it.)
Post a Comment for "Why Is Smtplib.smtp().sendmail Not Sending A Dkim Signed Message"