Thunderbird 在哪里存储通过 POP 下载的最后一条消息的 UID?
我使用 Thunderbird 通过 POP3 接收电子邮件。 我已将 Thunderbird 配置为在服务器上留下电子邮件。 假设有一天我使用 POP3 检索 (RETR
) 10 封电子邮件,然后我晚上就注销了。 一夜之间,又有 10 封邮件发送到我的邮箱。 当我第二天早上启动 Thunderbird 时,STAT
命令应该显示 20 条消息。 但是,Thunderbird 不应下载前 10 条消息; 它应该从消息 11(或消息 11 的唯一标识符或 UID)开始。 Thunderbird 将发送 POP3 UIDL
命令,然后将 UID 与 Thunderbird 昨天检索到的最后一条消息的 UID 进行比较。 它将发现最后一个 UID 与消息 10 的 UIDL 列表匹配,然后 Thunderbird 将 RETR 11
、RETR 12
等。
就我而言,POP3 STAT
命令显示 POP 服务器上有 5379 条邮件。 我已经收到了大约 5000 个。 由于某种原因,Thunderbird 希望下载所有 5379 条消息,而不是从 5001 条开始。我正在尝试对此进行调试,并正在寻找 Thunderbird 认为是检索到的最后一条消息的 UID。
有谁知道 Thunderbird(在 Windows 上)在哪里存储最后一个 UID,它将用于与 UIDL(列表)进行比较?
有没有办法手动设置它,以便我可以强制 Thunderbird 开始检索接近 5001 的位置?
I use Thunderbird to receive email using POP3. I have Thurnderbird configured to leave email on the server. Lets say one day I uses POP3 to retrieve (RETR
) 10 email messages, then I logout for the night. Overnight 10 more messages are sent to my mailbox. When I fire up Thunderbird the next morning, the STAT
command should show 20 messages. However, Thunderbird should not download the first 10 messages; it should start at message 11 (or the unique identifier or UID for message 11). Thunderbird will send a POP3 UIDL
command, then compare the UID's to the UID of the last message Thunderbird retrieved yesterday. It will find that the last UID matches the UIDL list for message 10, then Thunderbird will RETR 11
, RETR 12
, and so on.
In my case, the POP3 STAT
command shows that I have 5379 messages on the POP server. I have already received about 5000 of them. For some reason Thunderbird wants to download all 5379 messages instead of starting at 5001. I am trying to debug this and was looking for the UID that Thunderbird thinks was the last message retrieved.
Does anyone know where Thunderbird (on Windows) stores the last UID, which it will use to compare to the UIDL (list)?
Is there a way to manually set it so I can force Thunderbird to start retrieving somewhere close to 5001?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Thunderbird 有一个名为 popstate.dat 的文件,其中包含 UID、时间戳(纪元)和一只旗。 该标志指示 Thunderbird 对关联消息执行的操作。
显然,Thunderbird 实际上并不像我上面描述的那样工作。 我认为 Thunderbird 会执行以下操作。 它发送 POP3
UIDL
命令来获取存储在 POP 服务器上的 UID 列表。 然后,它会将此列表与popstate.dat
中存储的 UID 进行比较。popstate.dat
中尚未存在的任何 UID 都是要检索的新消息。 UIDL 命令先前返回消息号和关联的 UID。 然后,Thunderbird 必须使用与尚未检索到的 UID 关联的消息号执行 POP3RETR
命令。 Thunderbird 还必须查看 popstate.dat 中的标志并对关联消息采取任何操作。 例如,标志d
告诉 Thunderbird 删除关联的消息。f
标志意味着 Thunderbird 只有消息的截断部分,应该检索完整的消息。在某个时刻,Thunderbird 会使用新消息更新
popstate.dat
。 我认为这发生在所有操作完成后对popstate.dat
的批量更新中。 也就是说,如果有 10 条新消息需要检索,则在检索完所有 10 条消息之前,popstate.dat
不会更新。我认为我的问题出在服务器上。 显然,我们的基础设施升级到了新版本的 POP 服务器,并且在新版本上分配了新的 UID。 我的
popstate.dat
拥有所有旧的 UID。 到新 POP 服务器的 UIDL 发送 Thunderbird 未在popstate.dat
中列出的 5000 多个 UID 列表。 因此,Thunderbird 继续下载所有 5000 多条消息。 如果新的 POP 服务器保留了旧的 UID,那么 Thunderbird 就会发现我已经检索了 5000 多条消息中的大部分,并且会下载我没有的消息。 我认为我的组织中的大多数人都使用 Outlook,而不使用 POP3,但是对 POP 服务器进行的版本更新并没有给这些用户带来问题。 似乎需要额外小心以确保新服务器与旧服务器具有相同的 UID。 活到老,学到老!Thunderbird has a file called popstate.dat that contains the UID, an timestamp (epoch), and a flag. The flag indicates the action that Thunderbird is to perform for the associated message.
Evidently, Thunderbird does not actually work like I described above. I think Thunderbird does the following. It sends a POP3
UIDL
command to get a list of the UID's stored on the POP server. It then compares this list to the UID's stored inpopstate.dat
. Any UID's that are not already inpopstate.dat
are new messages to be retrieved. The UIDL command previously returned the message number and the associated UID. Thunderbird must then do an POP3RETR
command using the message number associated with the UID's that it has not yet retrieved. Thunderbird must also look at the flag inpopstate.dat
and take any actions for the associated message. For example, the flagd
tells Thunderbird to delete the associated message. Thef
flag means that Thunderbird has only a truncated part of the message and should retrieve the full message.At some point Thunderbird updates the
popstate.dat
with the new messages. I think this happens in a batch update topopstate.dat
after all the actions have been completed. That is, if there are 10 new messages to retrieve,popstate.dat
is not updated until all 10 messages have been retrieved.I think my problem resides on the server. Apparently our infrastructure upgraded to a new version of the POP server and new UIDs were assigned on the new version. My
popstate.dat
had all the old UIDs. The UIDL to the new POP server send a list of 5000+ UIDs that Thunderbird did not have listed inpopstate.dat
. So, Thunderbird proceeded to download all 5000+ messages. If the new POP server had retained the old UID's then Thunderbird would have seen that I already had retrieved most of the 5000+ messages and would have just downloaded the ones that I did not have. I think most people in my organization use Outlook and do not use POP3, and however the version update was done to the POP server did not cause a problem for those users. Seems like some extra care was needed to ensure the new server had the same UIDs as the old server. Live and learn!服务器软件有哪个版本?
http://courier.sourcearchive.com/documentation/0.60。 0-2/pop3dserver_8c-source.html
您可能只需要将 popstate.dat 中 UIDL 的第一部分替换为新的?
Which version of server software there is?
http://courier.sourcearchive.com/documentation/0.60.0-2/pop3dserver_8c-source.html
May be you just need to replace first part of UIDL in popstate.dat to new ones?
Thunderbird 有一个扩展可以查找重复项并删除它们。 例如,基于消息 ID(通常由邮件的原始发件人生成,因此不会随基础设施更新而改变)。
There is an extension for Thunderbird to find duplicates and delete them. e.g. based on message-id (which is usually generated by the original sender of the mail and thus hasn't changed with your infrastructure update).
也许不是OP正在寻找的答案,但这可能对他有帮助。
我也遇到过类似的问题,为了解决这些问题,我创建了一个小的 php 脚本来重建 popstate 文件。
您可以在这里找到它:
https://github.com/Magentron/rebuild_thunderbird_popstate
用法
Perhaps not the answer the OP is exactly looking for, but it may probably help him.
I have had similar problems and to resolve them I have created a small php script to rebuild the popstate file.
You can find it here:
https://github.com/Magentron/rebuild_thunderbird_popstate
Usage