12025/06/28 03:81.10 ನಲ್ಲಿ, [email protected] ಬರೆದರು: > On Fri, Sep 26, 2025 at 12:15:42PM +1000, Philip Rhoades wrote: > > > > Can you open one by hitting "c" and then typing "=NAME/" ? > > > Ah! - that helped - I tried one of the dirs "=.00_caa" and that worked - so > > it appears that it is a display problem, when I use "c" and then "?", I use > > to see a complete list of all the subdirs - now all I see the contents of > > the Maildir itself without any of the "dot" subdirs . . > > How do you start mutt? > > Unlike many, perhaps most, other MUAs, mutt's starting and main view > is the list of emails in the starting mailbox / folder. *Not* a list > of all mailboxes. > > So when you just run "mutt" from the shell, mutt show the list of emails > in the default mailbox that was compiled into it, usually something like > /var/mail/philip. In your case it's likely that mailbox either doesn't > exist or is empty, so you get a (mostly) blank screen. As specified. > > As far as I know, it is not possible to change this default via .muttrc. > What you can do is use a different command line: > > - if you want to start with viewing a specific non-default mailbox, use > "mutt -f PATH_TO_MAILBOX". Once running, you can always use the "c" > command to switch to a different mailbox. > > - if you want to see and browse the list of configured mailboxes, use > "mutt -y" > > hth, > > -- > Ian
Exactly. I have a whole system setup around this because I have a few different
mailboxes that I only want to have to maintain in one place (that is, I
shouldn't have to update the list of mailboxes in multiple places).
I setup a bash function that gets called as `run_mutt /path/to/RC/file`:
run_mutt()
{
RC="$1"
base=$(grep "^set folder=" ${RC} | sed 's/set folder=//g' | sed 's/"//g')
mapfile -d ' ' -t MAILBOXES < <(grep ^mailboxes ${RC} | sed 's/mailboxes
//g' | sed 's/"//g' | sed 's/+//g' | tr -d '\n')
systemd-run --pty --user --wait --description="Mutt" firejail -- mutt -y -F
"${RC}";
for i in "${MAILBOXES[@]}"
do
important="${HOME}/.config/personal/important.$(basename "$i" | sed
's/+//g' | tr '[:upper:]' '[:lower:]')"
systemd-run --user --wait --description="Update Important (${i})"
--unit="update-$(basename "${important}").service" update-important.sh
"${base/#\~/$HOME}/${i}/cur/" "${important}"
done
systemd-run --user --wait --description="Update notmuch database"
--unit="notmuch-new.service" notmuch new
}
base is the base path to all of the maildirs and is set by finding the 'set
folder' directive in the RC file (e.g. 'set folder="~/.local/mail"'). MAILBOXES
is defined by finding and parsing the 'mailboxes' directive in the RC file
(e.g. 'mailboxes "+MB1" "+MB2" "+MB3" "+MB4" "+MB5"'). I have a separate system
that lets me flag important emails in Mutt and writes out their subjects etc
into files upon exit so that I get those emails in my terminal (that's what the
for loop does), but you can ignore that as well as the notmuch stuff (email
indexer) if that's not relevant. All of this means that I can set the base
folder and mailbox names once in my muttrc and this function picks out
everything. Since I only have a few mailboxes (and the list is fairly static),
it was easy enough to manually set it in my muttrc.
I believe you can use 'mailboxes = `command`' to set the mailboxes to the
output of a shell command if you want as well (so you could write a shell
script that automatically outputs the mailboxes in the required format - useful
if the list of mailboxes keeps changing).
HTH!
- Chiraag
--
ಚಿರಾಗ್ ನಟರಾಜ್
Pronouns: he/him/his
publickey - [email protected] - 0xB0C8D720.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
