<div dir="ltr">Ok, to sum up - yes I need filtering on the client side. So no feature to do that with offline-imap (which is a good thing IMHO), so the question which other tool could do the work. I know a bit fetchmail, but I was not seduced, to say the least.<div><br></div><div>The other tool mention earlier operating directly on the imap server does not really matches my need. I don't mind having the filtering done locally, and then propagate by offline-imap on the next sync.</div><div><br></div><div>So, I guess the question is - does anyone know a good alternative to fetchmail ? :)  </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 October 2014 10:09, Tomasz Żok <span dir="ltr"><<a href="mailto:tomasz.zok@gmail.com" target="_blank">tomasz.zok@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2014-10-23 at 12:13, Romain Pelisse wrote:<br>
> Before using offline-imap (a long time ago now), I had some fetchmail<br>
> scripts to automatically sort email / tag as read. I'm starting to again<br>
> have the need for such feature, and I was wondering what is the<br>
> "recommended" way to do it offline-imap (maybe still using fetchmail ?<br>
> Maybe just using some offline-imap feature I overlooked ? Or maybe with an<br>
> other tool ?)<br>
<br>
</span>The best way would be to filter server-side. Then you synchronize with<br>
OfflineIMAP once and everything is sorted out (because the filtering itself was<br>
already done on the server). If you are using Gmail, it's the best to work out<br>
the filtering rules in the webmail. If you are using some other IMAP server,<br>
you could ask the administrator if there is SIEVE support or at least procmail<br>
installed. Both are tools suited for e-mail matching and performing actions on<br>
them (moving to folders, changing flags, etc.)<br>
<br>
If you cannot filter server-side, there is a tool called imapfilter. You<br>
configure it on your client machine and it just connects to the IMAP server and<br>
shuffles e-mails according to your rules. For some time I used it as<br>
a "presynchook" in OfflineIMAP and it worked fine. But there is a big<br>
disadvantage of imapfilter. It needs an additional connection to the IMAP<br>
before every sync, which takes time if you have lots of e-mail and/or complex<br>
rules and/or slow Internet connection.<br>
<br>
Finally you can automatically manage e-mails after OfflineIMAP synchronizes<br>
them (a "postsynchook"). I cannot name any specific tool to do this, but surely<br>
it is possible. The disadvantage here is that when you synchronize and sort<br>
e-mails, they will be seen as such only on your local computer until you<br>
synchronize again. Maybe in your configuration that's not an issue, but still<br>
worth to mention.<br>
<br>
<br>
To sum up, in my opinion one should use server-side filtering whenever<br>
possible. And that would free you from making any changes in the OfflineIMAP<br>
config :)<br>
<br>
All the best,<br>
Tomasz<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Romain PELISSE,<br><i>"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it" -- Terry Pratchett</i><br><a href="http://blog.wordpress.belaran.eu/" target="_blank">Belaran ins Prussia (blog)</a>     (... finally up and running !)
</div>