I'm trying to get mutt working on ubuntu, but I keep getting the error:
"Couldn't lock /home/{{user}}/Mail/sent"
when i try to send mail. My permissions for ~/Mail
is drwxrwx---
. I would really appreciate any advice on how to solve this.
I'm using bash for windows. Below you can see a excerpt of my .muttrc
file.
I've left out stuff for security.
set folder = "imaps://exchange.ku.dk:993/"
set spoolfile = "+INBOX"
set postponed="+[ku]/Drafts"
set record="~/Mail/sent.lock"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set editor = 'vim'
set timeout = 10
Answer
My suspicion is that another service is blocking the file from being locked. Actually, you seem to be relaying your mails (as per your folder
directive in your .muttrc
file).
That will probably use Postfix
underneath for the mail get relayed, and that's where I suppose the culprit is. Ubuntu systems come with a system to confine services to do only what they are allowed to do, and when you install Postfix
it will automatically create a basic configuration for it (which doesn't include anything that you might do with mutt
, of course).
To quickly test it, you might stop the apparmor
tool by invoking:
If you're using Ubuntu 14.04 or prior:
/etc/init.d/apparmor teardown
If you're using Ubuntu 16.04 or subsequent:
systemctl stop apparmor
Then, try using mutt
again. If it works, my assumption is right. In that case, you would need either to:
- Not define the
Postfix
configuration file in apparmor. For that, simply go to/etc/apparmor.d
, find the postfix file under that tree and delete it, restartapparmor
and you're done. - Define
Postfix
configuration and extend it with yourmutt
additional configuration. For that, I recommend start learning here.
No comments:
Post a Comment