简体   繁体   English

使用MIMEKIT的DKIM

[英]DKIM using MIMEKIT

Im trying to DKIM sign all my emails using MIMEKIT and it works flawless for email body of smaller lenght but when content/size of email body increases., DKIM fails. 我试图使用MIMEKIT对我的所有电子邮件进行DKIM签名,并且它对于长度较小的电子邮件正文无缺陷,但是当电子邮件正文的内容/大小增加时,DKIM失败。 Im generating the body using "BodyBuilder". 我使用“ BodyBuilder”生成主体。

The following are my doubts in MIMEKIT 以下是我对MIMEKIT的怀疑

Is there any limitation in body/content length?. 正文/内容长度是否有限制? Is it Mandatory to give both text and html format of the content for DKIM sign? 是否必须同时提供DKIM标志内容的文本和html格式?

Below is my code for reference: 下面是我的代码供参考:

var message = new MimeMessage();
message.From.Add(new MailboxAddress("Sender", "abc@xyz.com"));
message.To.Add(new MailboxAddress("Mr K", ""k@abc.com"));
message.Subject = "Hi";
message.Sender = new MailboxAddress("realsender", "realsender@rtg.com");
message.InReplyTo = "realsender@rtg.com";
var builder = new BodyBuilder();
builder.TextBody = strbodytxt;
builder.HtmlBody = strbody;
builder.Attachments.Add(strattachmentpath);
message.Body = builder.ToMessageBody();

Is there any limitation in body/content length? 内容/内容长度是否有限制?

No. 没有。

Is it Mandatory to give both text and html format of the content for DKIM sign? 是否必须同时提供DKIM标志内容的文本和html格式?

No. 没有。

Make sure you are using the latest version of MimeKit as there have been a number of bug fixes to DKIM signing. 确保已使用最新版本的MimeKit,因为DKIM签名已修复了许多错误。

If you are already using the latest version, please file a bug report with some sample code that fails. 如果您已经在使用最新版本,请提交错误报告,并附上一些失败的示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM