[Dovecot] sieve/managesieve and spam filtering
Hello all,
I've got a test environment setup in preparation for a move from qmail/vpopmail/courier to postfix/padmin/dovecot. I have a number of questions that seem to span multiple pieces of software, and this is one of them...
Our policy with spam filtering is that a user should be able to turn it off (ie: not put tagged spam into a spam folder, but deliver to their inbox) if they want to. Currently qmailadmin and a custom squirrelmail plugin give people the option to do this by dumping a .qmail file in their directory that calls a common maildrop script that will deliver spam to the spam folder.
It looks like I can emulate this with sieve and something that can speak to Dovecot's managesieve server. Where I'm stuck is that if I want users to be able to do other custom filtering using sieve, how do I go about making sure that my common spam delivery rule does not get clobbered? This really has me a bit stumped. I see there's a global sieverc that can be included, but I need something along the lines of a per-user include that brings in the spam filtering rule that will "stick" until the user explicitly deletes it.
Any ideas?
Thanks,
Charles
Charles Sprickman NetEng/SysAdmin Bway.net - New York's Best Internet - www.bway.net spork@bway.net - 212.655.9344
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 10 Aug 2009, Charles Sprickman wrote:
a bit stumped. I see there's a global sieverc that can be included, but I need something along the lines of a per-user include that brings in the spam filtering rule that will "stick" until the user explicitly deletes it.
I install a sieve script per user, which contains the SPAM filter rules.
So every user can delete it with own hand.
Squirrelmail is to have the avelsieve plugin to talk to a manage sieve demon. So maybe you need to configure "extra" stuff in squirrelmail.
I'm using Horde, which does not manipulate Sieve scripts, but creates a fresh one from its own internal rules. So I configured Horde to have SPAM-filter rules by default and a Sieve script doing the same. If the user changes the Horde rules, my default Sieve script gets overwritten.
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSoFw2XWSIuGy1ktrAQLlwggAm17PXUks6ZEip8IX6nKEoYwWz/a6rIDz 5aK/pID+6Kqi+UdYKtSjeD+NG2ZsHw1q9Y9eBCvBolgczjdzdwT69kNQJ+z4Vk7O fOeytgFwZpnh0LCZrAiwZIC5h6Nj6Xr2CA0cEms/gHTObvmvedWJ3fhG18Fc7Di4 4teHiB3oK2NOqs3AvE+PKqOOiquvdw3uld4Fdcp6bUZCCDCqEV3tgLF7f1Brqhp0 F5bzPz/6iO+wklQ4eCwz6OK1nGp8yixLzvQBUgxazuLnFsukbHuNujdwDW7J6x33 ECIK7olkYpxbnfdwpVjj+u45NFg74CasrhXowYpP4c9ZJMmxxbv+kQ== =z0Kj -----END PGP SIGNATURE-----
On Tue, 11 Aug 2009, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 10 Aug 2009, Charles Sprickman wrote:
a bit stumped. I see there's a global sieverc that can be included, but I need something along the lines of a per-user include that brings in the spam filtering rule that will "stick" until the user explicitly deletes it.
I install a sieve script per user, which contains the SPAM filter rules.
That is certainly possible. I have not settled on whether we want to offer end-user access to sieve or not. On one hand, it's a very cool feature. On the other, most users can barely drive a webmail client as it is... For the less clueful, I want them to be able to just click a "filter spam" button. If they also choose to try and filter other email, I don't want a disconnect between the "filter spam" setup and their own rules.
One thing I did find is that it looks like I can override the "sieve_global_path" setting in my user database. For people that want spam, they get a do-nothing filter. For those that want filtering, they get a filter that drops SA-tagged spam into "Spam".
For example:
SELECT [bunch of other stuff] sieve_global_path FROM mailbox WHERE
In my query seems to work. I put the full path to a sieve rule in "sieve_global_path".
Not quite what I want, but close. From what I gather, any user rules will override that filter though. I guess I'm looking for something like a global include that the user can't override...
Thanks,
Charles
So every user can delete it with own hand.
Squirrelmail is to have the avelsieve plugin to talk to a manage sieve demon. So maybe you need to configure "extra" stuff in squirrelmail.
I'm using Horde, which does not manipulate Sieve scripts, but creates a fresh one from its own internal rules. So I configured Horde to have SPAM-filter rules by default and a Sieve script doing the same. If the user changes the Horde rules, my default Sieve script gets overwritten.
Bye,
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSoFw2XWSIuGy1ktrAQLlwggAm17PXUks6ZEip8IX6nKEoYwWz/a6rIDz 5aK/pID+6Kqi+UdYKtSjeD+NG2ZsHw1q9Y9eBCvBolgczjdzdwT69kNQJ+z4Vk7O fOeytgFwZpnh0LCZrAiwZIC5h6Nj6Xr2CA0cEms/gHTObvmvedWJ3fhG18Fc7Di4 4teHiB3oK2NOqs3AvE+PKqOOiquvdw3uld4Fdcp6bUZCCDCqEV3tgLF7f1Brqhp0 F5bzPz/6iO+wklQ4eCwz6OK1nGp8yixLzvQBUgxazuLnFsukbHuNujdwDW7J6x33 ECIK7olkYpxbnfdwpVjj+u45NFg74CasrhXowYpP4c9ZJMmxxbv+kQ== =z0Kj -----END PGP SIGNATURE-----
participants (2)
-
Charles Sprickman
-
Steffen Kaiser