使用 Apache James 发送的邮件未送达

发布于 2024-10-18 11:31:01 字数 2266 浏览 1 评论 0原文

我已经设置了 Apache James Server v2.3.2 并按照“如何”部分中的描述进行了配置。

它工作正常,按预期发送邮件,但仅在我的 Gmail 帐户上发送,并被过滤为垃圾邮件。 不知道为什么我的其他电子邮件帐户拒绝它,我可以在收件箱中找到它们。

我尝试在邮件列表存档中找到解决方案,但没有结果。

有人遇到这个问题吗?我是否错过了一些必需的 SMTP 标头或其他内容?

典型的原始消息(java邮件会话调试模式)如下所示([email protected]_domain):

DEBUG: setDebug: JavaMail version 1.4.3
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
220 alex SMTP Server (JAMES SMTP Server 2.3.2) ready Mon, 21 Feb 2011 23:15:02 +0200 (EET)
DEBUG SMTP: connected to host "localhost", port: 25

EHLO alex
250-alex Hello alex (localhost [127.0.0.1])
250-PIPELINING
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<alex@localhost>
250 2.1.0 Sender <alex@localhost> OK
RCPT TO:<[email protected]_domain>
250 2.1.5 Recipient <[email protected]_domain> OK
DEBUG SMTP: Verified Addresses
DEBUG SMTP:   [email protected]_domain
DATA
354 Ok Send data ending with <CRLF>.<CRLF>
From: alex@localhost
To: [email protected]_domain
Message-ID: <7704521.0.1298322902328.JavaMail.Administrator@alex>
Subject: re[2]: hello
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

body is here
.
250 2.6.0 Message received
QUIT
221 2.0.0 alex Service closing transmission channel

I've setup Apache James Server v2.3.2 and configured it as described in HOW TO section.

It works OK, sends mails as expected but on my Gmail account only and filtered as spam.
Have no idea why other my emails accounts reject it i could find them in inbox.

I've tried to find a solution in mail list archive but with no result.

Did somebody face this problem? Did I miss some required SMTP headers or something?

Typical raw message (java mail session debug mode) looks like this ([email protected]_domain):

DEBUG: setDebug: JavaMail version 1.4.3
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
220 alex SMTP Server (JAMES SMTP Server 2.3.2) ready Mon, 21 Feb 2011 23:15:02 +0200 (EET)
DEBUG SMTP: connected to host "localhost", port: 25

EHLO alex
250-alex Hello alex (localhost [127.0.0.1])
250-PIPELINING
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<alex@localhost>
250 2.1.0 Sender <alex@localhost> OK
RCPT TO:<[email protected]_domain>
250 2.1.5 Recipient <[email protected]_domain> OK
DEBUG SMTP: Verified Addresses
DEBUG SMTP:   [email protected]_domain
DATA
354 Ok Send data ending with <CRLF>.<CRLF>
From: alex@localhost
To: [email protected]_domain
Message-ID: <7704521.0.1298322902328.JavaMail.Administrator@alex>
Subject: re[2]: hello
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

body is here
.
250 2.6.0 Message received
QUIT
221 2.0.0 alex Service closing transmission channel

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

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

发布评论

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

评论(2

尝蛊 2024-10-25 11:31:01

您的调试日志没有任何明显的错误。但看起来您的服务器运行在具有动态 IP 地址的测试或开发计算机上?许多邮件服务器拒绝来自动态 IP 范围的邮件。

There is nothing obvious wrong with your debug log. But it looks like your server is running on a test or development machine with a dynamic IP address? Many mail servers reject mails from a dynamic IP range.

氛圍 2024-10-25 11:31:01

我认为问题是由此引起的:

电子邮件服务器在接受任何邮件之前都会执行反向 DNS 查询。他们检查电子邮件来自的域的 IP 以及电子邮件真正来自的 IP。

如果域的 ip 和电子邮件发件人的 ip 不匹配,邮件服务器会认为该电子邮件是垃圾邮件或垃圾邮件。

这里,由于您的域(localhost)不是有效地址,因此当电子邮件服务器发送反向 DNS 查询时未获得 IP 并认为您的邮件是垃圾邮件或垃圾邮件。

有关详细信息,请查看:http://wiki.junkemailfilter.com/index.php/Fishing_Reverse_DNS

I think problem caused by this:

Email servers before accepting any mail do a reverse dns query. They check the ip for domain that the email came from and the ip that email is really came from.

If ip of domain and ip of email sender does not match, mail servers think that email is junk or spam.

Here since your domain (localhost) is not a valid address when Email server send a reverse dns query does not get an IP and think your mail is junk or spam.

For more information check this: http://wiki.junkemailfilter.com/index.php/Fixing_Reverse_DNS

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