Results 1 to 9 of 9

Thread: Zimbra sql schema and mail store?

  1. #1
    mberardi is offline Junior Member
    Join Date
    Feb 2006
    Posts
    5
    Rep Power
    9

    Default Zimbra sql schema and mail store?

    I want to write a script to automatically train spam assassin. I plan on using read messages in the inbox as ham and the contents of the junk folder as spam.

    I've figured out how to get user/folder read/unread status out of mysql I think:

    zimbra.mailbox.id corresponds to mailboxx db and zimbra/store/0/x/msg
    and mailboxx.mail_item.folder_id corresponds to the imap folders
    and unread is boolean

    what I'm missing is how to infer the directory under zimbra/store/ and the directory under zimbra/store/x/x/msg/

  2. #2
    marcmac is offline Expert Member
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    13

    Default auto training

    Wouldn't it be easier to start with the zmtrainsa script, and use fetchmail to only grab read messages from the folder? Or, move all read messages to a secondary folder and grab them from that?

    Much more straightforward than grabbing the data from sql.

  3. #3
    mberardi is offline Junior Member
    Join Date
    Feb 2006
    Posts
    5
    Rep Power
    9

    Default

    needing the password for fetchmail is a limitation I can't work around.

    I don't think this is particullarly difficult, all I need to know is where the 0,1... comes from after store and msg.

    unless there is a way to grant fetchmail imap access without passwords?

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

    Default

    Are you trying to use fetchmail for each user's account? Why not just use the built in support of Junk and Not Junk buttons that copies the messages to special SPAM and HAM system accounts.

    Problem with zmtrainsa
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  5. #5
    mberardi is offline Junior Member
    Join Date
    Feb 2006
    Posts
    5
    Rep Power
    9

    Default

    that sounds good, I didn't realise that existed, however, since the "not junk" button is only in the spam folder, and practically nothing is being marked spam now, it will take a long time to get the necessary ham.

    does that get triggered when a user just moves their spam to the junk folder? I have had little luck convincing anyone to use the web interface.

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

    Default

    Yes those copies are trigger on the web UI only.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  7. #7
    mberardi is offline Junior Member
    Join Date
    Feb 2006
    Posts
    5
    Rep Power
    9

    Default

    anyway, I wrote my script, it is 50 lines, it messily finds those directories I couldn't figure out how to pull from the database by checking if its zero and incrementing from there. then feeds the messages to sa-learn.

  8. #8
    bburtin is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    78
    Rep Power
    9

    Default

    Here's a snippet of Perl that calculates the mailbox group directory, based on the mailbox id.
    Code:
    sub getMailboxGroupDir($) {
        # Assume that the volume bits settings are hardcoded for now
        my ($mailboxId) = @_;
        my $groupDir = $mailboxId >> 12;
        $groupDir &= 0xFF;
        return $groupDir;
    }

  9. #9
    mberardi is offline Junior Member
    Join Date
    Feb 2006
    Posts
    5
    Rep Power
    9

    Default

    looks good, thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom LDAP Server
    By KermitTheFragger in forum Developers
    Replies: 22
    Last Post: 12-30-2007, 02:48 PM
  2. ZCS 4 Webinar -- 10/5/06
    By GregA in forum Webinars
    Replies: 21
    Last Post: 01-03-2007, 03:33 AM
  3. Upgrading from 3.1.4_GA_518 to 4.0.3_GA_406
    By a2mc in forum Installation
    Replies: 6
    Last Post: 11-13-2006, 12:52 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
  •