2

Question: can someone confirm and/or explain the following observation?


After shopping for ~/.mutt/muttrc settings over the web and digging into years-old (if not decades old) posts, I found the following mapping has an interesting side effect: it seems to get the message ARCHIVED properly for Gmail.

macro index,pager e  "<delete-message><sync-mailbox>"   "move message to trash"

Older posts suggested the following mapping, which all have noticeable side-effects as of creating new labels on my Gmail account in an unexpected fashion.

#macro index,pager e "<save-message>=[Gmail]/All Mail<enter><enter>" "Archive"
    # ==> Keeps creating new tags like [Gmail]/AllMail and [Gmail]/AllMailMail ...
#macro index,pager e "<save-message>=All Mail<enter><enter>" "Archive"
    # ==> Keeps creating new tags like `AllMailMail` and `AllMailMailMail` and 
    # so on, per each archive/push.
#macro index,pager A "<save-message>=Archive<enter>" "Archive Message"
    # ==> Well, Gmail is using "All Mails" tag/label to bin all emails for now. (Maybe I have also misread the original post from Ref #1).

Reference

List of posts that I ran into:

  1. A note on archiving Gmail messages in Mutt
  2. Elegant mutt setup for use with gmail
  3. Mutt, the Vim Way ==> I started to try out the dd mapping from this post, and was happy to discover that "deleting" in Mutt == "archiving" on Gmail (in Year 2019).
1
  • This depends on your setup. If you’re syncing messages with offlineimap/isync or use built-in imap there are surely differences. I believe I won’t be able to answer your question. But someone else could. Or try to ask on IRC #mutt or #neomutt on freenode and share your findings here – Jakub Jindra Jun 26 '19 at 21:32
1

Yes, but this behavior depends on how the messages are retrieved and also the settings in your email account;

answer from: https://support.google.com/mail/thread/11787139?hl=en

I assume you are accessing your Gmail account from some e-mail client or app (as that's the only way deleted messages can be archived instead of deleted).

  • In the Gmail web interface, go to: Settings->POP/IMAP
  • If you use POP3, go to: POP Download->When messages are accessed with POP (and select the appropriate option from the drop-down).
  • If you use IMAP, go to: IMAP access->When a message is marked as deleted and expunged from the last visible IMAP folder (and select the appropriate option).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.