我正在编写一个程序,该程序会轮询传入邮箱(任何知道该邮箱的人都可以向该邮箱发帖),重新格式化信息,然后根据预定义的约定将邮件转发到正确的地址。例如,传入的邮件具有:
From = "[email protected]"
To = "[email protected]"
Subject = "Subject"
Body = "[email protected]+newline+Body"
然后我接收该电子邮件,保留“发件人”和“主题”字段,但将“收件人”地址更改为 [email protected]
,并根据我的模板格式化正文的其余部分。
到目前为止一切正常 - 但我预计收件人域上的垃圾邮件过滤器会出现问题,因为它们可能会做出反应,就好像我在欺骗“发件人”地址一样。
完整保留原始邮件标头的正确方法是什么,以便所有 SPF/DKIM 标头保留在外发电子邮件上,并且收件人域不会将传入邮件视为可能的垃圾邮件/网络钓鱼邮件?
I am writing a program that polls an incoming mailbox (to which anyone who knows about it can post), reformats the info, then forwards the mail on to the correct address according to a predefined convention. For example, the incoming mail has:
From = "[email protected]"
To = "[email protected]"
Subject = "Subject"
Body = "[email protected]+newline+Body"
Then I take that email, preserve the "From" and "Subject" fields, but I change the "To" address to [email protected]
, and format the rest of the body according to my template.
Thus far all OK - but I anticipate a problem with spam filters on the recipient domains, since they may react as if I'm spoofing the "From" address.
What is the correct way to preserve the headers from the original mail intact, such that all the SPF/DKIM headers remain on the outgoing email, and the recipient domains don't treat the incoming mail as possible spam/phishing mails?
发布评论