posted Jan 11, 2010, 4:12 PM by Chris Franklin

Problems, Comments Click Here
X-Sorter is really just a spin off my project Q-Sorter, except well it was written to work with Xmail. 
X-Sorter, Allows users to setup rules like Outlook Express, Firebird, or squirrelmail, etc. That allow 
there mail to be sorted into a differnt IMAP folder OR Deleted. And all this though a web interface. 

Now People now are saying if my client can do this for me, why do I what to use this ? 
Well for 3 reasons. 
1. It saves the end user on time. 
2. It saves the server on bandwith. 
3. It save the server on resources. 

What a happens when you connect to a IMAP server. 
When ever a connects to a IMAP server it has to go though and see if theres any new mail, and if there is. Then the Client downloads (views in the case if web based client on that local server) the header of those messages. Then if the client has any rules that apply to it. Now in the case of outlook express it will start at the BOTTOM of your rules list and go though every rule to if theres a match. And if there is a match, then it tells the server to move that message to the specified Folder and continues to try to apply more rules to it to if it needs to be moved even more. 

My reasoning why this, well sucks. 
1. Then the Client downloads the headers. (this really sucks if you have a rule that just Deletes the spam, beacause you still had to download the Header to see if it was spam.) 
2. Then if the client has any rules ..start at the BOTTOM of your rules list .. though every rule. (There sould be no reason to go though every rule, Or for that matter start at the bottom of the list, or move it more then once) 
3. Move that message to the specified Folder (1st was sent to your inbox, now it needs to go some where else. And depending on your rules that can be alot of moving.) 

My Fixes 
Before the email even hits the inbox. Sort it. Really it's just simple. 
Heres how the hold thing works, a user OR admin (seting GLOBAL rules) goes into the web interface and sets up rules. 
Just like OE , squirrelmail, etc. the email can be sorted my From OR subject. 
Then as a email is on it's way to the inbox X-Sorter stops and Checks for any 
rules that might apply to that email. And Selects the on with the LOWSET priority 
and then trys to put that email into the folder defined OR Delete it. 
If theres any problem the email will be put into the inbox, or left in the Queue 
for Xmail to deliver. 

Php 4.1.2 or Higher 
Pear compatable database 
Xmail 1.17 

Development server it was built on : 
PHP 4.3 
Apache 2.0 
Courier-imap / Dovecot 

1-1 of 1