-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore folders in mail source #39
Comments
Ah yeah, for the # this is all custom, and may not work for you -- this
# is how I filter certain Junk/Trash paths from my mail
FILTER_PARTS: Set[str] = {".notmuch", "Trash", "Spam", "Junk"}
def filter_mail_path(p: Path) -> bool:
pset = set(p.parts[1:])
if any(f in pset for f in FILTER_PARTS):
return False
return True
class mail:
# locally synced IMAP mailboxes using mbsync
class imap:
# path[s]/glob to the the mailboxes/IMAP files
# you could also just do something like:
# mailboxes = "~/Documents/mail/*@*"
# to match any files in that directory with '@' in them
#
# to confirm this is matching your files, can do:
# hpi query my.mail.imap.files -s
mailboxes = MAILDIR
# filter function which filters the input paths
filter_path: Optional[Callable[[Path], bool]] = filter_mail_path but since the Could exclude the trash in the export in the first place (though not sure exactly how to do that) Will do an export and try to debug to see if the path is accessible in some way, so trash can be filtered |
Hmm, trying to reproduce what you might run into, do you remember how you setup the export? I selected my inbox like this in Thunderbird: And then followed what I described here in the mail doc:
Edit: Or just right clicking and hitting That way is just my inbox and not trash/spam that are getting included. Are you doing something else, possibly because of the scheduling? |
Sorry for the late reply, I'm using the automatic scheduling feature from the addon. And thus I cannot see how to exclude certain folders. I'll try and see if your filter works ! |
Hum, it is still indexing the deleted, trash, etc folders. Though I'm using |
Filtering is only a thing for As far as I remember, the thunderbird addon exports the whole account into |
Just leaving this here incase I want to try and reproduce this later, setup daily backups and going to leave thunderbird open so it'll do a backup sometimes in the next day (could trigger manually but want to make sure I'm not doing something custom there) Edit: In accordance with the instructions I left here, I switched to |
Yeah I was already using the |
Hey @seanbreckenridge how are you doing ?
I’ve noticed that my promnesia indexing is taking longer than usual, and found out that it might be because it is indexing all my Trash folders from my different emails. Is it possible to exclude certain folder of indexing using the Thunderbird method ?
The text was updated successfully, but these errors were encountered: