multiple IMAP accounts on one server?

Matěj Cepl mcepl at cepl.eu
Sun Jan 15 19:58:19 UTC 2023


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 <matej at ceplovi.cz>"
folder=imap://localhost.localdomain \
    trash=+Trash postponed=+Drafts'
# account-hook mcepl 'set imap_user=mcepl at cepl.eu imap_pass="secret2" \
#     from="Matěj Cepl <mcepl at cepl.eu>" \
#     folder=imaps://redcrew.org trash=+Trash postponed=+Drafts'
account-hook .*redcrew.org 'set imap_user="matej at ceplovi.cz" \
    imap_pass= "secret3" \
    from="Matěj Cepl <matej at ceplovi.cz>" \
    folder=imaps://redcrew.org trash=+Trash postponed=+Drafts'
account-hook .*suse.de 'set imap_user=mcepl at Thunderbird \
    imap_pass= "secret4" \
    postponed=+INBOX/Drafts from="Matěj Cepl <mcepl at suse.cz>" \
    trash=+INBOX/Trash'

The problem is obviously mcepl at cepl.eu account.

* Is it possible to have two account hooks directed against one
  IMAP server?

* 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)?

* 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 at Thunderbird \
    imap_pass = secret4 \
    ... { any other mutt settings }
  }

  account floss { \
    imap_server = redcrew.org \
    imap_user = mcepl at 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

  <save-message>#floss/INBOX/somewhere

Anybody heard about something like this?

Best,

Matěj

-- 
https://matej.ceplovi.cz/blog/, @mcepl at floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8

The state is the great fictitious entity by which everyone seeks
to live at the expense of everyone else.
      -- Frederick Bastiat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x79205802880BC9D8.asc
Type: application/pgp-keys
Size: 7116 bytes
Desc: OpenPGP public key
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20230115/1e2c5656/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20230115/1e2c5656/attachment-0001.asc>


More information about the Mutt-users mailing list