You are not logged in.

#1 2014-06-30 15:15:16

cecure
Member
Registered: 2013-04-09
Posts: 25

Mutt/Offlineimap Sent mail is showing up in Gmail Inbox

Hi,

I am just starting my journey with mutt and quite like the interface thus far but I am having trouble with sent emails showing up in my Gmail inbox.  It is a little annoying to always have my sent emails appear as unread in my inbox.  In my search for a solution I have found that this behavior sometimes occurs if you have Gmail filters that are set to never send to spam, I checked and do not have any such filters.  This could also happen if I had $record set, but I have specifically unset record.  My muttrc and offlineimaprc are as follows (I used several tutorial sites to help create these) (I have hashed out some personal details):

muttrc

# Paths ----------------------------------------------
set folder           = ~/.mail               # mailbox location
set alias_file       = ~/.mutt/alias         # where to store aliases
set header_cache     = ~/.mutt/cache/headers # where to store headers
set message_cachedir = ~/.mutt/cache/bodies  # where to store bodies
set certificate_file = ~/.mutt/certificates  # where to store certs
set mailcap_path     = ~/.mutt/mailcap       # entries for filetypes
set tmpdir           = ~/.mutt/temp          # where to keep temp files
set signature        = ~/.mutt/sig           # my signature file

# Basic Options --------------------------------------
set wait_key = no        # shut up, mutt
set mbox_type = Maildir  # mailbox type
set timeout = 3          # idle time before scanning
set mail_check = 0       # minimum time between scans
unset move               # gmail does that
set delete               # don't ask, just do
unset confirmappend      # don't ask, just do!
set quit                 # don't ask, just do!!
unset mark_old           # read/new is good enough for me
#set beep_new             # bell on new mails
set pipe_decode          # strip headers and eval mimes when piping
set thorough_search      # strip headers and eval mimes before searching

# Status Bar -----------------------------------------
set status_chars  = " *%A"
set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"

# Header Options -------------------------------------
ignore *                                # ignore all headers
unignore from: to: cc: date: subject:   # show only these
unhdr_order *                           # some distros order things by default
hdr_order from: to: cc: date: subject:  # and in this order

# Account Settings -----------------------------------

# Default inbox.
set spoolfile = "+mygmail/INBOX"

# Alternate email addresses.
alternates ####### ########


# Other special folders.
set mbox      = "+mygmail/archive"
set postponed = "+mygmail/drafts"

# Index View Options ---------------------------------
set date_format = "%m/%d"
set index_format = "[%Z]  %D  %-20.20F  %s"
set sort = threads                         # like gmail
set sort_aux = reverse-last-date-received  # like gmail
set uncollapse_jump                        # don't collapse on an unread message
set sort_re                                # thread based on regex
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"

# Index Key Bindings ---------------------------------
bind index gg       first-entry
bind index G        last-entry

bind index R        group-reply
bind index <tab>    sync-mailbox
bind index <space>  collapse-thread

# Ctrl-R to mark all as read
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"

# Sync email
macro index O "<shell-escape>offlineimap<enter>"           "run offlineimap to sync all mail"
macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox"

# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"

# Pager View Options ---------------------------------
set pager_index_lines = 10 # number of index lines to show
set pager_context = 3      # number of context lines to show
set pager_stop             # don't go to next message automatically
set menu_scroll            # scroll in menus
#set tilde                  # show tildes like in vim
unset markers              # no ugly plus signs

set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
alternative_order text/plain text/enriched text/html

# URLview ... calls ~/.urlview
macro pager \Cu <pipe-entry>'urlview'<enter> 'Follow links with urlview'


# Compose View Options -------------------------------
set realname = "My Name"          # who am i?
set envelope_from                    # which from?
set sig_dashes                       # dashes before sig
set edit_headers                     # show headers when composing
set fast_reply                       # skip to compose when replying
set askcc                            # ask for CC:
set fcc_attach                       # save attachments with the body
unset mime_forward                   # forward attachments as part of body
set forward_format = "Fwd: %s"       # format of subject when forwarding
set forward_decode                   # decode when forwarding
set attribution = "On %d, %n wrote:" # format of quoting header
set reply_to                         # reply to Reply to: field
set reverse_name                     # reply as whomever it was to
set include                          # include message in replies
set forward_quote                    # include message in forwards
set editor = "emacs -nw"

set from     = "#################@gmail.com"
set sendmail = "/usr/local/bin/msmtp -a mygmail ###############@gmail.com"
set sendmail_wait = 0
unset record

#color scheme
source muttsolar16

My offlineimaprc

# Sample minimal config file.  Copy this to ~/.offlineimaprc and edit to
# get started fast.

[general]
ui = TTY.TTYUI
accounts = MyGmail
pythonfile=~/.mutt/offlineimap.py
fsync = False

[Account MyGmail]
localrepository = CGLocal
remoterepository = CGRemote
status_backend = sqlite

[Repository CGLocal]
type = Maildir
localfolders = ~/.mail/mygmail
nametrans = lambda folder: {'drafts':  '[Gmail]/Drafts',
                            'sent':    '[Gmail]/Sent Mail',
                            'flagged': '[Gmail]/Starred',
                            'trash':   '[Gmail]/Trash',
                            'archive': '[Gmail]/All Mail',
                            }.get(folder, folder)

[Repository CGRemote]
maxconnections=1
type = Gmail
remoteuser = ############@gmail.com
remotepasseval = keyring.get_password("Login","############@gmail.com")
realdelete = no
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
nametrans = lambda folder: {'[Gmail]/Drafts':    'drafts',
                            '[Gmail]/Sent Mail': 'sent',
                            '[Gmail]/Starred':   'flagged',
                            '[Gmail]/Trash':     'trash',
                            '[Gmail]/All Mail':  'archive',
                            }.get(folder, folder)
folderfilter = lambda folder: folder not in ['[Gmail]/Trash',
                                             '[Gmail]/Important',
                                             '[Gmail]/Spam',
                                             ]

I use msmtp to send the emails (and they do send) but as far as I know that program should have nothing to do with my folder labeling.

What happens exactly:  When in mutt, I press 'm' and compose an email and send with 'y'.  Oddly enough, the email appears in my gmail inbox (the webmail) even before I sync mutt with offlineimap (I don't automatically sync).  Once I sync, I see the email in both my sent mail and inbox.

Any thoughts would be appreciated smile

Offline

#2 2014-06-30 18:09:19

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

Re: Mutt/Offlineimap Sent mail is showing up in Gmail Inbox

You have unset the record variable.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB