Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: IMAP Foldering Problems

  1. #11
    manthrax3 is offline Active Member
    Join Date
    Nov 2005
    Posts
    42
    Rep Power
    9

    Default

    Quote Originally Posted by KevinH
    Our filters are server side. If you create them in the UI they actually run on the server. Beware there are a few bugs in the filter UI at the moment so some filter changes may not 'stick'.
    I understand that they are server side. What I'm trying to do is get around the UI bugs and input my filters manually. Is there a way to do this? You saw the excerpt from the directory: it didn't seem very useful.

    So my question is: how are the sieve filters actually stored? Are they encrypted in the directory or is that string of text just a link to another storage location?

    Thanks,
    bp

  2. #12
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    zimbraMailSieveScript should hold the filter itself. Are you sure your looking at the value and not some id of that LDAP attr?
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #13
    tim brennan is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    93
    Rep Power
    9

    Default perl script for setting filters

    If you want to edit your filter rules w/o directly modifying LDAP, you can use the saveRules.pl script as a base.

    I don't know if the script made it into the Birdseye release, but it should be available on the public CVS in ZimbraServer/src/perl/soap

    docs/MailFiltering.txt has info on the filtering soap APIs, but might find it much easier to just start with the existing script.

    yes, we all know this is lame -- we will be fixing the UI very soon...honest.

  4. #14
    manthrax3 is offline Active Member
    Join Date
    Nov 2005
    Posts
    42
    Rep Power
    9

    Exclamation

    Quote Originally Posted by tim brennan
    If you want to edit your filter rules w/o directly modifying LDAP, you can use the saveRules.pl script as a base.

    I don't know if the script made it into the Birdseye release, but it should be available on the public CVS in ZimbraServer/src/perl/soap

    docs/MailFiltering.txt has info on the filtering soap APIs, but might find it much easier to just start with the existing script.

    yes, we all know this is lame -- we will be fixing the UI very soon...honest.
    OK. I got this file out of CVS, and I get the following error:

    syntax error at line 1, column 0, byte 0 at /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm line 187

    I changed the SOAP server and the username and password as follows in the perl script:

    ################################################## ####################
    #
    # Set these here right now in lieu of command-line args
    #
    ################################################## ####################
    my $URL = 'https://myhost.com:7070/service/soap';
    my $USER = 'user@myhost.com';
    my $PASSWORD = "pass";
    ################################################## ####################

    Clues?

    The perl module in question seems to be identical to that included with Zimbra:

    [root@secure zimbra]# ls -l ./zimbramon/lib/i386-linux-thread-multi/XML/Parser.pm
    -r--r--r-- 1 zimbra zimbra 27103 Aug 18 2003 ./zimbramon/lib/i386-linux-thread-multi/XML/Parser.pm
    [root@secure zimbra]# ls -l /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm
    -rw-r--r-- 1 root root 27103 Aug 18 2003 /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm

  5. #15
    tim brennan is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    93
    Rep Power
    9

    Default oops, wrong port

    the port number should probably be 80, not 7070 -- 7070 is the default port we install on for dev machines (like mine). Sorry.

    If that doesn't fix it, make a quick hack to your Parser.pm -- around line 190 inside of sub parse():

    my $result;
    eval {
    $result = $expat->parse($arg);
    };
    my $err = $@;
    if ($err) {
    print $arg."\n"; # ADD THIS LINE!!!!!
    $expat->release;
    die $err;
    }


    That should give you more debugging output if things break. Unelegant, but functional.

  6. #16
    manthrax3 is offline Active Member
    Join Date
    Nov 2005
    Posts
    42
    Rep Power
    9

    Thumbs up My Bad

    The soap server doesn't use the 7070 port.

    Now the program runs, but I'm not entirely sure how to actually add a rule. I found this section in then script:

    # <SaveRulesRequest>
    # <rules>
    # <r name="test">
    # <g op="anyof">
    # <c name="address" mod=":all" op=":contains" k0="From" k1="foo@bar.com"/>
    # </g>
    # <action name="tag">
    # <arg>fromme</arg>
    # </action>
    # </r>
    # </rules>
    # </SaveRulesRequest>



    Do I basically edit this xml and run the script?

    Thanks,
    bp

  7. #17
    tim brennan is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    93
    Rep Power
    9

    Default Right

    Right, that's why I said you could use it as "a base"

    This is probably obvious, but you have to modify the perl code which is actually spitting out the XML, not just the comments. The code like:

    Code:
        
            $d->start('r', undef, { 'name' => "Bugmail", 'active' => "1" } ); 
            {
                $d->start('g', undef, { 'op' => "anyof" });
                {
                    $d->add('c', undef, { 'name' => "header",
                                          'op' => ":contains",
                                          'k0' => "from",
                                          'k1' => " bugzilla-daemon\@depot.liquidsys.com" });
                } $d->end(); # 'g
    
                $d->start('action', undef, { 'name' => "tag"} ); {
                    $d->add('arg', undef, undef, "Bugmail");
                } $d->end(); #action
                
            } $d->end(); # 'r
    If you look at it for a few minutes, it should make sense how to edit this to make your own filter rules.

  8. #18
    manthrax3 is offline Active Member
    Join Date
    Nov 2005
    Posts
    42
    Rep Power
    9

    Thumbs up

    Quote Originally Posted by tim brennan
    Right, that's why I said you could use it as "a base"

    This is probably obvious, but you have to modify the perl code which is actually spitting out the XML, not just the comments. The code like:

    Code:
        
            $d->start('r', undef, { 'name' => "Bugmail", 'active' => "1" } ); 
            {
                $d->start('g', undef, { 'op' => "anyof" });
                {
                    $d->add('c', undef, { 'name' => "header",
                                          'op' => ":contains",
                                          'k0' => "from",
                                          'k1' => " bugzilla-daemon\@depot.liquidsys.com" });
                } $d->end(); # 'g
    
                $d->start('action', undef, { 'name' => "tag"} ); {
                    $d->add('arg', undef, undef, "Bugmail");
                } $d->end(); #action
                
            } $d->end(); # 'r
    If you look at it for a few minutes, it should make sense how to edit this to make your own filter rules.
    Tim-
    I figured it out. Thanks a bunch.

    b

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 37
    Last Post: 12-28-2010, 06:02 PM
  2. IMAP TLS Problems after upgrade to 4.5.3
    By shanson in forum Administrators
    Replies: 4
    Last Post: 03-22-2007, 08:05 AM
  3. Still problems with snet mails in imap accounts
    By chh in forum Zimbra Connector for Outlook
    Replies: 3
    Last Post: 01-08-2007, 10:26 AM
  4. Error on IMAP - Tomcat crashes!
    By rodrigoccurvo in forum Administrators
    Replies: 5
    Last Post: 11-30-2005, 07:14 PM
  5. Thunderbird large IMAP folder problems
    By adobrin in forum Administrators
    Replies: 7
    Last Post: 10-07-2005, 06:15 AM

Posting Permissions

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