From 420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Sun, 12 Jul 2026 11:08:50 +0200 Subject: update --- txt/get-mailboxes.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 txt/get-mailboxes.txt (limited to 'txt/get-mailboxes.txt') diff --git a/txt/get-mailboxes.txt b/txt/get-mailboxes.txt new file mode 100755 index 0000000..b6ceff0 --- /dev/null +++ b/txt/get-mailboxes.txt @@ -0,0 +1,17 @@ +#!/bin/sh + +maildir=$1 + +# Find these specific paths so they stick at the top of the list +MAILBOXES='"+Inbox" "+Sent" "+Trash" "+Drafts" "+Junk" ' + +#Find all other paths, excluding those from above +MAILBOXES=$MAILBOXES`find "${maildir}" -type d -name cur \ + -a -not \( -ipath "*Inbox*" \ + -o -ipath "*Sent*" \ + -o -ipath "*Drafts*" \ + -o -ipath "*Trash*" \ + -o -ipath "*Junk*" \ + \) | sed -e 's/\/cur$/\"/g' -e "s#^${maildir}/# \"+#" | sort` + +echo $MAILBOXES \ No newline at end of file -- cgit v1.3.1