Lusule Sinistral | 2 Aug 14:19
Picon

problem setting up mutt for gmail imap, multiple accounts

Hi there,

I'm new to mutt (and to linux) and I want to use Mutt to access my gmail
accounts.  I am happy to receive mail from gmail and send mail through
gmail, without it going through a local mail spool thingy.

I've been using some of the guides for setting up gmail, but I'm getting
slightly confused, and it's not working too well.  Attached is
my .muttrc, and the debug log level 2.

I am using Ubuntu Hardy Heron and I installed mutt through the synaptic
package manager.

Any help appreciated!
set folder=~/Mail
set editor="vi"

# Base hook to reset account variables to known state before activating new ones
account-hook . 'unset preconnect imap_user imap_pass imap_authenticators; set ssl_starttls=ask-yes'

folder-hook 'imaps://.*imap.gmail.com' unset record

account-hook imaps://user1 <at> imap.gmail.com/ 'set imap_user=user1 <at> gmail.com imap_pass=<passwd>'
folder-hook imaps://user1 <at> imap.gmail.com/ 'set smtp_url="smtps://user1 <at> smtp.gmail.com"'

account-hook imaps://user2 <at> imap.gmail.com/ 'set imap_user=user2 <at> gmail.com imap_pass=<passwd> imap_authenticators=digest-md5'
folder-hook imaps://user2 <at> imap.gmail.com/ 'set smtp_url="smtps://user2 <at> smtp.gmail.com"'

(Continue reading)

Marco Fioretti | 2 Aug 23:36

How to get single list of mailboxes from two IMAP servers?

Greetings,

I have some mailboxes on a remote imap server, and some on one running
on my home computer (both servers are Dovecot, in case it
matters). Let's say they are:

marco <at> remote_server:Personal
marco <at> remote_server:Mailing_lists
marco <at> 127.0.0.1:Hobbies

I would like to have mutt:

- tell me when there's new mail in any of those mailboxes
- when I hit "c" and then "?" offer me a list with all and only the
  mailboxes above.

Is this possible? I have written this in .muttrc:

mailboxes   imaps://marco <at> remote_server/Personal imaps://marco <at> remote_server/Mailing_lists imap://127.0.0.1/Hobbies

but it doesn't behave how explained above. For example, if I type c ?
, it only lists the folders on the remote server

TIA,
	Marco
--

-- 
Your own civil rights and the quality of your life heavily depend on how
software is used *around* you:            http://digifreedom.net/node/84

(Continue reading)

mimosinnet | 3 Aug 02:40
Picon

Re: How to get single list of mailboxes from two IMAP servers?

El dissabte, 02 de agost del 2008 a les 23:36, Marco Fioretti va escriure:
> I have some mailboxes on a remote imap server, and some on one running
> on my home computer (both servers are Dovecot, in case it
> matters). Let's say they are:
> 
> marco <at> remote_server:Personal
> marco <at> remote_server:Mailing_lists
> marco <at> 127.0.0.1:Hobbies
> 
> I would like to have mutt:
> 
> - tell me when there's new mail in any of those mailboxes
> - when I hit "c" and then "?" offer me a list with all and only the
>   mailboxes above.
> 
> Is this possible? I have written this in .muttrc:
> 
> mailboxes   imaps://marco <at> remote_server/Personal imaps://marco <at> remote_server/Mailing_lists imap://127.0.0.1/Hobbies
> 
> but it doesn't behave how explained above. For example, if I type c ?
> , it only lists the folders on the remote server

In the message index, When I type c (change to a different mailbox) and
? I get a list of the folders in the defined imap account. When in the
folders, if I press <tab> I get the list of mailboxes.  

Nevertheless, if you want to change imap accounts, you will have to have
a look at the thread on multiple identities:

http://marc.info/?l=mutt-users&m=121744583503848&w=2
(Continue reading)

mimosinnet | 3 Aug 05:22
Picon

Re: Alternative Identities

