简体   繁体   English

Apple Mail和Thunderbird应用程序如何实时获取电子邮件?

[英]How do Apple Mail and Thunderbird apps fetch emails in real time?

I am trying to read my emails from a terminal using fetchmail, procmail and mutt. 我正在尝试使用fetchmail,procmail和mutt从终端读取我的电子邮件。 I can fetch my emails almost in real time using fetchmail daemon to fetch every 5 seconds over IMAP or POP. 我可以使用fetchmail守护程序几乎每隔5秒通过IMAP或POP实时获取我的电子邮件。 This solution works on both Mac and Linux, but I would like to know if there is a better way to do this. 此解决方案在Mac和Linux上均可使用,但我想知道是否有更好的方法可以做到这一点。

I used Thunderbird and Apple Mail before, and they both fetch emails almost in real time. 我以前使用过Thunderbird和Apple Mail,它们几乎都实时获取电子邮件。 Are they both using fetchmail constantly? 他们俩都在不断使用fetchmail吗? Is there a way to avoid pinging my email server every 5 seconds? 有没有一种方法可以避免每5秒ping通我的电子邮件服务器? Maybe a socket-based solution or something like that? 也许是基于套接字的解决方案之类的?

Many IMAP servers support IMAP IDLE command. 许多IMAP服务器都支持IMAP IDLE命令。 The command allows to get "near real time" notifications about new messages in selected IMAP folder (eg INBOX). 该命令允许获取有关选定IMAP文件夹(例如INBOX)中新消息的“近实时”通知。 You keep IMAP session open and server notifies you about new messages. 您使IMAP会话保持打开状态,并且服务器会通知您有关新消息的信息。

fetchmail supports IMAP IDLE . fetchmail支持IMAP IDLE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM