简体   繁体   中英

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. I can fetch my emails almost in real time using fetchmail daemon to fetch every 5 seconds over IMAP or POP. This solution works on both Mac and Linux, but I would like to know if there is a better way to do this.

I used Thunderbird and Apple Mail before, and they both fetch emails almost in real time. Are they both using fetchmail constantly? Is there a way to avoid pinging my email server every 5 seconds? Maybe a socket-based solution or something like that?

Many IMAP servers support IMAP IDLE command. The command allows to get "near real time" notifications about new messages in selected IMAP folder (eg INBOX). You keep IMAP session open and server notifies you about new messages.

fetchmail supports IMAP IDLE .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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