El dimecres, 30 de juliol del 2008 a les 14:21, Kyle Wheeler va escriure:

> On Wednesday, July 30 at 08:55 PM, quoth mimosinnet <at> gmail.com:
> >This code in muttrc successfully loads the imap account definition (I 
> >have tryed with both accounts):
> >
> ># Default mailbox
> >source ~/.mutt/Comptes/joanet
> >
> >If I issue the command c (change-folder) ?, I get the desired list of 
> >the imap folders of the defined account.
> >
> >I was expecting I could source the other imap account definition, and 
> >mutt would be in the other account. If I enter mutt with one account 
> >and I source the other account:
> >:source ~/.mutt/Comptes/uab
> >
> >when issuing command c (change-folder) ?, mutt is waiting to get the 
> >list of folders or shows the folders of the account it was first 
> >sourced. It seems that sourcing the other account does not change the 
> >default imap folder.
> 
> More accurately, "sourcing the other account" does not affect/change 
> the CURRENT imap connection. Issuing <change-folder> is done (by 
> default) within the current connection.
> 
> Or, put another way, simply changing the value of $folder DOES NOT 
> cause mutt to open a new connection. NOR does issuing <change-folder>.

Thanks very much for the explanation. It clarifies very much the issue
(Continue reading)

Marco Fioretti | 3 Aug 11:21

Re: How to get single list of mailboxes from two IMAP servers?

On Sun, Aug 03, 2008 02:40:35 AM +0200, mimosinnet <at> gmail.com wrote:

> Nevertheless, if you want to change imap accounts, you will have to
> have a look at the thread on multiple identities:

but I don't want to "change imap account". I want to have **more** than
one "open", whatever that means, at the **same** time. In Kmail, for
example, I have the folders in both the accounts displayed
simultaneously in the folder tree all the time, and I can move back
and forth from any folder on remote_server to any folder on
local_server without any problem. I only have, of course, to enter the
password for each account the first time I access its server. This is
the functionality I want to replicate in mutt and from reading this:

> http://marc.info/?l=mutt-users&m=121744583503848&w=2

I understand it isn't possible in mutt, is it?

> I am also using Dovecot, and I fetch all the email from different
> accounts to my Dovecot server.

I don't want to do that. The local_folder is for backup only, I need
"live", day-to-day use folders to stay on the remote server. Yes, I
know there are tools to keep two IMAP accounts in sync, but I'd really
rather avoid that road, for several reasons, and find a mutt-only way
to get what I need, considering other clients can do it.

Thanks,
			Marco
--

-- 
(Continue reading)

Michele Martone | 3 Aug 15:48

Re: How to get single list of mailboxes from two IMAP servers?

As far as I know, mutt handles one imap or pop connection at a time.

Think about it : there is one global imap_pass variable at a time in
the muttrc.

This alone means you can't have more than one imap 'accounts' monitored
in the same mutt session. So the answer is 'no'.

But of course you can use two terminals with two mutt instances, and if
you use a decent console program (like the KDE konsole) you will be
graphically warned about incoming mail.
Or if not using X, if you have your console bell enabled, it well beep
on new emails.
You can also consider using GNU screen:

 screen
 mutt
 <enter account A in mutt>
 <press Control-a and c to open a new screen window>
 mutt
 <enter account B in mutt>
 <press Control-a and the spacebar to 'cycle' between the two windows>

On 20080803 <at> 11:21, Marco Fioretti wrote:
> On Sun, Aug 03, 2008 02:40:35 AM +0200, mimosinnet <at> gmail.com wrote:
>  ...
> but I don't want to "change imap account". I want to have **more** than
> one "open", whatever that means, at the **same** time. In Kmail, for
> ...

(Continue reading)

Rado S | 3 Aug 17:26
Picon
Picon

Re: How to get single list of mailboxes from two IMAP servers?

=- Marco Fioretti wrote on Sun  3.Aug'08 at 11:21:42 +0200 -=

