Currently i need to create a filter for all the email users and future users.
I could not find a way on the web console to add that filter without doing one by one,
I did see this command
Code: Select all
zmmailbox addFilterRule
Thank you
Code: Select all
zmmailbox addFilterRule
Thanks for the reply this sieve would automatically add the option to all users and new users on zimbra?barrydegraaff wrote:You can use Sieve filters in case it is about incoming emails:
https://github.com/Zimbra-Community/zim ... r/Sieve.md
If you want to use filtering for outgoing emails, you can probably best use Milter.
Code: Select all
/tmp/myfilters/email.sh
Code: Select all
#Filter email based on a subject
if header :contains "Subject" [
"SPAM"
]
{
fileinto "spamfolder";
stop;
}
i was also reading that second topic and the command applies for all users?7224jobe wrote:Hi, yes, to create a filter for all users you have to use command line. Take a look here (2nd message): viewtopic.php?t=69112
Code: Select all
zmprov -l gaa` ; do zmmailbox -z -m $i afrl "BITCOIN" active all body contains "bitcoin" fileinto "Trash" ; done
Thank you again for the reply,barrydegraaff wrote:This will add the script in /tmp/myfilters to the example.com domain, and this will work for all the users in the domain, including future ones.
cat /tmp/myfilters |xargs -0 zmprov md example.com zimbraAdminSieveScriptBefore
barrydegraaff wrote:This will add the script in /tmp/myfilters to the example.com domain, and this will work for all the users in the domain, including future ones.
cat /tmp/myfilters |xargs -0 zmprov md example.com zimbraAdminSieveScriptBefore
Now let's say we have a VIP user with different rules, we apply /tmp/viprules to vip@example.com
cat /tmp/viprules |xargs -0 zmprov ma vip@example.com zimbraAdminSieveScriptBefore
Setting set directly on the account override the domain ones. Settings on the domain override the global config etc.
There is no GUI for this, so it is all command line based.
Code: Select all
zmprov mc default zimbraSieveEditHeaderEnabled FALSE