Fetchmail 对命令“LAST”给出错误

Fetchmail 对命令“LAST”给出错误

我们使用 fetchmail 下载我们内部网邮件服务器中的所有邮件。我们的邮件服务提供商有大约 40 个帐户。从过去几个月开始,有时一些用户邮件没有被下载。如果某封邮件没有被下载,那么较新的邮件也会卡在服务器中,因为 fetchmail 会跳过剩余的邮件。目前,我们从 webmail 界面删除该邮件作为解决方法。

请参阅以下日志,了解邮件滞留在服务器上的用户。

fetchmail: POP3> USER [email protected]
fetchmail: POP3< +OK
fetchmail: POP3> PASS *
fetchmail: POP3< +OK server ready
fetchmail: POP3> STAT
fetchmail: POP3< +OK 2 20075
fetchmail: POP3> LAST
fetchmail: POP3< -ERR unknown command
fetchmail: unknown command
fetchmail: POP3> UIDL
fetchmail: POP3< +OK 2 messages
fetchmail: POP3< 1 5024.mYehr3XKLFMMaZ5z7wivFfzsvyPND2n9URskpWNMMpQ=
fetchmail: POP3< 2 5026.uW5UyaafrY7A8Gp5gMxcI0KPTU0E8WpbnZRuRVF7EI4=
fetchmail: POP3< .
fetchmail: 2 messages (2 seen) for [email protected] at zpop.logix.in (20075 octets).
fetchmail: skipping message [email protected]@zpop.logix.in:1 not flushed
fetchmail: skipping message [email protected]@zpop.logix.in:2 not flushed
fetchmail: POP3> QUIT

为什么 fetchmail 会给出 LAST 命令错误?此问题的原因或解决方案是什么?

我的服务器是 CENTOS 4.3,fetchmail 版本是 6.2.5,我们将 fetchmail 作为守护进程运行,并将 fetchmail 命令运行为

server zpop.logix.in protocol pop3 user "[email protected]" with password "Passw@rd" is "support" here

答案1

命令上的错误LAST不是由 fetchmail 生成的,而是由 fetchmail 正在通信的 POP3 服务器生成的。

LAST命令存在于协议的早期版本中RFC 1081但在最新版本中RFC 1939LAST 不再是有效的 POP3 命令,因此预计会出现此错误。更多相关信息可参见这里

在我的系统上,我看到 fetchmail 也尝试使用 LAST 命令,也出现错误。我猜想如果远程服务器仍支持它,fetchmail 开发人员会认为这是一个非常好的解决方案,以至于不会放弃它并删除代码。

在 LAST 命令失败后,fetchmail 只会继续执行更有用的UIDL命令,即获取唯一 ID 列表,即远程邮箱中所有消息的列表。

列出了两条消息。这些消息已被“查看”(即:已成功下载并本地传送,并列在 ~/.fetchids 中),因此不会再次下载。这通常是-k | --keep命令行或 .fetchmailrc 中的选项的结果。

解决方案:从 .fetchids 历史记录中删除 ID 将会看到消息再次被下载。

相关内容