> I have the folders in both the accounts displayed
> simultaneously in the folder tree all the time, and I can move back
> and forth from any folder on remote_server to any folder on
> local_server without any problem. I only have, of course, to enter the
> password for each account the first time I access its server. This is
> the functionality I want to replicate in mutt and from reading this:

It works.
RTFM about all the imap_* vars, there are 2 related to automatically
processing IMAP folders in "mailboxes" use.
Something like imap_..._subscribed.

Also see the wiki for help with imap: guide -> Imap.

--

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.

Kyle Wheeler | 3 Aug 17:41

Re: problem setting up mutt for gmail imap, multiple accounts


On Saturday, August  2 at 01:19 PM, quoth Lusule Sinistral:
> I'm new to mutt (and to linux) and I want to use Mutt to access my 
> gmail accounts.  I am happy to receive mail from gmail and send mail 
> through gmail, without it going through a local mail spool thingy.

Okay...

> I've been using some of the guides for setting up gmail, but I'm 
> getting slightly confused, and it's not working too well.  Attached 
> is my .muttrc, and the debug log level 2.

What do you mean "not working too well"? What do you expect it to do, 
and what did it do (or not do) instead?

I'm *guessing* that you aren't able to log in. From the looks of your 
log file there, it's because you didn't give the right 
username/password combination:

    Sending LOGIN command for bryony.vanspaendonck...
    5< a0001 NO [ALERT] Invalid credentials (Failure)
    Login failed.

"Invalid credentials" means "server didn't like your 
username/password". It can also mean 'using invalid SASL 
authenticator'. Why are you setting $imap_authenticators?

~Kyle
--

-- 
Those who will not reason, are bigots, those who cannot, are fools, 
(Continue reading)

Kyle Wheeler | 3 Aug 17:46

Re: How to get single list of mailboxes from two IMAP servers?


On Sunday, August  3 at 11:21 AM, quoth Marco Fioretti:
> but I don't want to "change imap account". I want to have **more** 
> than one "open", whatever that means, at the **same** time. In 
> Kmail, for example, I have the folders in both the accounts 
> displayed simultaneously in the folder tree all the time, and I can 
> move back and forth from any folder on remote_server to any folder 
> on local_server without any problem. I only have, of course, to 
> enter the password for each account the first time I access its 
> server. This is the functionality I want to replicate in mutt and 
> from reading this:
>
>> http://marc.info/?l=mutt-users&m=121744583503848&w=2
>
> I understand it isn't possible in mutt, is it?

Correct, it is not possible.

Think of mutt as an email browser, and this will make a bit more 
sense. Mutt can not show you the contents of multiple accounts at the 
same time in the same way that a web browser cannot show you the 
contents of multiple webpages at the same time.

Now, maybe this means that mutt is not suitable for your purposes.

~Kyle
--

-- 
Difference of opinion leads to enquiry, and enquiry to truth; and I am 
sure...we both value too much the freedom of opinion sanctioned by our 
Constitution, not to cherish its exercise even where in opposition to 
(Continue reading)

Kyle Wheeler | 3 Aug 17:48

Re: How to get single list of mailboxes from two IMAP servers?


On Sunday, August  3 at 02:48 PM, quoth Michele Martone:
>As far as I know, mutt handles one imap or pop connection at a time.
>
>Think about it : there is one global imap_pass variable at a time in
>the muttrc.
>
>This alone means you can't have more than one imap 'accounts' monitored
>in the same mutt session. So the answer is 'no'.

Technically incorrect - account-hooks are for switching the variable 
of imap_pass for whatever connection is being used. So multiple 
accounts may be MONITORED in the same mutt session. They just cannot 
be *browsed* in the same list.

~Kyle
--

-- 
I contend that we are both atheists. I just believe in one fewer god 
than you do. When you understand why you dismiss all the other 
possible gods, you will understand why I dismiss yours.
                                           -- Sir Stephen Henry Roberts

Gmane