[cone] Automatic Refresh for local Maildir's mail counts?
Brought to you by:
mrsam
From: Linux-Fan <Ma_...@we...> - 2016-12-30 22:53:32
|
Dear Cone users, In [1] I asked if it might be possible to add a means of filtering accross account boundaries to Cone in order to be able to replicate my mail setup with it. I have understood it does not work that way because moving across accounts is conceptually different from moving inside the same account. Still, I have not given up on trying to configure Cone in a way I could use it as my mail client: While I did not try to amend Cone's filtering system to work across server boundaries, I have thought of another solution to the problem: In order to have filtering across account boundaries, I could use an external program to process incoming e-mails and then only read (and write) them in Cone. The setup is intended to look something like this Offlineimap Filtering tool¹ Cone --------------------- ------------------ --------------------- Downloads mails and --> Moves mails inside --> Is used to read from uploads changes to an a local Maildir the local Maildir and IMAP Server structure send via SMTP. Now in order for this to work as I expect it, Cone needs to automatically update the e-mail counts from local Maildirs to display the changes made externally via Offlineimap and the filtering tool. As far as I understand, there is an option called `/noop=N` [2] to poll IMAP accounts. I tried to use that (testing with an IMAP account), but it did not automatically tell me `... unread` after receiving a new mail until I opened and closed the folder again? Alternatively, I have tried to implement a refresh via a `SIGUSR1` to Cone by collapsing and expanding the currently selected subtree. This is a hack and while it does something similar to what I want (if the correct entry is selected, it refreshes the mail counters), it does not do it right: It depends on the current selection and it marks all folders (as if they were highlighted by the cursor) for reasons unknown to me :) Now my question is: Is there a recommended way to achieve automatic updating of (new-)mail counters for offline accounts / e-mail data processed by a separate tool? If not, is there a chance of getting the `/noop=N` thing to work with local Maildirs making it update e-mail counts without interaction or is there a chance of implementing a `SIGUSR1` to refresh in a more sensible way than I did? In order to illustrate what I am thinking about, I have attached my patch to enhance cone-0.92 with a hacky `SIGUSR1` support. If you think it might be a good idea to rewrite the patch to apply to the newest Cone version, I will try to do that. However, I do not think that my hack is the way to go with respect to the issue I want to solve. ¹) I do not know which filtering tool to use, yet. TIA and Yours Sincerely Linux-Fan [1] https://sourceforge.net/p/courier/mailman/message/35086282/ [2] http://www.courier-mta.org/cone/cone06newaccount.html -- http://masysma.lima-city.de/ |