3

Simplifying another question about merging multiple email accounts:

I have two maildirs. How do I get a combined listing of both - either in Mutt or NeoMutt? This means where the messages are sorted together in a single view as if the two maildirs had been merged (but without actually merging them).

Apparently this can be done with Notmuch; I'm looking for a minimal example so I can get my feet wet.

1 Answer 1

3

The solution here is the same as merge multiple email accounts in single view in mutt

One important thing. The both maildirs must be in under the same directory tree where notmuch database path is.

notmuch example: ~/.notmuch-config

…
[database]
path=/home/yourusername/.mail
…

maildirs:

~/.mail/mailbox1/{cur,new,tmp}
~/.mail/mailbox2/{cur,new,tmp}
# or even following works
~/.mail/mailbox1/{cur,new,tmp}
~/.mail/mailbox1/mailbox2/{cur,new,tmp}

Then run notmuch new to index messages in the database.

neomutt config:

set nm_default_uri  = "notmuch:///home/yourusername/.mail"

named-mailboxes \
    "Archive"      "notmuch://?query=*&type=threads" \
    "unread"       "notmuch://?query=tag:unread" \
2
  • You gave a config file and the locations of some maildirs, but I need more detail than this. For example, what command needs to be run to view the maildirs in a single view? Maybe it would help if you pretend that you are writing a Bash script that takes the location of two maildirs as arguments, and then opens them together in Neomutt. This could involve symlinking them into a temporary directory, creating a notmuch config in that directory, and so on. If you write a script that can be run in this way, then you can be sure that your readers have enough detail. Thanks. Jan 10, 2020 at 6:36
  • 1
    I added command to execute and neomutt config example. Then it's up to you, what mailboxes and queries you want. Jan 10, 2020 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .