Results 1 to 5 of 5

Thread: Filter changes not persistant

  1. #1
    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    8

    Default Filter changes not persistant

    Ok guys, this is driving me mad...

    I've used
    Code:
    zmprov modifyAccount user.name@domain.com zimbraMailSieveScript
    to setup a base filter for a user as per this method and doing a
    Code:
    zmprov getAccount
    after running the script it looks fine and dandy but I have two problems...

    1 - The rules don't show in the web interface under Options -> Mail Filters

    2 - When I add a new rule via Options -> Mail Filters it adds a whole load of extra filters that used to be there that I don't want any more!

    Is there any way of setting Zimbra's filters to a specific sieve without the GUI re-adding all the rules I've been trying to delete?!

    This is the rule I've been setting manually (I got it from a getAccount of an existing account with working rules) :

    Code:
    require ["fileinto", "reject", "tag", "flag"];
    
    # Autoreplies
    if anyof (header :contains "Subject" "Out of Office" )
    {
        fileinto "/Inbox/AutoReplies";
        stop;
    }

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    This works for me under 5.0.2 How about posting details of the account filters before you add that one by CLI and also the exact cli command that you are using to add the filter
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    8

    Default

    The account's filter gets reset with the following rules (with the new one on the end) every time I try to add a new one, but I can't see anywhere these rules are stored.

    Setting the rule via command line works since I can getAccount afterwards and it shows the correct rules, just doesn't show them in GUI and overwrites them when I add a new one in the GUI.

    Does the GUI store the rules anywhere? Is there a cache I need to clear?

    This is the script it's reset with (edited for my boss's privacy, but the values are all correct), and when I add a new one it'll get added to the end (like I did with test2, test3 etc)

    Code:
    zimbraMailSieveScript: require ["fileinto", "reject", "tag", "flag"];
    
    # Autoreplies
    if anyof (header :contains "Subject" "Out of Office" )
    {
        undefined "Inbox/AutoReplies";
        stop;
    }
    # mr
    if allof (header :contains "from" "-----edited-----" ,
     header :contains "to" "-----edited-----" ,
     header :contains "subject" "-----edited-----" )
    {
        fileinto "/Inbox/folder";
        stop;
    }
    # test
    if anyof (header :is "subject" "-----edited-----" )
    {
        fileinto "/Inbox/folder";
        stop;
    }
    # T2
    if allof (header :contains "from" "-----edited-----" ,
     header :contains "to" "-----edited-----" ,
     header :is "subject" "-----edited-----" )
    {
        fileinto "/Inbox/folder";
        stop;
    }
    # Problem
    if anyof (header :is "subject" "-----edited-----" )
    {
        fileinto "/Inbox/folder";
        stop;
    }
    # test2
    if anyof (header :is "subject" "test" )
    {
        fileinto "/Inbox/folder";
        stop;
    }
    # test3
    if anyof (header :is "subject" "test" )
    {
        fileinto "/Inbox/folder";
        stop;
    }
    # test4
    if anyof (header :is "subject" "test4" )
    {
        discard;
        stop;
    }
    # test5
    if anyof (header :is "subject" "test" )
    {
        fileinto "/Inbox/folder";
        stop;
    }

  4. #4
    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    8

    Default

    I might add that I'd be perfectly happy to remove all the rules so I can start again afresh, but can't seem to do that either since they're not listed in GUI and setting the string isn't persistent!

  5. #5
    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    8

    Default

    I'm still struggling with this, does anyone else have any ideas?

    Whenever I reset the string using:
    Code:
    zmprov modifyAccount user.name@domain.com zimbraMailSieveScript
    The changes are not persisted (or something else changes them back)

Similar Threads

  1. LDAP Filter issue and GAL
    By G-Money in forum Administrators
    Replies: 2
    Last Post: 06-24-2010, 01:13 PM
  2. Feature request for mail filter
    By MooktaKiNG in forum Users
    Replies: 9
    Last Post: 04-08-2007, 06:40 AM
  3. content filter attacked?
    By ahhhh in forum Administrators
    Replies: 2
    Last Post: 03-26-2007, 06:29 PM
  4. Bad Filter Stops Incoming Email
    By soxfan in forum Administrators
    Replies: 0
    Last Post: 03-08-2007, 09:02 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •