How to add a default rule for all users

View: New views
3 Messages — Rating Filter:   Alert me  

How to add a default rule for all users

by clau_bolson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
for my new mail server:
I'm using Postfix + Dovecot + Spamassassin (with Clamav plugin) + Sieve
I have successfully set up Horde, Ingo is using vfs as driver
(vfstype=ftp) and it is working as expected, writing the scripts in each
user's home folder.

This is what I need now:
I have set up Clamav plugin to add a header "X-Spam-Virus"
Dovecot-sieve has a global script. If a user doesn't have a sieve script
in his home folder, the global script is used.

This global script is:

require ["fileinto"];

if header :contains "X-Spam-Virus" "Yes" {
    discard;
    stop;
}

if header :contains "X-Spam-Flag" "Yes" {
    fileinto "spam";
    stop;
}

Of course, when a user creates his own script, the "x-spam-virus" rule
will dissapear and viruses will be accepted.

Is there a way to create another default rule in Ingo?

Thanks
Claudia Burman
El Bolson - Patagonia Argentina
--
Ingo mailing list - Join the hunt: http://horde.org/bounties/#ingo
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: ingo-unsubscribe@...

Re: How to add a default rule for all users

by Jan Schneider :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Zitat von Claudia Burman <cburman@...>:

> Hi,
> for my new mail server:
> I'm using Postfix + Dovecot + Spamassassin (with Clamav plugin) + Sieve
> I have successfully set up Horde, Ingo is using vfs as driver  
> (vfstype=ftp) and it is working as expected, writing the scripts in  
> each user's home folder.
>
> This is what I need now:
> I have set up Clamav plugin to add a header "X-Spam-Virus"
> Dovecot-sieve has a global script. If a user doesn't have a sieve  
> script in his home folder, the global script is used.
>
> This global script is:
>
> require ["fileinto"];
>
> if header :contains "X-Spam-Virus" "Yes" {
>    discard;
>    stop;
> }
>
> if header :contains "X-Spam-Flag" "Yes" {
>    fileinto "spam";
>    stop;
> }
>
> Of course, when a user creates his own script, the "x-spam-virus"  
> rule will dissapear and viruses will be accepted.
>
> Is there a way to create another default rule in Ingo?
Yes, default rules are picked from the default preferences, just  
change the default value of the 'rules' preference.

Jan.

--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/


--
Ingo mailing list - Join the hunt: http://horde.org/bounties/#ingo
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: ingo-unsubscribe@...

attachment0 (204 bytes) Download Attachment

Re: How to add a default rule for all users

by gimili :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jan Schneider wrote:

> Zitat von Claudia Burman <cburman@...>:
>
>> Hi,
>> for my new mail server:
>> I'm using Postfix + Dovecot + Spamassassin (with Clamav plugin) + Sieve
>> I have successfully set up Horde, Ingo is using vfs as driver
>> (vfstype=ftp) and it is working as expected, writing the scripts in
>> each user's home folder.
>>
>> This is what I need now:
>> I have set up Clamav plugin to add a header "X-Spam-Virus"
>> Dovecot-sieve has a global script. If a user doesn't have a sieve
>> script in his home folder, the global script is used.
>>
>> This global script is:
>>
>> require ["fileinto"];
>>
>> if header :contains "X-Spam-Virus" "Yes" {
>>    discard;
>>    stop;
>> }
>>
>> if header :contains "X-Spam-Flag" "Yes" {
>>    fileinto "spam";
>>    stop;
>> }
>>
>> Of course, when a user creates his own script, the "x-spam-virus"
>> rule will dissapear and viruses will be accepted.
>>
>> Is there a way to create another default rule in Ingo?
>
It seems strange to me that the sieve global script works that way.  I
know the maildrop global script does not work that way.  Maildrop uses
both the global and the individual.  I do the spam filter in the global
and it works for everyone regardless of whether they have an individual
filter.

--
gimili

--
Ingo mailing list - Join the hunt: http://horde.org/bounties/#ingo
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: ingo-unsubscribe@...