Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Search this Thread
Old 10-15-2013, 07:54 AM   #1
Registered: Jun 2013
Location: Norway
Distribution: Slackware
Posts: 38

Rep: Reputation: Disabled
mutt configuration [SOLVED]


I am trying to set up my two email accounts in CLI using offlineimap, msmtp and mutt. I got the configurations for offlineimap and msmtp to work on my email accounts, but for the life of me I cannot get mutt to work with these programs! The solution is probably quite simple, but the online tutorials I have come accross have confused me to no ends since mutt have such a ridiculous flexibility when it comes to various email setups.

My offlineimaprc looks like this:

accounts = work, home

[Account work]
localrepository = work-local
remoterepository = work-remote
status_backend = sqlite

[Account home]
localrepository = home-local
remoterepository = home-remote
status_backend = sqlite

[Repository work-local]
type = Maildir
localfolders = ~/mail/work

[Repository work-remote]
type = Gmail
remotehost =
remoteuser =
remotepass = userpassword
nametrans = lambda foldername: re.sub ('^\[gmail\]', 'bak',
re.sub ('sent_mail', 'sent',
re.sub ('starred', 'flagged',
re.sub (' ', '_', foldername.lower()))))
folderfilter = lambda foldername: foldername not in '[Gmail]/All Mail'
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

[Repository home-local]
type = Maildir
localfolders = ~/mail/home

[Repository home-remote]
type = IMAP
remotehost =
remoteuser = username
remotepass = userpassword

enabled = yes
filename = ~/.mutt/mailboxes
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"

My msmtprc looks like this:

# Global Settings
timeout 30
logfile /var/log/msmtp.log
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

# Seria Work Mail
account work
tls_starttls off
port 465
password userpassword

# Private Home Mail
account home
tls_starttls on
port 587
user username
password userpassword
tls_trust_file ~/.cert/

# Set default account
account default: work

Currently I have tried to add generic mutt configuration in .mutt/muttrc and account spesific configuration in .mutt/accounts/{account_name}. The files look like this (they do not work):


set editor=`echo \$EDITOR`
set folder=~/mail
set spoolfile=+work/inbox
set record=+work/sent
set mbox_type=Maildir
set realname="My Real Name"
set edit_headers=yes

source ~/.mutt/mailboxes

folder-hook work/* source ~/.mutt/accounts/work
folder-hook home/* source ~/.mutt/accounts/home


set from = ""
set sendmail = "/usr/bin/msmtp -a work"
set mbox = "+seria/inbox"
set record = "+seria/sent"
set postponded = "+seria/drafts"

color status green default

macro index D \
"<save-message>+seria/trash<enter>" \
"move message to the trash"


set from = ""
set sendmail = "/usr/bin/msmtp -a home"
set mbox = "+radiotube/INBOX"
set record = "+radiotube/INBOX.Sent"
set postponded = "+radiotube/INBOX.Drafts"

color status cyan default

macro index D \
"<save-message>+radiotube/INBIX.Trash<enter>" \
"move message to the trash"

Is there any leet mutt user out there that can spot the foult in my setup? Some help here would certainly be grand!!

Last edited by dansimon; 10-18-2013 at 03:29 AM.
Old 10-16-2013, 01:23 AM   #2
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,093

Rep: Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099

I have a very similar setup to you with offlineimap, msmtp and mutt, but I also use imapfilter :-)

although you've not said what the symptoms are, I guess you are experiencing a problem with quoting.
Try replacing your two folder-hook directives with:
folder-hook work "source ~/.mutt/accounts/work"
folder-hook home "source ~/.mutt/accounts/home"
Note also that I the wildcard in the paths should not be needed even if you are in a sub directory ( eg work/boringstuff/weeklymeetings/)


Old 10-18-2013, 02:18 AM   #3
Registered: Jun 2013
Location: Norway
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: Disabled
Thanks for your reply!

On closer inspection the mutt client does acctualy work (type c and navigate to your accounts), but for some reason at startup and when I go to the inboxes of either account I get the message:
source errors in /home/[user]/.mutt/accounts/[account_name]

I dont know what this means, and it's hard to tell you the symptoms, since I cant really see any.. Everything seems to work fine.
Old 10-18-2013, 03:29 AM   #4
Registered: Jun 2013
Location: Norway
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: Disabled
I am marking this as solved, since the unresolved errors are non critical, thanks again for your reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mutt return-path configuration jayasekar Linux - Software 0 05-11-2010 01:47 AM
mutt - configuration hasanatizaz Linux - Newbie 2 12-19-2008 11:43 PM
Mutt client configuration syntacticalerror Linux - Software 3 10-17-2008 09:38 AM
Mutt Configuration schmmd Linux - Software 0 08-14-2005 08:01 PM
Mail configuration for Mutt Phil Healey Linux - General 2 07-15-2003 01:01 AM

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration