Discussion:
Using mutt with remote IMAP and local mailboxes
Chris Green
21 years ago
Permalink
Does anyone here use mutt with a remote IMAP server and local
mailboxes.

I'm just thinking this might serve my purposes quite well on my home
machine. Most of the time I read and reply to mail by logging into a
remote ISP machine using ssh and running mutt there, this allows me to
ssh in from anywhere and read my mail in exactly the same way.

However there are times when it would be more convenient to be running
mutt on my home machine. How easy is it to mix local and remote
mailboxes with mutt nowadays, I know in the early days of mutt's IMAP
support it was a bit clunky.

Can I for example:-
Have a directory/mailbox display of both local and remote
mailboxes at the same time?
Monitor for new mail in both local and remote mailboxes?
Move mail from remote IMAP to local folders easily?
--
Chris Green (***@areti.co.uk)
M. Fioretti
21 years ago
Permalink
Post by Chris Green
Can I for example:-
Have a directory/mailbox display of both local and remote
mailboxes at the same time?
Monitor for new mail in both local and remote mailboxes?
Move mail from remote IMAP to local folders easily?
maybe, but I may be completely wrong, offline_imap gives you the same
final result?

HTH,
Marco
--
Marco Fioretti mfioretti, at the server mclink.it
Red Hat for low memory http://www.rule-project.org/en/

[WYSIWYG] Word processing may be an obsolete idea of the 1980s...no
longer a necessity in the age of the Web and email
Michael Stutz, The Linux Cookbook
David Yitzchak Cohen
21 years ago
Permalink
Post by Chris Green
Can I for example:-
Have a directory/mailbox display of both local and remote
mailboxes at the same time?
no
Post by Chris Green
Monitor for new mail in both local and remote mailboxes?
yes
Post by Chris Green
Move mail from remote IMAP to local folders easily?
yes

Enjoy,
- Dave
--
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler. You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel
Chris Green
21 years ago
Permalink
Post by Chris Green
Can I for example:-
Have a directory/mailbox display of both local and remote
mailboxes at the same time?
no
Pity, surely the answer to my last question depends on this somewhat.
Post by Chris Green
Monitor for new mail in both local and remote mailboxes?
yes
Post by Chris Green
Move mail from remote IMAP to local folders easily?
yes
How is it easy? If I can't 'navigate' by going up and down
directories from one mailbox to the other it doesn't strike me as
particularly easy. Having to type in the destination (or source)
directory is what I want to avoid.

I.e. I am viewing some mail in (say) a remote IMAP mailbox, I decide I
want to copy some items from the remote mailbox to a local one. I tag
the messages, how do I then save them locally? Do I have to enter the
full local mailbox name? (What I would really like is to be able to
use the remote name as the local name, see the other thread recently)
--
Chris Green (***@areti.co.uk)
Jens Paulus
21 years ago
Permalink
Hi Chris,
...
saving tagged remote messages locally is done just like saving tagged
local messages locally or saving tagged local messages remotely. Just
press "s" and enter =foldername to saving locally or
imaps://***@imap.server.com/ for saving remotely. The common mailbox
shortcuts !, <, > work if you have set the appropriate variables.

Best regards

Jens
Jens Paulus
21 years ago
Permalink
Hi Chris,
Post by Jens Paulus
local messages locally or saving tagged local messages remotely. Just
press "s" and enter =foldername to saving locally or
of cource, you also need the tag-prefix. Press ";s" to save all the
tagged messages.

Best regards

Jens
Chris Green
21 years ago
Permalink
Post by Jens Paulus
Hi Chris,
Post by Jens Paulus
local messages locally or saving tagged local messages remotely. Just
press "s" and enter =foldername to saving locally or
of cource, you also need the tag-prefix. Press ";s" to save all the
tagged messages.
I've been having problems with my mailing list mail so haven't seen
all the thread. However, the above doesn't give me what I want
really. Having to enter =/foldername is non-trivial in my case
because my folder hierarchy is up to three levels deep. When I save
mail in my current hierarchy I just about never enter a folder name, I
always navigate there using the cursor keys (or actually more likely
h,j,k,l). Having to enter a long destination folder name is not
'easy' as far as I'm concerned.
--
Chris Green (***@areti.co.uk)
Mads Laursen
21 years ago
Permalink
...
Try entering '~/' at the save prompt, and press <TAB> twice. That
should give you a folder view. You also have tab-completion. All you
really need to do, is enter enough of the destination to disambiguate
where you wish to browse from. In my book that counts as 'easy'.

When in the folder view try pressing '?' to see the list of bound
keys. Especially useful is 'N' for creating new files (if you quit the
browser without selecting a destination you are placed where you began
your browsing, and your text prompt is set to delete your current
entry (moving back and forth or tabbing once or something else other
than typing something printable should fix that)).

/dossen
--
Common sense is the collection of prejudices acquired by age eighteen.
-- Albert Einstein
Chris Green
21 years ago
Permalink
...
Surely that's not going to work when I'm trying to save from an IMAP
folder to a local folder as they're on different hierarchies. That's
the whole problem, I want a simple way of transferring a message from
(say) the remote IMAP hierarchy to the same place in the local
hierarchy.

