Message filtering

dan

Verified User
Joined
Jan 2, 2007
Messages
98
Location
North Wales, UK
Has anyone ever come across a requirement for DA (or something running under DA/Exim) that does something along the lines of what MS Exchange does, in regards to message filtering/rules? e.g; directing messages from a particular email address, or with particular words in the subject to an IMAP folder, without relying on a mail client like Thunderbird to do this (which obviously doesn't work when Thunderbird isn't running)?
 
What you're asking about is server side email filtering. You can configure exim to do it, but I've never studied how. A quick search a moment ago shows me you can configure exim to use procmail, and then set up procmail to do the delivery filtering.

Here's the exim documentation: http://www.exim.org/exim-html-current/doc/html/spec_html/ch29.html

Of course you'll need to study the procmail documentation as well, and install procmail on your server.

You can probably do the same thing entirely in exim by creating a system similar to the per-domain exim 'filter' as called in the domain_filter section of exim.conf; to get an idea of how to do the code, take a look at one of your server's domain level filter where 'send to spambox' is implemented.

As for the details, whether you can do it in a separate file or not (if not you'll need to protect the filter from being overwritten by DirectAdmin), etc., you're oin your own, or you can hire me (or someone else, but I may be the best person since I wrote the exim.conf file used in DirectAdmin, and also the most recent SpamBlocker version which I offer on my website) to figure it out and implement it for you.

Jeff
 
I don't know if I am being blind, but I can't find anything about "move to spambox" in my exim.conf. I am running spamblocker 4.1.
 
Has anyone ever come across a requirement for DA (or something running under DA/Exim) that does something along the lines of what MS Exchange does, in regards to message filtering/rules? e.g; directing messages from a particular email address, or with particular words in the subject to an IMAP folder, without relying on a mail client like Thunderbird to do this (which obviously doesn't work when Thunderbird isn't running)?

Sieve will make you happy, here is the How-To

http://www.directadmin.com/forum/showthread.php?t=43332
 
If you want to ban or black-list some email addresses or domains then you can use Exim Filters http://site-helper.com/email.html#filters or SpamAssassin. If you want to sort incoming emails and put them in specific folders depending on your criteria then Sieve is ready to serve to you.

I want to move email from certain senders to specific folders. The reason I need it to do it before I log in with a browser or a client is I want it sorted before my phone notifies me of mail. I made some rules in Squirrelmail and that was fine, except I have to leave the browser logged in at home, and eventually it times out and it automatically logs out. Will seive require roundcube to be logged in? I never used roundcube before, but I just checked at it is installed. I guess it comes with a DA install.
 
Last edited:
You need to login into RoundCube to manage sieve rules only. Once you set up sorting rules you can stick to your favorite email program or web-client. You need RounCube to be installed with custombuild (Directadmin) as among the other webmail clients it seems to be the only one which has a ManageSieve plugin.
 
You need to login into RoundCube to manage sieve rules only. Once you set up sorting rules you can stick to your favorite email program or web-client. You need RounCube to be installed with custombuild (Directadmin) as among the other webmail clients it seems to be the only one which has a ManageSieve plugin.

Sweet! I'll read up and then implement. Thanks!
 
You need to login into RoundCube to manage sieve rules only.
RoundCube (with the plugin mentioned, and using Dovecot to deliver email to the mailboxes instead of the code currently in the exim.conf file) is a very convenient way to create sieve filters, and since I've switched to IMAP for my mailstore, I've been using it manage the filters. However there are other solutions. One would be to manually create the rules; I haven't studied this.

Another would be to use another email client (perhaps a desktop client) to create the rules. I use kmail to manage email locally, and it allows you to create sieve filters, but only if you know how to program them, whereas RoundCube has a very simple interface.

Since the sieve filters work on the server side, no matter how you set up the filters, they'll work when email is delivered, no matter how you read your email (but if you use POP3 to download email you'll only get email left in the main inbox).

Jeff
 
Back
Top