How do I configure mutt to work with IMAP ?

How do I configure mutt to work with IMAP ?

Post by markhoble » Fri, 01 Oct 2004 12:07:59


I have installed mutt from a debian package. How do I configure mutt to
communicate with an imap server on my LAN ?

The file $HOME/.muttrc does not exist on my machine. Should something have
created this ?

Thanks in advance to anyone who can help.

Regards,

Mark.

--

Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

http://www.yqcomputer.com/
 
 
 

How do I configure mutt to work with IMAP ?

Post by markhoble » Sun, 03 Oct 2004 06:07:20

I have created a file $HOME/mark/.muttrc on the client.

From the client:

$cat .muttrc

set folder=imap://charon/home/mark
imap://charon/mark

$mutt

Error in /home/mark/.muttrc, line 10: imap://charon/mark: unknown command
source: errors in /home/mark/.muttrc

If I remove the line imap://charon/mark, I get the following error at the
bottom of the mutt screen:

Mutt: (no mailbox)
/var/mail/mark No such file or directory (errno=2)

telnet charon reveals:

$ cd /home/mark
$ ls
dead.letter mbox

What is going on ?

Thanks in advance to anyone who can help.

Regards,

Mark.

--

Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Reply to: markhobley at hotpop dot do_not_type_this_bit com

http://www.yqcomputer.com/

 
 
 

How do I configure mutt to work with IMAP ?

Post by Paul Walke » Sun, 03 Oct 2004 18:21:19


That's not a mutt command, so you're going to get an error. :) What were you
trying to accomplish by putting it there...?

--
Paul

You're right - what should we care about silly things like counting votes
when we're in a war to preserve democracy. And mind that you don't say
anything against the current resident because that would undermine our
efforts to preserve freedom. -- Paul Tomblin
 
 
 

How do I configure mutt to work with IMAP ?

Post by markhoble » Mon, 04 Oct 2004 21:06:44


I have now changed my mail delivery formats, so this configuration has now
changed.

I have reconfigured exim to deliver mail in Maildir format:

My .muttrc file on the client now reads:

set folder=imap://charon/Maildir
imap://charon/mark


I want mutt to use the directory Maildir, which is located at

/home/mark/Maildir

on the IMAP server.

I am obviously misunderstanding the information that I am obtaining from
various internet sources.

My intentions were as follows:

The set folder directive was to tell mutt that the mail directory was on the
imap server "charon" ("charon" is defined in /etc/hosts).

The imap: directive was to tell mutt that it is to connect to the imap server
(charon), and retrieve mail for user "mark".

It's not working though :(

How do I fix it ?

--

Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Reply to: markhobley at hotpop dot do_not_type_this_bit com

http://www.yqcomputer.com/
 
 
 

How do I configure mutt to work with IMAP ?

Post by Paul Walke » Tue, 05 Oct 2004 00:21:43


Ah. imap://server/folder is used for folder names, not for anything else. So
the first bit - the folder= - is okay.

If it helps, here's what I sometimes use:

set folder="imaps://localhost/"
set spoolfile="=inbox"

You should also investigate the imap_user and imap_pass variables in the
manual...

--
Paul
 
 
 

How do I configure mutt to work with IMAP ?

Post by markhoble » Tue, 05 Oct 2004 09:06:33


Ok, I've left this in.

set folder=imap://charon/Maildir

I presume that the IMAP server (courier-imap) will prefix /home/mark to
Maildir, to provide access to the mail in /home/mark/Maildir on the mail
server.


I'm not sure what this is referring to. I don't have a file called inbox.

On the mail server:

$ cd /home/mark/Mailbox
$ ls -l
drwx------ 2 mark mark 1024 2004-10-03 10:59 courierimapkeywords
-rw-r--r-- 1 mark mark 3351 2004-10-03 10:59 courierimapuiddb
drwx------ 2 mark mail 4096 2004-10-03 10:59 cur
drwx------ 2 mark mail 4096 2004-10-04 00:27 new
drwx------ 2 mark mail 1024 2004-10-04 00:27 tmp

both /home/mark/Mailbox/cur and /home/mark/Mailbox/new contain squillions of
files named xxxxxxxxxx.xxxx.charon.markhobley.yi.org where xxxxxxxxxx.xxxx is
replaced by numbers.


Ok. If I leave these out, mutt should ask me for a username and password,
according to some net resources. I hope that's correct. I will add them
afterwards.

I haven't done any configuration to courier-imap. My version was obtained from
a debian package, and it just installed and ran without asking anything. I
presume it's all ok. I did a telnet test to the imap2 port on charon, and it
produced some sort of mail server session.

At the client side, with my .muttrc containing just the one command:

set folder=imap://charon/Maildir

I run mutt from the command line.

I get a full screen mutt session, but at the bottom of the screen I get:

---Mutt: (no mailbox)
/var/mail/mark: No such file or directory (errno =2)

I'm not sure whether this means on the local machine or on the mail server,
but in either case, it's the wrong place.

My mail is in /home/mark/Mailbox on the mail server (charon).

Regards,

Mark.

--

Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Reply to: markhobley at hotpop dot do_not_type_this_bit com

http://www.yqcomputer.com/
 
 
 

How do I configure mutt to work with IMAP ?

Post by Paul Walke » Wed, 06 Oct 2004 07:55:14


Possibly. No idea, to be honest. See if the IMAP server logs are helpful.


I don't use maildir, so I don't know what format you usually use to indcate
a mailbox. Whatever you'd use to change to a mailbox, put it in spoolfile.

Failing that, read the manual.


You haven't told it where your spoolfile is, so it's looking in some kind of
default place. Again, read the manual section on 'spoolfile'. Also probably
on folder, IMAP usage, and maildirs...

--
Paul