#98 Spam / Sieve Script User Control

open
nobody
None
4
2011-08-02
2011-08-02
Drew
No

I needed the ability to turn on and off a global sieve script depending on a user's option for spam sorting. I have attached the files diffed against release 2.3.3 since the trunk was too different from my live version.

The following was added to the SQL script in Dovecot for the user_query:
IF(spam=1, '/var/vmail/sieve/spam.sieve','') as sieve \

And the following was altered on the table mailbox:
alter table mailbox add column spam tinyint(1) not null default 1 after quota;

The original intent was to have the sieve script name changeable or at least selected from the database (stored per user or in a different table joined in) but I was against the clock and didn't get that join code in place.

This just places a check box on the mailbox create and modify pages enabling and disabling according to their preference. Global option to allow this is in the configuration file, and the default user option to pre-fill forms is as well.

Discussion

  • Drew
    Drew
    2011-08-02

    Unified diff of PHP changes

     
    Attachments
    • priority: 5 --> 4
     
  • as I said in #postfixadmin: at the moment I'm not going to implement additional fields, and plan to change trunk in a way that makes adding fields very easy. Therefore I'm lowering the priority a bit for now.

    Nevertheless: thanks for the patch.