Email Rules


I need a set of Email Filtering rules, for ThunderBird, written in PHP to replace the totally helpless set of rules TBird delivers.

TBird allows a “Call Script” rules option, so would need this to trigger for “all emails” to work.

TBird has an addon, through Opacus, that integrates SugarCRM with it, so know the code can be or exists, but maybe not in php. Sent an inquiry to Opacus.

Anyway current TBird rules only run in order of appearance on the current inbox only and need to run both in level or priority of execution, and in all folders/mailboxes.

Additionally the ruleset should be stored in a DB. That will allow multiple ways to display and work with the rules. Since the rules are currently only stored in the text file:

    IMAP:    "/home/user/.thunderbird/profile/Imapmail/ISP_account_id/msgFilterRules.dat"
    POP3:    "/home/user/.thunderbird/profile/Mail/Local Folders/msgFilterRules.dat"

TBird says it uses SQL-Lite, but I have never been able to get SQL-Lite to read any of TBird’s files, but I’m pretty clueless in SQL-Lite.

Anyway hope someone has some clues or source code to help me get started on this.

I am also writing a script set using PHP/BASH to sync all the rules, across all accounts and machines, into a MySQL DB now; so adding code to the db to actually run these should be fairly quick and painless.

All help appreciated!