Hello, I wanted to use Gnus also for reading mails. For historical reasons, my Maildirs are nested (e. g. ~/.maildir/work/INBOX/foo/bar/{cur,new,tmp}) and synced to various IMAP servers. I still wanted to keep the Maildirs local, and keep my nested structure, but nnmaildir only supports a flat hierarchy without leading dots (as mbsync would create them).
Long story short, I now have ~/.nnmaildir with a bunch of symlinks created by the following script. It could be better, but for now this does the trick. --- #!/usr/bin/env python3 import os import os.path import sys try: maildir = os.environ['MAILDIR'] except KeyError: if os.path.exists(os.path.expanduser('~/.maildir')): maildir = os.path.expanduser('~/.maildir') elif os.path.exists(os.path.expanduser('~/Maildir')): maildir = os.path.expanduser('~/Maildir') else: print('no maildir found', file = sys.stderr) sys.exit(1) maildirs = {d for d, dirs, _ in os.walk(maildir) if 'cur' in dirs} # cur shall be sufficient to make a dir a maildir nnm = os.path.expanduser('~/.nnmaildir') if not os.path.exists(nnm): os.mkdir(nnm, mode = 0o700) for d in maildirs: n = d[len(maildir) + 1:].replace('/', '.') dst = os.path.join(nnm, n) if os.path.exists(dst): continue src_rel = os.path.relpath(d, os.path.dirname(dst)) os.symlink(src_rel, dst) --- _______________________________________________ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english