Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using 2 offline imap accounts in mutt

494 views
Skip to first unread message

Benedikt

unread,
May 25, 2009, 1:29:53 PM5/25/09
to
Hi
How can I use 2 offline imap accounts in mutt?

--
Gruss, Benedikt

Ian Gregory

unread,
May 25, 2009, 5:49:30 PM5/25/09
to
On 2009-05-25, Benedikt <bene...@googlemail.com> wrote:

> How can I use 2 offline imap accounts in mutt?

Could you explain what an "offline imap account" is please.

To use multiple IMAP accounts I would just put them all in a mailboxes
command in my .muttrc

Ian

--
Ian Gregory
http://www.zenatode.org.uk/ian/

Benedikt

unread,
Jul 6, 2009, 7:16:46 AM7/6/09
to
Am 05/25/2009 11:49 PM, schrieb Ian Gregory:
> On 2009-05-25, Benedikt<bene...@googlemail.com> wrote:
>
>> How can I use 2 offline imap accounts in mutt?
>
> Could you explain what an "offline imap account" is please.
>
> To use multiple IMAP accounts I would just put them all in a mailboxes
> command in my .muttrc
>
> Ian
>
I have already a Maildir created by offlineimap(it's a program) and can
read the mails ad write them with the right address(folder-hooks) but eg
i wrote a mail from f...@example.com and it moved to b...@example.dom/Sent
except foo../Sent.

Ian Gregory

unread,
Jul 6, 2009, 9:47:14 AM7/6/09
to

OK, so OfflineIMAP is a program which keeps a local Maildir in sync with
a remote IMAP account. As far as Mutt is concerned you are reading a
Maildir, so you are not actually using Mutt's IMAP support at all right?

Are you asking about using OfflineIMAP to sync a Maildir with two IMAP
accounts, or how to use Mutt to read two Maildirs? Sorry, I am not
familiar with OfflineIMAP so I am probably not the best person to answer
your question - I hope someone else here can help.

Mariano Mara

unread,
Jul 8, 2009, 2:23:01 PM7/8/09
to
On Jul 6, 10:47 am, Ian Gregory <f...@prdetfanaaeextna.invalid> wrote:

> On 2009-07-06, Benedikt <benedi...@googlemail.com> wrote:
>
>
>
> > Am 05/25/2009 11:49 PM, schrieb Ian Gregory:
> >> On 2009-05-25, Benedikt<benedi...@googlemail.com>  wrote:
>
> >>> How can I use 2 offline imap accounts in mutt?
>
> >> Could you explain what an "offline imap account" is please.
>
> >> To use multiple IMAP accounts I would just put them all in a mailboxes
> >> command in my .muttrc
>
> >> Ian
>
> > I have already a Maildir created by offlineimap(it's a program) and can
> > read the mails ad write them with the right address(folder-hooks) but eg
> > i wrote a mail from f...@example.com and it moved to b...@example.dom/Sent
> > except foo../Sent.
>
> OK, so OfflineIMAP is a program which keeps a local Maildir in sync with
> a remote IMAP account. As far as Mutt is concerned you are reading a
> Maildir, so you are not actually using Mutt's IMAP support at all right?
>
> Are you asking about using OfflineIMAP to sync a Maildir with two IMAP
> accounts, or how to use Mutt to read two Maildirs? Sorry, I am not
> familiar with OfflineIMAP so I am probably not the best person to answer
> your question - I hope someone else here can help.
>

Yes you can, please see [1]. However as Ian noted, this has nothing to
do with Mutt since all mutt sees are the maildir folders
Offlinelineimap will create with working.

Mariano

[1] http://software.complete.org/software/wiki/offlineimap/FrequentlyAskedQuestions#Can-I-synchronize-multiple-accounts-with-OfflineIMAP

RS Wood

unread,
Jul 10, 2009, 3:24:16 PM7/10/09
to
In article <slrnh5403...@zenatode.org.uk>, Ian Gregory wrote:
> On 2009-07-06, Benedikt <bene...@googlemail.com> wrote:
>> Am 05/25/2009 11:49 PM, schrieb Ian Gregory:
>>> On 2009-05-25, Benedikt<bene...@googlemail.com> wrote:
>>>
>>>> How can I use 2 offline imap accounts in mutt?
> Are you asking about using OfflineIMAP to sync a Maildir with two IMAP
> accounts, or how to use Mutt to read two Maildirs? Sorry, I am not
> familiar with OfflineIMAP so I am probably not the best person to answer
> your question - I hope someone else here can help.
>
> Ian
>

A really easy solution is to have two, mostly identical .muttrc files,
one for each account, and then alias them in your .bashrc file. So for
example, create
.muttrc-ACCOUNT-ONE
.muttrc-ACCOUNT-TWO

And then in .bashrc, use

alias muttone="mutt -F .muttrc-ACCOUNT-ONE"
alias mutttwo="mutt -F .muttrc-ACCOUNT-TWO"

That's what I do. There may be a more elegant solution, but this one is
good enough.

--
http://www.therandymon.com

Ian Gregory

unread,
Jul 10, 2009, 4:24:25 PM7/10/09
to
On 2009-07-10, RS Wood <rsw...@therandymon.com> wrote:

> A really easy solution is to have two, mostly identical .muttrc files,
> one for each account, and then alias them in your .bashrc file. So for
> example, create
> .muttrc-ACCOUNT-ONE
> .muttrc-ACCOUNT-TWO
>
> And then in .bashrc, use
>
> alias muttone="mutt -F .muttrc-ACCOUNT-ONE"
> alias mutttwo="mutt -F .muttrc-ACCOUNT-TWO"
>
> That's what I do. There may be a more elegant solution, but this one is
> good enough.

The more elegent solution is just to put all your IMAP accounts in a
"mailboxes" command in a single .muttrc file. If you want to use
different outgoing SMTP servers depending on your From: address then you
can configure that in your MTA (I use msmtp).

However, the OP is not actually accessing IMAP accounts from within
mutt, he is using mutt to read a Maildir which is synced to one or more
IMAP accounts using a separate program called OfflineIMAP.

Rocco Rutte

unread,
Jul 11, 2009, 8:59:54 AM7/11/09
to
* Ian Gregory <f...@prdetfanaaeextna.invalid>:

> On 2009-07-10, RS Wood <rsw...@therandymon.com> wrote:
>
>> A really easy solution is to have two, mostly identical .muttrc files,
>> one for each account, and then alias them in your .bashrc file. So for
>> example, create
>> .muttrc-ACCOUNT-ONE
>> .muttrc-ACCOUNT-TWO
>>
>> And then in .bashrc, use
>>
>> alias muttone="mutt -F .muttrc-ACCOUNT-ONE"
>> alias mutttwo="mutt -F .muttrc-ACCOUNT-TWO"
>>
>> That's what I do. There may be a more elegant solution, but this one is
>> good enough.
>
> The more elegent solution is just to put all your IMAP accounts in a
> "mailboxes" command in a single .muttrc file. If you want to use
> different outgoing SMTP servers depending on your From: address then you
> can configure that in your MTA (I use msmtp).

What most people with multiple IMAP accounts do: use folder-hooks to
simulate accounts and set $smtp_url to use mutt's internal SMTP support
(if recent enough). This way, you can change anything you like within
the same mutt session (i.e. the language in the attribution, your
signature, you get the idea).

Rocco

S.D.Allen

unread,
Aug 28, 2009, 12:25:11 PM8/28/09
to

Rocco do you have any examples of how to do this ? Thanks. :)

0 new messages