为公司防火墙优化 mail()

发布于 2024-09-17 05:36:13 字数 752 浏览 13 评论 0原文

我在那里。

我正在为我的公司创建一份时事通讯 - 收件人很可能是使用其公司电子邮件地址的其他公司的员工。

问题是,当我使用 mail() 发送邮件时,它通常会被防火墙捕获,将其标记为垃圾邮件,因为它是由网络服务器发送的。

我怎样才能优化我的功能,这样被拒绝的邮件数量就会以某种方式减少。我确信我无法达到 100%,但至少大多数收件人应该收到邮件。

目前,该函数的外观如下:

mail($email, $subject, $message, '-f [email protected]\r\nfrom: [email protected]\r\nreply-to: [email protected]');

i there.

I'm creating a newsletter for my company - the receivers will most likely be other companys employees using their company email adress.

The problem is, when I send mails using mail(), it most will often be catched by the firewall marking it as spam, at it was sent by a webserver.

How can I optimize my function, so the amount of rejected mails will somehow reduce. I'm sure I can't reach the 100% but at least most of the receivers should get their mail.

Currently, this is how the function looks:

mail($email, $subject, $message, '-f [email protected]\r\nfrom: [email protected]\r\nreply-to: [email protected]');

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

难忘№最初的完美 2024-09-24 05:36:13

我见过的关于该主题的最好读物是:

http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html

希望对你也有帮助

The best read on that topic i have ever seen is that one:

http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html

Hope it helps you too

那伤。 2024-09-24 05:36:13

您可能会更幸运地尝试找出导致您的电子邮件被困为垃圾邮件的原因,而不是坐在随机更改的标题/内容上。如果您有权(或能够)访问垃圾邮件过滤器的日志,请准确查看导致邮件被屏蔽的原因。

可能是来自您发送的主机的任何内容、主题行、列入黑名单的单词、格式错误的标头以及其他数不清的原因。

You might have better luck trying to figure out what's causing your email to be trapped as spam rather than sitting around randomly changing headers/content. If you have (or can get) access to the spam filter's logs, see exactly what's causing your message to get canned.

Could be anything from the host you're sending from, subject line, black listed words, malformed headers, and a few other bajillion reasons as well.

掌心的温暖 2024-09-24 05:36:13

mail($email, $subject, $message, '-f [电子邮件受保护]\r\n来自:[电子邮件受保护]\r \n回复:[电子邮件受保护]');

当然应该是这样的:

mail($email, $subject, $message, 
 'From: [email protected]\r\nReply-To: [email protected]',
 '-f [email protected]');

如果不是,难怪你的垃圾邮件过滤器不喜欢它。

逆向工程/绕过垃圾邮件过滤器并不容易 - 但您可能会首先仔细研究 spamassassin 如何确定哪些是垃圾邮件,哪些不是垃圾邮件。当然,垃圾邮件过滤器不实现贝叶斯过滤是不寻常的 - 请查看手册以了解如何正确训练它。

mail($email, $subject, $message, '-f [email protected]\r\nfrom: [email protected]\r\nreply-to: [email protected]');

Surely that should read:

mail($email, $subject, $message, 
 'From: [email protected]\r\nReply-To: [email protected]',
 '-f [email protected]');

If not, it's little wonder your spam filters don't like it.

Reverse engineering/bypassing spam filters is not supposed to be easy - but you might start by having a long hard look at how spamassassin decides what's spam and what isn't. Certainly its unusual to have a spam filter which does not implement Bayesian filtering - go check the manual on how to train it properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文