You are not logged in.

#1 2013-10-25 01:09:03

0X1A
Member
Registered: 2013-03-27
Posts: 43

[SOLVED] Mutt and Gmail Labels

After a bit of googling I haven't been able to find a way to manage labels applied to emails. Is there anyway to do this using just muttrc?

Last edited by 0X1A (2013-10-25 02:01:51)

Offline

#2 2013-10-25 01:13:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Mutt and Gmail Labels

How do you access gmail? Using an IMAP syncing app, like offlineimap or isync, the labels can essentially be treated as maildirs, in gmail's settings, you just show them in IMAP.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-10-25 01:19:22

0X1A
Member
Registered: 2013-03-27
Posts: 43

Re: [SOLVED] Mutt and Gmail Labels

jasonwryan wrote:

How do you access gmail? Using an IMAP syncing app, like offlineimap or isync, the labels can essentially be treated as maildirs, in gmail's settings, you just show them in IMAP.

By using imap, here's my .muttrc for example

set imap_user = "user@gmail.com"
set imap_pass = "pass"
set smtp_url = "smtp://user@smtp.gmail.com:587/"
set smtp_pass = "pass"
set from = "user@gmail.com@gmail.com"

set editor = "vim"

set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set imap_check_subscribed
set hostname = gmail.com
set mail_check = 120
set timeout = 300
set imap_keepalive = 300
set postponed = "+[GMail]/Drafts"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies

set query_command="goobook query '%s'"
bind editor <Tab> complete-query

Offline

#4 2013-10-25 01:31:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Mutt and Gmail Labels

Define the mailboxes you wish to have mutt check; eg:

mailboxes +GMail/INBOX +GMail/LabelOne +GMail/LabelTwo +GMail/LabelThree

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-10-25 01:40:47

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] Mutt and Gmail Labels

I think if you access Gmail directly with Mutt, labels are just treated as folders.  Hit 'c' (or whatever key is bound to "change folder") and you should see them.  If you're using the sidebar patch and trying to get the labels displayed there, you can check out the sidebar patch homepage In the off chance that by "manage labels" you mean actually creating, deleting and changing Gmail labels directly, though, you can't; Mutt isn't a Gmail interface, it's just a mail reader.

Offline

#6 2013-10-25 01:53:14

0X1A
Member
Registered: 2013-03-27
Posts: 43

Re: [SOLVED] Mutt and Gmail Labels

jasonwryan wrote:

Define the mailboxes you wish to have mutt check; eg:

mailboxes +GMail/INBOX +GMail/LabelOne +GMail/LabelTwo +GMail/LabelThree

Wow that works, such an easy fix and I'm suprised I couldn't find anything that suggeted that this was how labels were handled.

ANOKNUSA wrote:

I think if you access Gmail directly with Mutt, labels are just treated as folders.  Hit 'c' (or whatever key is bound to "change folder") and you should see them.  If you're using the sidebar patch and trying to get the labels displayed there, you can check out the sidebar patch homepage In the off chance that by "manage labels" you mean actually creating, deleting and changing Gmail labels directly, though, you can't; Mutt isn't a Gmail interface, it's just a mail reader.

I actually tried this, the only thing that shows up is regular Gmail folders like All Mail, Drafts, Important, Sent Mail etc.

Offline

#7 2013-10-25 02:00:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Mutt and Gmail Labels

ANOKNUSA wrote:

I think if you access Gmail directly with Mutt, labels are just treated as folders

I don't think this would be sufficient; you would still need to expose those labels over IMAP and point mutt at them.


0X1A: please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2013-10-25 17:51:14

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] Mutt and Gmail Labels

jasonwryan wrote:
ANOKNUSA wrote:

I think if you access Gmail directly with Mutt, labels are just treated as folders

I don't think this would be sufficient; you would still need to expose those labels over IMAP and point mutt at them.


0X1A: please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

I don't recall doing that myself before I started using local mail; it has been a long time, though. hmm

Offline

#9 2013-12-17 19:09:00

thoase
Member
Registered: 2013-06-10
Posts: 2

Re: [SOLVED] Mutt and Gmail Labels

Offline

Board footer

Powered by FluxBB