Mutt: gmail archive

mutt

I want to recreate the gmail archiving method. I sync (using offlineimap) my inbox and my all mail folders, and, by archiving, I want to keep the one in All Mail and delete the one in inbox. Also, when I read a new mail in inbox I would like to automatically mark as read the corresponding mail into all mail.

I tried using the macro index, pager A s><return>y (I have set All Mail folder to $mbox), but the problem is that I get duplicate mails in the All Mail folder. Also, if I try to just delete the mail from Inbox, the corresponding one from All Mail gets deleted too.

Later edit:

Doing some more research into this topic I found that the duplicate mail in the All Mail mailbox stays there for 2 syncs: one to send it to gmail, which recognizes that it's a duplicate and deletes it, and one to delete it locally. So it seems that my macro works, but I would like to overcome this annoying issue.

Best Answer

It's very annoying indeed because offlineimap keep downloading things twice, one for inbox and one for all mail. So I fingure out one trick: I don't sync All Mail at all! Instead I sync just Inbox and everything else.

I am very grateful to know a better way around.

Related Question