QuestionHow can mutt be configured correctly so, no matter the number of accounts it handles, color settings can be adjusted per account along with the folder-hooks?DetailsIn a mutt multi-account setup, using account-hooks, in a file (below) which is sourced inside muttrc# Account Hooks# clean firstaccount-hook . 'unset imap_user; unset imap_pass; unset tunnel'# account oneaccount-hook domain.net set imap_user=id@domain.net imap_pass=${my_password}# account twoaccount-hook outlook.xyz.ch set imap_user=id@xyz.ch imap_pass=${my_pastwo}# account threeaccount-hook mail.domain.ch set imap_user=id@domain.ch imap_pass=${my_passthree}and the corresponding file-hooks, a file (below) which is also sourced inside .muttrc# Folders and hooks# domain.netfolder-hook 'domain.net' 'source ~/.mutt/domain.net'# xyzfolder-hook 'outlook.xyz.ch' 'source ~/.mutt/outlook.xyz.ch'# domain.chfolder-hook 'mail.domain.ch' 'source ~/.mutt/domain.ch'# source default on startupsource ~/.mutt/domain.netthe following set of entries, each set in a separate file (one file for each account), are instructions to adjust the color of mutt's status line:File 1# ~/.mutt/account.oneset hostname=mail.domain.netcolor status color144 color234..File 2# ~/.mutt/account.twoset hostname = outlook.xyz.chcolor status brightyellow magenta..File 3# .mutt/account.threeset hostname=mail.domain.chcolor status cyan brightblue..When launching mutt, the colors are set correctly (for the default account). Switching to another account, i.e., the second or the third, works also correctly in setting the requested colors. In the following screenshot, account two has been selected. After this, switching to the third or the second account, does not work. The following screenshot is of account three, after having visited, already once, account two  while, when visiting account three directly after launching mutt (and, thus, switching for the first time from the default account to another one) looks like the in the following snapshot. For the sake of completeness, the following screenshot is of account two after having visited account three. The colors kept in-memory are only the first set (from the default account) and then, the second set -- i.e. one of either the second or the third account depending on which was selected to switch to.I work with Funtoo-Linux and there is a note, in the default muttrc configuration file (see complete file copy-pasted below), which reads:# ...For example, it is# *impossible* currently in mutt to remove color settings from objects# other than the index.Question Is this note (above), the answer to the problem I describe?  Or, can this be configured correctly so, no matter the number of accounts mutt handles, the color settings can be changes as to any pre-set preference along with the folder-hooks?Idea for per-account status-line-coloring sourced from: https://pbrisbin.com/posts/two_accounts_in_mutt/Current muttrc:# Some minimal Mutt settings, Gentoo-style.  These reflect the Gentoo# predilection for maildir folders.## Please don't add settings to this file to change other user# preferences (such as colors), since those can be hard for a user to# undo if their preference doesn't match yours!  For example, it is# *impossible* currently in mutt to remove color settings from objects# other than the index.# Identityset realname = 'Nikos Alexandris'#set signature = ~/.mutt/signature    # see account-hooks# Receiving & Sending    # see account- and/or folder-hooks# tell the world what version of mutt I useset user_agent# respond using name they were sent to, if it's one of my addresses# set reverse_name=yes#-------------------------------------------------------------------------# Security#-------------------------------------------------------------------------source gpg2 --decrypt ~/.mutt/passwords.gpg | # (options: --batch --use-agent -q --no-tty)# also, see gpg file# -------------------------------------------------------------------------# Paths# -------------------------------------------------------------------------# set folder=~/.offlineimap           # see folder_hooks fileset header_cache = ~/.mutt/cache/headersset message_cachedir = ~/.mutt/cache/bodiesset certificate_file = ~/.mutt/certificates# set postponed = ~/.mutt/mail/postponed# see account- & folder-hooks# set record = ~/.mutt/mail/sent        # see account- & folder-hooksset mailcap_path = ~/.mutt/mailcap # entries for filetypesset tmpdir = ~/.mutt/tmp           # where to keep temp files    # -- conflicts, I fear, with .secret/.tmp -- see above#-------------------------------------------------------------------------# Further customisations#-------------------------------------------------------------------------# set imap_passive=noset imap_authenticators='login'set imap_keepalive=120set imap_check_subscribedignore Authentication-Results:ignore DoaminKey-Signature:ignore DKIM-Signature:#-------------------------------------------------------------------------# Configuration variables#-------------------------------------------------------------------------set abort_nosubject = yesset abort_unmodified = yesset query_command = abook --mutt-query '%s'set hidden_host                           # Hide host details.set assumed_charset = utf-8set attach_charset = utf-8set charset = utf-8# -------------------------------------------------------------------------# Aliases# -------------------------------------------------------------------------set alias_file = ~/.mutt/mutt-aliasset alias_format = %4n %t %a %rset sort_alias = aliasset reverse_alias = yessource $alias_file# -------------------------------------------------------------------------# Basic Options# -------------------------------------------------------------------------#set wait_key = no      # silence, muttset sleep_time = 0set mbox_type = Maildir # mailbox typeset timeout = 3         # idle time before scanningset mail_check = 60     # minimum time between scans#unset move             # gmail does that#set delete             # don't ask, just doset delete = ask-yes        # Ask before doing a delete.#unset confirmappend    # don't ask, just do!set noconfirmappend     # Just append, don't hassle me.set quit                # don't ask, just do!!#unset mark_old         # read/new is good enough for meset nomark_old          # Don't mark unread new msgs as old.set beep_new            # bell on new mailsset nobeepset pipe_decode         # strip headers and eval mimes when pipingset thorough_search     # strip headers and eval mimes before searching# -------------------------------------------------------------------------# Index View Options# -------------------------------------------------------------------------set date_format = %Y-%m-%d %Tset index_format = %2C | %Z [%d] %-30.30F (%-4.4c) %sset uncollapse_jump                        # don't collapse on an unread message# -------------------------------------------------------------------------# Sorting# -------------------------------------------------------------------------set smart_wrap = yesset sort = 'threads'set duplicate_threads = yesset sort_aux = 'reverse-last-date-received' # =date-received OR last-date-receivedset sort_re                                # thread based on regexset reply_regexp = ^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)* # ^(re([\[0-9\]+])*|betr):[ \t]*set help = yesset attribution = * %n <%a> [%{%Y-%m-%d %H:%M:%S %Z}]:\nset editor = 'vim + -c set textwidth=72 -c set wrap -c set nocp -c ?^$ -c set spell spelllang=en,de,fr,el 'set reply_to = yesset include = yesset forward_quote = yes# set imap_idle=yes # seems deprecated! http://www.mutt.org/doc/manual/manual-6.htmlset imap_peek = yesset imap_servernoise = no# -------------------------------------------------------------------------# Menu Options# -------------------------------------------------------------------------set status_on_top # Status bar on top.set menu_move_off = noset menu_scroll = noset mime_forward = ask-no# -------------------------------------------------------------------------# Pager View Options# -------------------------------------------------------------------------set pager_index_lines = 11  # number of index lines to showset pager_context = 6       # Retain 6 lines of previous page when scrolling.set pager_stop              # don't go to next message automaticallyset menu_scroll             # scroll in menusset tilde                   # show tildes like in vimset read_inc = 100            # Read counter ticks every 100 msgs.set write_inc = 100           # Write counter ticks every 100 msgs.# set markers # mark wrapped lines of text in the pager with a +unset markers               # no ugly plus signsset quote_regexp = ^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+alternative_order text/plain text/enriched text/html# -------------------------------------------------------------------------# Header Options# -------------------------------------------------------------------------set edit_headers = yesignore *                                # ignore all headersunignore subject: from: to: cc: date:   # show only theseunhdr_order *                           # some distros order things by defaulthdr_order subject: from: to: cc: date:  # and in this order#--------------------------------------------------------------------------# muttprint for printing#--------------------------------------------------------------------------set print = ask-yes     # Ask before printing.set print_command = muttprint#--------------------------------------------------------------------------# Automatically process html mails#--------------------------------------------------------------------------auto_view text/html#--------------------------------------------------------------------------# Greek support -- Should read Hellenic!#--------------------------------------------------------------------------# set charset=greek# set locale=el_GR# set send_charset=US-ASCII:ISO-8859-1:ISO-8859-7:UTF-8#--------------------------------------------------------------------------# Other configuration files#--------------------------------------------------------------------------source ~/.mutt/account_hookssource ~/.mutt/folder_hookssource ~/.mutt/colorssource ~/.mutt/sidebarsource ~/.mutt/statusbarsource ~/.mutt/gpgsource ~/.mutt/macrossource ~/.mutt/lists# Last, but not least, get mutt to display its version on startup.push <show-version>Currently sourced color scheme:# Screenshot http://trovao.droplinegnome.org/stuff/mutt-zenburnt.png## This is a zenburn-based mutt color scheme that is not (even by far)# complete. There's no copyright involved. Do whatever you want with it.# Just be aware that I won't be held responsible if the current color-scheme# explodes your mail client. ;)## Do notice that this color scheme requires a terminal emulator that supports# 256 color. Any modern X terminal emulator should have support for that and# you can enable it by calling mutt as TERM=xterm-256color mutt or, if you# use screen, by adding term screen-256color to your .screenrc.## This file is in the public domain.## general-doesn't-fit stuffcolor normal color188 color237#color error color115 color236color error color236 color210color markers color142 color238color tilde color108 color237# color status color144 color234 # check in folder-hooks!# index stuff#color indicator color229 color238color indicator color236 color188color tree color109 color237color index color188 color237 ~Acolor index color228 color237 ~N # Newcolor index color174 color237 ~F # Flaggedcolor index color223 color237 ~O # Oldcolor index color108 color237 ~P # From mecolor index color210 color237 ~D # Deleted# header stuffcolor hdrdefault color223 color237color header color223 color237 ^Subject# gpg stuffcolor body color188 color237 ^gpg: Good signature.*color body color115 color236 ^gpg: BAD signature.*color body color174 color237 ^gpg: Can't check signature.*color body color174 color237 ^-----BEGIN PGP SIGNED MESSAGE-----color body color174 color237 ^-----BEGIN PGP SIGNATURE-----color body color174 color237 ^-----END PGP SIGNED MESSAGE-----color body color174 color237 ^-----END PGP SIGNATURE-----color body color174 color237 ^Version: GnuPG.*color body color174 color237 ^Comment: .*# url, email and web stuffcolor body color174 color237 (finger|ftp|http|https|news|telnet)://[^ >]*color body color174 color237 <URL:[^ ]*>color body color174 color237 www\\.[-.a-z0-9]+\\.[a-z][a-z][a-z]?([-_./~a-z0-9]+)?color body color174 color237 mailto: *[^ ]+\(\\i?subject=[^ ]+\)?color body color174 color237 [-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+# misc body stuffcolor attachment color174 color237 #Add-ons to the messagecolor signature color223 color237# quote levelscolor quoted color108 color237color quoted1 color116 color237color quoted2 color247 color237color quoted3 color108 color237color quoted4 color116 color237color quoted5 color247 color237color quoted6 color108 color237color quoted7 color116 color237color quoted8 color247 color237color quoted9 color108 color237# vim: set ft=muttrc
Adjusting colors for mutt's status line in multi-account setup
colors;mutt