Gnus development mailing list
 help / color / mirror / Atom feed
* gmail and X-GM-EXT1 extensions
@ 2013-04-20  9:35 Leonidas Tsampros
  2013-04-21 23:06 ` [PATCH] " Leonidas Tsampros
  0 siblings, 1 reply; 11+ messages in thread
From: Leonidas Tsampros @ 2013-04-20  9:35 UTC (permalink / raw)
  To: ding

Hello,

long time no see :)

TLDR: My Gmail inbox is full even after splitting mail. Here is why.

Due to some not so recent events, I eventually had to move 95% of my
email setup to gmail.

My current setup is that all email arrives at gmail in a specific folder
and with the help of nnimap-inbox, I fancy-split all the mails that
arrive there. The series of commands that I see in my *imap log* buffer
is the following:

12206 LIST "" "*"
12207 SELECT "ltsampros@upnet.gr"
12208 UID FETCH 1:* FLAGS
12209 UID FETCH 30246:30254,30256:30259 (UID BODY.PEEK[HEADER])
12210 UID COPY 30247,30250:30251,30253,30256,30258 "mail.gnu.emacs.devel"
12211 UID COPY 30246,30248:30249,30252,30254,30257,30259 "mail.gnu.emacs.orgmode"
12212 UID STORE 30246:30254,30256:30259 +FLAGS.SILENT (\Deleted)
12213 UID EXPUNGE 30246:30254,30256:30259

which is working.

However, we all know that Gmail IMAP is a weird monster. My problem is
that all these messages are appearing in the "Inbox" folder on Gmail's
interface ,even after the COPY and EXPUNGE, which means now that my
inbox is filled with very very very many emails and that *irritates* me.

So, I started digging by selecting a random mailbox created by
nnimap-split-incoming:

UID SELECT mail.gnu.emacs.devel
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-save gnus-forward $has_cal)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-save gnus-forward $has_cal \*)] Flags permitted.
* OK [UIDVALIDITY 129] UIDs valid.
* 3032 EXISTS
* 0 RECENT
* OK [UIDNEXT 11812] Predicted next UID.
UID OK [READ-WRITE] mail.gnu.emacs.devel selected. (Success)

I think this is pretty much normal. But let's fetch flags of the last
email in this folder:

UID FETCH 3032 FLAGS
* 3032 FETCH (FLAGS ())

Again it does seem normal, however this mail in Gmail's web interface is
STILL listed with the following labels "Inbox" and
"mail.gnu.emacs.devel".

After an enlightening moment of google-funess, I arrived at this URL:

https://developers.google.com/google-apps/gmail/imap_extensions?hl=el#access_to_gmail_labels_x-gm-labels

Which pretty much explains the situation:

UID FETCH 3032 (FLAGS X-GM-LABELS)
* 3032 FETCH (X-GM-LABELS ("\\Inbox") FLAGS ())

Again, gmail confuses me a bit since I would expect this email to have two
labels ("\\inbox" and "mail.gnu.emacs.devel") since these two are
displayed on the web interface but let's accept that the gmail interface
interprets the folder created by nnimap-split-incomings COPY as a
label.

So, how do we remove this fraking \\Inbox X-GM-LABEL which messes up and
clatters our web interface?

Simple:

UID STORE 3032 -X-GM-LABELS ("\\Inbox")
* 3032 FETCH (X-GM-LABELS ())
UID OK Success

And now the million dollar question:

Is there an easy way to run this command before the expunge during
nnimap-split-incoming?

Best Regards,
Leonidas Tsampros



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-08-01 16:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-20  9:35 gmail and X-GM-EXT1 extensions Leonidas Tsampros
2013-04-21 23:06 ` [PATCH] " Leonidas Tsampros
2013-06-06 15:09   ` Ted Zlatanov
2013-06-09 18:53     ` Leonidas Tsampros
2013-06-10  3:30       ` Ted Zlatanov
2013-06-10  5:46         ` Leonidas Tsampros
2013-06-10  6:28           ` Ted Zlatanov
2013-07-18  4:11             ` Leonidas Tsampros
2013-08-01 15:27               ` Lars Magne Ingebrigtsen
2013-08-01 16:22                 ` Leonidas Tsampros
2013-08-01 16:35                   ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).