Re: multiple IMAP accounts on one server?
On Sun, Jan 15, 2023 at 08:58:19PM +0100, Matěj Cepl wrote: > Hi, > > I am looking for the terminal-based MUA which would be able to > work with my email needs. However, for various reasons I really > need all my emails stay on multiple IMAP accounts (no local > emails if possible). I have started with mutt as it is the > client I know best, but I am not married to it, if you know > about anything better (Alpine?, notmuch?, anything else) which > could help me, then I am all ears. Have a look at neomutt. It's based on mutt, and might or might not be different in relation to account hooks. > account-hook .*localhost 'set imap_user=matej imap_pass=secret1 \ > from="Matěj Cepl " > folder=imap://localhost.localdomain \ > trash=+Trash postponed=+Drafts' > # account-hook mcepl 'set imap_user=mc...@cepl.eu imap_pass="secret2" \ > # from="Matěj Cepl " \ > # folder=imaps://redcrew.org trash=+Trash postponed=+Drafts' > account-hook .*redcrew.org 'set imap_user="ma...@ceplovi.cz" \ > imap_pass= "secret3" \ > from="Matěj Cepl " \ > folder=imaps://redcrew.org trash=+Trash postponed=+Drafts' > account-hook .*suse.de 'set imap_user=mcepl@Thunderbird \ > imap_pass= "secret4" \ > postponed=+INBOX/Drafts from="Matěj Cepl " \ > trash=+INBOX/Trash' > > The problem is obviously mc...@cepl.eu account. > > * Is it possible to have two account hooks directed against one > IMAP server? Kind of. I found this: [mutt] Multiple email accounts using hooks https://nixtricks.wordpress.com/2010/05/20/mutt-multiple-email-accounts-using-hooks/ It has an initial account-hook matching . that unsets things, followed by other account-hooks that sets them depending on the account. So, multiple account-hook directives can match the same account. It just depends on the regular expressions used. But that might not be useful to you. I'm not sure why you want different account-hooks for the same account. If you want two different sets of parameters for the same account (does that even make sense?), then you might need to put them in different rc files, and perhaps create key bindings to load the one you want when you want to change. > * What EXACTLY are possible values of the first parameter of > account-hook. Does it have to be domain name of the server, or > could it be some random string (as shown here in the commented > out account-hook)? Good question. It's not clear from just the account-hook entry in muttrc(5). From the webpage mentioned above, it looks like the regexp needs to match the imap URI (e.g., 'imaps://us...@imap.gmail.com/'). > * Is there some patch somewhere, which would support some more > grown-up version of the accounts settings? I would like to have > something like > > account work { \ > imap_server = imap.suse.de \ > imap_user = mcepl@Thunderbird \ > imap_pass = secret4 \ > ... { any other mutt settings } > } > > account floss { \ > imap_server = redcrew.org \ > imap_user = mc...@cepl.eu \ > imap_pass = secret2 \ > ... { any other mutt settings } > } > > and then I would run > > $ mutt -C work > > (C as aCcount) > > and when inside of mutt I could refer to the other account with > something like > > #floss/INBOX/somewhere > > Anybody heard about something like this? No, but the same thing can be achieved with alternate muttrc files and the -F option. When you run "mutt -F work" or "mutt -F floss", the work and floss rc files can contain their specific imap settings, and then source a common rc file with everything else. For saving to the other account, macros would help. If you really like your config syntax above, you could probably write a little tool that "compiled" it into muttrc syntax. > Best, > Matěj cheers, raf
Re: multiple IMAP accounts on one server?
* Matěj Cepl [01-15-23 15:00]: > Hi, > > I am looking for the terminal-based MUA which would be able to > work with my email needs. However, for various reasons I really > need all my emails stay on multiple IMAP accounts (no local > emails if possible). I have started with mutt as it is the > client I know best, but I am not married to it, if you know > about anything better (Alpine?, notmuch?, anything else) which > could help me, then I am all ears. > > account-hook .*localhost 'set imap_user=matej imap_pass=secret1 \ > from="Matěj Cepl " > folder=imap://localhost.localdomain \ > trash=+Trash postponed=+Drafts' > # account-hook mcepl 'set imap_user=mc...@cepl.eu imap_pass="secret2" \ > # from="Matěj Cepl " \ > # folder=imaps://redcrew.org trash=+Trash postponed=+Drafts' > account-hook .*redcrew.org 'set imap_user="ma...@ceplovi.cz" \ > imap_pass= "secret3" \ > from="Matěj Cepl " \ > folder=imaps://redcrew.org trash=+Trash postponed=+Drafts' > account-hook .*suse.de 'set imap_user=mcepl@Thunderbird \ > imap_pass= "secret4" \ > postponed=+INBOX/Drafts from="Matěj Cepl " \ > trash=+INBOX/Trash' > > The problem is obviously mc...@cepl.eu account. > > * Is it possible to have two account hooks directed against one > IMAP server? certainly, I have two IMAP accounts regestered with googlemail but with different names and I use mutt for many years. but I download my mail to my local server for access. [...] [-- Error: unable to create PGP subprocess! --] :: waste -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
Re: multiple IMAP accounts
On Mon, May 09, 2011 at 08:55:21AM +0200, David Froger wrote: [...] When I run mutt, mutt ask me the password for zimbra.HOST2, then connects to zimbra.HOST2 (I can read the mails) but I don't know how to access my Gmail account. use `mailboxes` command so you can switch between in browser. mailboxes imaps://imap.gmail.com/ mailboxes imaps://zimbra.HOST2/ m. -- C'è un'ape che se posa su un bottone di rosa: lo succhia e se ne va... Tutto sommato, la felicità è una piccola cosa. -- Trilussa, Felicità
Re: multiple IMAP accounts
It's working, thanks a lot! with: account-hook imaps://imap.gmail.com:993 (...) folder-hook imaps://imap.gmail.com:993 (...) this works: mailboxes imaps://imap.gmail.com:993 but this does not work (mutt ask my username/passwd, but can't connect): mailboxes imaps://imap.gmail.com/ I think it was my problem in previous tests. 2011/5/9 Marco Giusti marco.giu...@gmail.com: On Mon, May 09, 2011 at 08:55:21AM +0200, David Froger wrote: [...] When I run mutt, mutt ask me the password for zimbra.HOST2, then connects to zimbra.HOST2 (I can read the mails) but I don't know how to access my Gmail account. use `mailboxes` command so you can switch between in browser. mailboxes imaps://imap.gmail.com/ mailboxes imaps://zimbra.HOST2/ m. -- C'è un'ape che se posa su un bottone di rosa: lo succhia e se ne va... Tutto sommato, la felicità è una piccola cosa. -- Trilussa, Felicità
Re: multiple IMAP accounts
On Mon, May 09, 2011 at 11:37:41AM +0200, David Froger wrote: It's working, thanks a lot! with: account-hook imaps://imap.gmail.com:993 (...) folder-hook imaps://imap.gmail.com:993 (...) this works: mailboxes imaps://imap.gmail.com:993 but this does not work (mutt ask my username/passwd, but can't connect): mailboxes imaps://imap.gmail.com/ I think it was my problem in previous tests. I don't know mutt internals and this is just a guess but I think that the problem is the explicit imap port in the _account-hook_ and the final slash in the _mailboxes_ command. These are the relative lines i had: account-hook imaps://imap\.gmail\.com/ 'set imap_user=marco.giu...@gmail.com' account-hook imaps://imap\.gmail\.com/ 'set imap_pass=cucu' mailboxes imaps://imap.gmail.com/ m. 2011/5/9 Marco Giusti marco.giu...@gmail.com: On Mon, May 09, 2011 at 08:55:21AM +0200, David Froger wrote: [...] When I run mutt, mutt ask me the password for zimbra.HOST2, then connects to zimbra.HOST2 (I can read the mails) but I don't know how to access my Gmail account. use `mailboxes` command so you can switch between in browser. mailboxes imaps://imap.gmail.com/ mailboxes imaps://zimbra.HOST2/ -- Nessuno come me si è creato una società reale evocando delle ombre; al punto che la vita dei miei ricordi assorbe il sentimento della mia vita reale. -- René de Chateaubriand, Mémoires d'Outre-tombe
Re: Multiple IMAP accounts and change-dir autocompletion
=- Max Arnold wrote on Wed 8.Sep'10 at 1:35:21 +0700 -= mutt does not reread remote directory list when I switch between mailboxes. For example: - I open personal mailbox, press change-dir TAB and mutt shows remote folders for that account - then I swith to second account, again do change-dir TAB, but still see remote folders from first account So basically mutt caches first opened remote folder list and displays it every time. Any ideas on how to fix this? This has nothing to do with 2 IMAP accounts, but with how change-dir and TAB interact. See Wiki / Guide / Actions for details. -- © 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.
Re: Multiple IMAP accounts
** Peng shallp...@gmail.com [2010-03-20 22:31]: On 21:18 Sat 20 Mar , Paul Tansom wrote: ** Brendan Cully bren...@kublai.com [2010-03-20 20:53]: Brilliant, thanks, that's exactly what I was looking for. It's my own fault for having so many mail accounts that it now takes a while to connect to them all!! Actually you may find this frustrating sometimes if your internet connection is not very good ** end quote [Peng] That's not too much of a problem here, since the connection is to a Dovecot IMAP server on my local LAN mostly, and I SSH in to check mail remotely. That said I am connecting to 10 accounts for various reasons at the moment! -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple IMAP accounts
On Sat, Mar 20, 2010 at 06:01:19PM +, Paul Tansom wrote: I've been using Mutt for a good few years now, but only started using it over IMAP a year or so ago and now I've started using multiple IMAP accounts with it. Setting this up was straight forward enough, and I can cycle through mailboxes with new mail in quite happily, but only if I have already checked mail once. What I'm trying to do, and haven't yet worked out how, is connect to all the IMAP mail accounts when I first start Mutt, so Mutt knows which ones have new mail in without having to manually change into each one first. Can anyone point me to some good references for this, I've not managed to spot what I'm looking for with Google or on the Mutt Wiki so far. Another thing I'll be looking at is a means to save me typing in the full details of each mail account in order to switch between them. I'm particularly keen on this since they are all on the same server and each account name is the email address and things get quite long winded even with tab completion! I'm thinking that something along the lines of a macro or a bind line in my muttrc file should do the trick here, but since I'm typing if anyone has a pointer it may save me some time :) -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU The best solution I know of, is to use OfflineIMAP. It can sync multiple IMAP accounts to Maildirs. It works great for me. Google for a tutorial :) -- Jan
Re: Multiple IMAP accounts
On Saturday, 20 March 2010 at 18:01, Paul Tansom wrote: I've been using Mutt for a good few years now, but only started using it over IMAP a year or so ago and now I've started using multiple IMAP accounts with it. Setting this up was straight forward enough, and I can cycle through mailboxes with new mail in quite happily, but only if I have already checked mail once. What I'm trying to do, and haven't yet worked out how, is connect to all the IMAP mail accounts when I first start Mutt, so Mutt knows which ones have new mail in without having to manually change into each one first. Can anyone point me to some good references for this, I've not managed to spot what I'm looking for with Google or on the Mutt Wiki so far. unset $imap_passive to automatically connect to any mailbox you've added to the mailboxes list with the 'mailboxes' command. Another thing I'll be looking at is a means to save me typing in the full details of each mail account in order to switch between them. I'm particularly keen on this since they are all on the same server and each account name is the email address and things get quite long winded even with tab completion! I'm thinking that something along the lines of a macro or a bind line in my muttrc file should do the trick here, but since I'm typing if anyone has a pointer it may save me some time :) yes, binding a macro should help here. e.g., macro index I 'change-folderimap://f...@bar/INBOX'
Re: Multiple IMAP accounts
** Brendan Cully bren...@kublai.com [2010-03-20 20:53]: On Saturday, 20 March 2010 at 18:01, Paul Tansom wrote: I've been using Mutt for a good few years now, but only started using it over IMAP a year or so ago and now I've started using multiple IMAP accounts with it. Setting this up was straight forward enough, and I can cycle through mailboxes with new mail in quite happily, but only if I have already checked mail once. What I'm trying to do, and haven't yet worked out how, is connect to all the IMAP mail accounts when I first start Mutt, so Mutt knows which ones have new mail in without having to manually change into each one first. Can anyone point me to some good references for this, I've not managed to spot what I'm looking for with Google or on the Mutt Wiki so far. unset $imap_passive to automatically connect to any mailbox you've added to the mailboxes list with the 'mailboxes' command. Brilliant, thanks, that's exactly what I was looking for. It's my own fault for having so many mail accounts that it now takes a while to connect to them all!! There's so many things you can do with Mutt that in spite of having started using it some time in 2000, there's still plenty to discover :) Another thing I'll be looking at is a means to save me typing in the full details of each mail account in order to switch between them. I'm particularly keen on this since they are all on the same server and each account name is the email address and things get quite long winded even with tab completion! I'm thinking that something along the lines of a macro or a bind line in my muttrc file should do the trick here, but since I'm typing if anyone has a pointer it may save me some time :) yes, binding a macro should help here. e.g., macro index I 'change-folderimap://f...@bar/INBOX' I shall have to have a play and see what I can come up with to save some typing. ** end quote [Brendan Cully] -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple IMAP accounts
** Jan Kadijk flappie1...@gmail.com [2010-03-20 19:33]: On Sat, Mar 20, 2010 at 06:01:19PM +, Paul Tansom wrote: I've been using Mutt for a good few years now, but only started using it over IMAP a year or so ago and now I've started using multiple IMAP accounts with it. Setting this up was straight forward enough, and I can cycle through mailboxes with new mail in quite happily, but only if I have already checked mail once. What I'm trying to do, and haven't yet worked out how, is connect to all the IMAP mail accounts when I first start Mutt, so Mutt knows which ones have new mail in without having to manually change into each one first. Can anyone point me to some good references for this, I've not managed to spot what I'm looking for with Google or on the Mutt Wiki so far. snip The best solution I know of, is to use OfflineIMAP. It can sync multiple IMAP accounts to Maildirs. It works great for me. Google for a tutorial :) ** end quote [Jan Kadijk] I've looked at that for backup, but given the number of different machines I connect from it could cause a few problems for my setup, particularly with disk space since between the accounts I have in excess of 6G of mail folders (mostly archives) that I connect to. -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple IMAP accounts
On 21:18 Sat 20 Mar , Paul Tansom wrote: ** Brendan Cully bren...@kublai.com [2010-03-20 20:53]: Brilliant, thanks, that's exactly what I was looking for. It's my own fault for having so many mail accounts that it now takes a while to connect to them all!! Actually you may find this frustrating sometimes if your internet connection is not very good Peng
Re: Multiple IMAP accounts
Hello Florian, On Sunday, January 27, 2008 at 12:41:52 +0100, Florian Unglaub wrote: I set up accounthooks for each account to define spoolfiles, mbox, records etc. You misuse account-hooks; Setup folder-hooks instead. checks on new mail in account B won't work until I manually open one mailbox in account B. unset imap_passive Bye!Alain. -- Everything about locales on Sven Mascheck's excellent site at new location URL:http://www.in-ulm.de/~mascheck/locale/. The little tester utility is at URL:http://www.in-ulm.de/~mascheck/locale/checklocale.c.
Re: Multiple IMAP accounts
On Sun 27.Jan'08 at 12:41:52 +0100, Florian Unglaub wrote: Is there any better way to have multiple accounts working in mutt? Yes, there is! Unfortunately, mutt doesn't handle imap as well as it handles mbox and maildir. Therefore, I recommend using OfflineIMAP with mutt. Raffi
Re: multiple IMAP accounts, sidebar
On Fri, Apr 27, 2007 at 05:25:41AM -0500, Brian S. Lewis wrote: I have several IMAP accounts on the same server, imap://localhost:14300 (SSH tunneled). I want to be able to see all the new mail in one spot, so I use the sidebar patch. Why multiple accounts on the same server? Hmmm... That's probably not a useful question. Do you have (at least some) control over the server? If so, then the best thing to do is alias the different e-mail addresses all to one user on the server, and then use procmail to filter mail to different addresses into different folders. That's what I do. I have multiple domains on the same mail server, and numerous accounts in each domain, and they are all just aliases to the same user. Procmail filters them into various folders, either based on who they were sent by, or which of my accounts they were sent to. You can then use folder hooks to make sure you reply with the right address... -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail. Sorry for the inconvenience. Thank the spammers. pgpNG08YB2GSi.pgp Description: PGP signature
Re: Multiple IMAP accounts?
On Sat, Mar 25, 2000 at 06:14:43PM -0600, Ben Beuchler muttered: - Has anyone come up with a way to access multiple IMAP accounts on - different servers from mutt? Or even a way to configure a macro that will - switch me from one to the other? - - Or am I stuck setting up two seperate .muttrc files and restarting mutt to - switch? Fetchmail. -- -- C^2 No windows were crashed in the making of this email. Looking for fine software and/or web pages? http://w3.trib.com/~ccurley
Re: Multiple IMAP accounts?
On Sat, Mar 25, 2000 at 06:14:43PM -0600, Ben Beuchler wrote: Has anyone come up with a way to access multiple IMAP accounts on different servers from mutt? Or even a way to configure a macro that will switch me from one to the other? Been there, done that, forgot the documentation :-] mailbox {[EMAIL PROTECTED]} Works even with multiple accounts on the same server. -- Tommi Komulainen [EMAIL PROTECTED]