Gmail: moving/refiling does not remove Inbox label

129 views
Skip to first unread message

Tjaart Van Der Walt

unread,
Sep 29, 2016, 9:33:12 AM9/29/16
to mu-discuss
Hi,

If I refile or move mail using mu4e, and I look at my inbox the the Gmail web-client, I can see the correct label attached to my mail, but the mail is also still present in my Inbox.

I am not sure if there is a setting in Gmail, or mu4e to remove the Inbox label when moving a mail?

Dirk-Jan C. Binnema

unread,
Sep 29, 2016, 4:32:25 PM9/29/16
to mu-di...@googlegroups.com
Hi Tjaart,
The labels are just a GMail thing -- they map to the maildir folders on
your local machine.

If the mail is gone from (say) your inbox folder in mu4e, it's the job
of the program you're using to sync with gmail (offlineimap, mbsync,
...) to make sure it gets updated there. So perhaps best to see what's
going on there.

Cheers,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Nan Zhong

unread,
Sep 30, 2016, 8:30:15 PM9/30/16
to mu-discuss
I was able to get this working using the following (the relevant part is the removal of the Inbox label):
(add-hook 'mu4e-mark-execute-pre-hook
  (lambda (mark msg)
    (cond ((member mark '
(refile trash)) (mu4e-action-retag-message msg "-\\Inbox"))
         
((equal mark 'flag) (mu4e-action-retag-message msg "\\Starred"))
          ((equal mark '
unflag) (mu4e-action-retag-message msg "-\\Starred")))))

I use offlineimap to sync my mail and the relevant account section config is:
synclabels = yes
labelsheader
= X-Keywords

The mark execute pre hook was taken from Magnus' config detailed @ https://groups.google.com/forum/#!topic/mu-discuss/BpGtwVHMd2E. Highly recommend taking a look at that as it greatly helped streamline my config and workflow.

Hope that helps.
Reply all
Reply to author
Forward
0 new messages