Essentially what I want is 'offline working' for individual messages.
Post by Mads Laursen
When in the folder view try pressing '?' to see the list of bound
keys. Especially useful is 'N' for creating new files (if you quit the
browser without selecting a destination you are placed where you began
your browsing, and your text prompt is set to delete your current
entry (moving back and forth or tabbing once or something else other
than typing something printable should fix that)).
Yes, I use all those short-cuts and I'm familiar with them but they
don't address the problem with two 'homes' as it were.
--
Chris Green (***@areti.co.uk)
Mads Laursen
21 years ago
Permalink
[snip]
...
It works that way for me. I have all my mail in IMAP, and when I need
to save a mail to a local file I just use the regular save function,
type the beginning of the (local) path, and the rest is just using
tab-completion (or the browser, but I prefer completing in the
prompt). I havent tried, but I should think you can define both local
and IMAP folders as "mailboxes" at the same time, if you need to.

The only problems I can see are starting with local folders (I'm not
sure mutt connects correctly to IMAP in that case, but my inbox is in
IMAP) and the IMAP connection timing out if I stay in local mailboxes
for too long.

/dossen
--
Common sense is the collection of prejudices acquired by age eighteen.
-- Albert Einstein
Chris Green
21 years ago
Permalink
...
Ah, yes, I think I see what you mean now. The initial '~/' takes you
to the root of one's local IMAP folders. I'll give it a try and see
how I get on. Thanks.
Post by Mads Laursen
The only problems I can see are starting with local folders (I'm not
sure mutt connects correctly to IMAP in that case, but my inbox is in
IMAP) and the IMAP connection timing out if I stay in local mailboxes
for too long.
I'm pretty sure I'll always be wating to go from remote IMAP to local
files.
--
Chris Green (***@areti.co.uk)
Mads Laursen
21 years ago
Permalink
[snip]
Post by Chris Green
Ah, yes, I think I see what you mean now. The initial '~/' takes you
to the root of one's local IMAP folders. I'll give it a try and see
how I get on. Thanks.
The local files are not accessed thru IMAP, ~/ is just your $HOME.
Post by Chris Green
Post by Mads Laursen
The only problems I can see are starting with local folders (I'm not
sure mutt connects correctly to IMAP in that case, but my inbox is in
IMAP) and the IMAP connection timing out if I stay in local mailboxes
for too long.
I'm pretty sure I'll always be wating to go from remote IMAP to local
files.
Well, then you should be able to get by.

Hope this helped.

/dossen
--
Common sense is the collection of prejudices acquired by age eighteen.
-- Albert Einstein
Chris Green
21 years ago
Permalink
Post by Mads Laursen
[snip]
Post by Chris Green
Ah, yes, I think I see what you mean now. The initial '~/' takes you
to the root of one's local IMAP folders. I'll give it a try and see
how I get on. Thanks.
The local files are not accessed thru IMAP, ~/ is just your $HOME.
Typo, sorry, I meant "one's local folders", not "one's local IMAP
folders". (Well, I knew what I meant!)
Post by Mads Laursen
Hope this helped.
Yes, thanks for persevering!
--
Chris Green (***@areti.co.uk)
David Yitzchak Cohen
21 years ago
Permalink
Post by Chris Green
Post by Chris Green
Move mail from remote IMAP to local folders easily?
yes
How is it easy? If I can't 'navigate' by going up and down
directories from one mailbox to the other it doesn't strike me as
particularly easy. Having to type in the destination (or source)
directory is what I want to avoid.
You can type part of it and then tab your way around. . .
Post by Chris Green
I.e. I am viewing some mail in (say) a remote IMAP mailbox, I decide I
want to copy some items from the remote mailbox to a local one. I tag
the messages, how do I then save them locally? Do I have to enter the
full local mailbox name? (What I would really like is to be able to
use the remote name as the local name, see the other thread recently)
That's not so easy. I'd suggest flagging the messages, and then using a
specialized tool (mailutil from the UW-IMAPd distribution comes to mind)
to move flagged messages from your IMAP server to your local system,
mirroring the mailbox structure.

HTH,
- Dave
--
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler. You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel
Chris Green
21 years ago
Permalink
...
I do already have a script which downloads IMAP mailboxes, it's
adapted from one similar to the mailutil stuff. I've already done
some changes to it so am quite happy to change it further or use it as
the basis for something new.

The question is though, how do I 'flag' the messages on the remote
IMAP so that my utility can pick them out easily? Is there an
obvious facility in IMAP to do this?

Overall I'd be happiest with this approach as it's somehow easier to
be convinced that a script isn't losing mail (probably wishful
thinking but still).
--
Chris Green (***@areti.co.uk)
René Clerc
21 years ago
Permalink
Post by Chris Green
Can I for example:-
Have a directory/mailbox display of both local and remote
mailboxes at the same time?
no
The Mailboxes browser shows all mailboxes defined by the $mailboxes
command(s), both remote and local.
--
René Clerc - (***@clerc.nl) - PGP: 0x9ACE0AC7

MISS, n. The title with which we brand unmarried women to indicate
that they are in the market. Miss, Missis (Mrs.) and Mister (Mr.) are
the three most distinctly disagreeable words in the language, in sound
and sense. Two are corruptions of Mistress, the other of Master.
-Ambrose Bierce, "The Devil's Dictionary"
David Yitzchak Cohen
21 years ago
Permalink
Post by René Clerc
Post by Chris Green
Can I for example:-
Have a directory/mailbox display of both local and remote
mailboxes at the same time?
no
The Mailboxes browser shows all mailboxes defined by the $mailboxes
command(s), both remote and local.
I guess that's a viable option if you have some automated way of setting
$mailboxes to _all_ your folders (not just "inbox"es ... which may
interfere with other stuff, but probably won't), but manually inputting
(and maintaining!) that whole list is not fun.

- Dave
--
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler. You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel
Loading...