tags_blacklist is a list
lowercase generated tag names
qualify list-id when generating tags
Rather than using header values verbatim, pull everything to lower case when generating tag names. This way when scanning tags I don't need to remember that `Important`, `important`, and `ImPortAnt` are actually all the same thing.
treat tags_blacklist like tags: read it from config with get_list() and specify it as a list in class definitions.
add missing register_filter function
use message-id instead of str(message) in logs
This patch introduces a decorator, register_filter, that is used to register a new filter class with afew: from afew.FilterRegistry import register_filter @register_filter class MySpiffyFilter(Filter): message = 'This filter does amazing things.'
use getattr() with default intead of hasattr()
Using an unqualified list-id as a tag name allows anyone sending you mail to set arbitrary tags on messages. This patche puts all list tags in a 'list/' namespace.
Using message-id in log messages makes it easier to identify individual messages.
When asking for the query attribute, use getattr('query', None) rather than hasattr('query'). This prevents errors if a 'query' attribute is available but empty or None.
MailMover: Handle messages that have multiple copies
Gmail in particular tends to put copies of a single message in multiple maildirs. notmuch groups these all into a single message (with a single Message-ID) with multiple associated files. This commit provides better support for moving mail files when multiple copies of a message exist, e.g., when a copy already exists in the destination maildir. This commit also supports copying a message to multiple destinations. A message that matches multiple queries will be copied to every destination associated with those queries, rather than just the first. Thus, it changes afew's movement behavior slightly. (This change was a side-effect of implementing support for messages that exist in multiple locations in the simplest way. Moving a message immediately from its source location without updating the notmuch db will cause an error when subsequent queries match the message but its associated file is no longer at the path notmuch thinks it is. To avoid this, we postpone deletions until all copies associated with all rules have occurred.)
Fix a crash in afew's mail mover after moving messages, if it has any more folders to check.
Fix some stuff in setup.py
fixed issue with the FolderNameFilter transforms failing on folder names with spaces
…mes with spaces python shlex is now used for splitting and the following now works: folder_transforms = Drafts:draft "Deleted Items:deleted" "Sent Items:sent" Sent:sent
added dependencies python-dev and python-setuptools
Patch courtesy of bjoernb. Closes #61.
Add docs for HeaderMatchingFilter
Fix typo in default config
tag -> tags Fixes issue #56
Entry points registry
call dbacl with "-T email" for proper tokenization