Home Forums OS X Server and Client Discussion Mail Is Bayesian filtering turned on?

Viewing 15 posts - 16 through 30 (of 41 total)
  • Author
    Posts
  • #363715
    kevinh
    Participant

    Our system was a clean install of 10.4.2. It looks like the files are being written to /var/root/.spamassassin . I’ve backed up /var/amavis/.spamassassin symlinked to the one in var root and changed the permissionis on the one in /var/root but I still don’t be seeming to get any hot bayesian action.

    Kevin

    #363745
    thinbits
    Participant

    [QUOTE BY= pblolo] Strange, I checked my server, I have only the good .spamassassin folder, which explains why it works fine here also.

    Did you install in a special way ?

    Here : 10.4.2 server, clean install.[/QUOTE]

    No. I popped in the DVD, erased the drive, installed, and applied all the updates. Nothing unusual. It’s odd that it works right for some people and not for others.

    #363751
    kevinh
    Participant

    Well I figured out my problem. I was manually calling sa-learn as root as I don’t have the auto learn accounts set up (and there’s no cron job or launchd plist for it anyway). So I su’ed to clamav and it created the /var/clamav directory. I made a .spamassassin directory and copied the files from /var/root/.spamassassin and changed the owner to clamav. Then I followed your directions and bingo, bayesian goodness.

    I suspect the gentleman who was having it still not work may not have taught it the required 200 messages?

    Thanks,

    Kevin

    #363880
    Anonymous
    Guest

    any word on 10.4.3?

    #363888
    Jeff
    Participant

    trying to get a handle on this.

    I have been teaching ( or so I thought ) spamassassin for about a month yet still getting some spam.
    I’ve been running learn_junk_mail manually from root whenever i get messages that don’t get tagged. i have been delivering these messages to the junkmail user.

    local.cf has
    # Bayesian Auto Learn
    auto_learn 1
    # Use Bayesian Filtering
    use_bayes 1

    i do not have a .spamassassin in /var/root

    /var/clamav/.spamassassin root# ls
    bayes_seen bayes_toks

    /var/amavis/.spamassassin root# ls
    auto-whitelist bayes_journal
    auto-whitelist.lock bayes_seen
    auto-whitelist.lock.mail2.beth.k12.pa.us.18894 bayes_toks

    both of these locations show todays date. both have user clamav:clamav

    which one is the correct one?
    Is there one that the system is updating and one that the manual learn is updating?

    whcih one should i be replacing with a sym link ? or do i even have to?

    #363889
    Jeff
    Participant

    okay replying to my own post.

    /var/clamav — is updated by the manual learn_junk_mail
    /var/amavis — is updated by the system constantly. i can see the time changing every time I ls -la.

    it appears that there is more information in /var/amavis, how can i get the manual info from /var/clamav into /var/amavis?

    #363893
    thinbits
    Participant

    I had the same problem. I just deleted the /var/amavis/.spamassassin dir and symlinked it to /var/clamav/.spamassassin and took the loss. I don’t seem to have suffered for it.

    If you still have all the emails you learned from, I guess you could go the other way with the symlink and learn into the amavid databases.

    I don’t know if there is a way to dump and load stuff across two databases.

    #363984
    macmanjc
    Participant

    Thinbits (et al.),

    First, being totally new to running mail services on OS X Server (and not being very comfortable with UNIX in general) I am a little confused by this thread. Can someone give us newbies a simple step-by-step breakdown of what files are supposed to be where? All of your testing and you patience is greatly appreciated!

    Second, does anyone know if the supposed automatic daily sa-learn –spam and –ham actually works? According to the Mail Service manual a cron script runs at 1am and checks junkmail and notjunkmail accounts, but I don’t see anything like that listed in /etc/daily. And since I don’t know what log file(s) to check to see what SA is doing, I am sort of in the dark.

    Any help would be greatly appreciated!!!

    -John

    #363985
    maccanada
    Participant

    1. You need to type the following in the Terminal:
    sudo ln -s /var/clamav/.spamassassin /var/amavis/.spamassassin
    This will create a link from the folder that SpamAssassin looks to for Bayesian data (amavis) to the folder that has the Bayesian data written to it during the learn_junk_mail process (clamav).

    2. Up until 10.4.2 the daily learning jobs did not run. 10.4.3 fixes that; my server has been running the jobs at 1:30 am every day since the update.

    #363994
    macmanjc
    Participant

    [QUOTE BY= maccanada] 2. Up until 10.4.2 the daily learning jobs did not run. 10.4.3 fixes that; my server has been running the jobs at 1:30 am every day since the update.[/QUOTE]

    One follow-up question: in which log are you seeing the daily entry?

    Thanks so much for the info!

    -John

    #363996
    maccanada
    Participant

    Hmmmm, just double-checked and realised that my log entries were from my launchd job to run it.

    Let me check on a clean server…

    #364574
    jgubby
    Participant

    [QUOTE BY= Aderium]P.S. talking about bugs anybody able to filter the logsi in serveradmin mail portion ?
    [/QUOTE]

    Only very occasionally!

    James

    #364575
    jgubby
    Participant

    Listing my two 10.4.3 directories I get:

    total 1056
    -rw——- 1 clamav clamav 168K Dec 29 14:50 auto-whitelist
    -rw——- 1 clamav clamav 28K Dec 29 14:34 bayes_seen
    -rw——- 1 clamav clamav 332K Dec 29 14:34 bayes_toks
    total 1056
    -rw——- 1 clamav clamav 168K Dec 29 14:50 auto-whitelist
    -rw——- 1 clamav clamav 28K Dec 29 14:34 bayes_seen
    -rw——- 1 clamav clamav 332K Dec 29 14:34 bayes_toks

    I havn’t personally made any tasks to sync these, yet they seem to be the same. 95% of my spam is being filtered properly, but I do seem to get almost identical spams to ones that I have alerted ‘junkmail’ to.

    Here are some relevant headers from a piece of good email:

    X-Virus-Scanned: by amavisd-new at jgubby.com
    X-Spam-Status: No, hits=0.652 tagged_above=-999 required=3 tests=HTML_40_50,
    HTML_MESSAGE, NO_REAL_NAME
    X-Spam-Level:

    There is nothing about bayes in any of the headers. Also, why must we empty the folders every day? If we dont will it get badly weighted, or does it skip over stuff it has already seen making the clearout a housekeeping task?

    James

    #364626
    uptimejeff
    Participant

    I finally got around to checking a couple of my servers which have the 10.4.3 standard install with SA/ClamAV enabled.

    Both servers had the problem where:
    sa_learn uses: /var/clamav/.spamassassin
    auto-learning and analysis use: /var/amavis/.spamassassin

    I receive no bayes tags in mail headers.

    So the fix seemed simple enough, install the symlink in one direction or the other. (with proper owner, permissions, etc)

    — end result —

    Still no bayes scoring for my servers.
    I tried one with the symlink in /var/amavis and the other I tried the reverse.

    local.cf contains
    auto_learn 1
    use_bayes 1

    While moving the .spamassassin folder, creating symlinks, etc the mail server was stopped. I did a “diskutil repairpermissions /” before starting mail service.

    Here are my directories:
    x:/var/clamav jj$ ls -al
    total 5472
    drwxr-xr-x 5 clamav clamav 170 Jan 3 21:08 .
    drwxr-xr-x 33 root wheel 1122 Jan 3 16:02 ..
    drwxr-xr-x 5 clamav clamav 170 Jan 3 21:17 .spamassassin
    -rw-r–r– 1 clamav clamav 237106 Jan 2 14:06 daily.cvd
    -rw-r–r– 1 clamav clamav 2560365 Nov 22 13:27 main.cvd

    x:/var/amavis root# ls -l
    total 16
    drwx—— 5 clamav clamav 170 Jan 3 21:17 .spamassassin
    drwxr-xr-x 5 root clamav 170 Jan 3 21:02 .spamassassin.bak
    drwxr-x— 4 clamav clamav 136 Dec 22 23:34 amavis-20051222T233446-17248
    drwxr-x— 4 clamav clamav 136 Dec 23 20:44 amavis-20051223T204439-03812
    drwxr-x— 4 clamav clamav 136 Jan 3 10:14 amavis-20060103T071430-18613
    drwxr-x— 4 clamav clamav 136 Jan 3 21:17 amavis-20060103T211743-08375
    -rw-r—– 1 clamav clamav 0 Nov 22 13:29 amavisd.lock
    -rw-r—– 1 clamav clamav 5 Jan 3 21:17 amavisd.pid
    srwxr-x— 1 clamav clamav 0 Jan 3 21:17 amavisd.sock
    -rw-r–r– 1 clamav clamav 3 Jun 24 2005 whitelist_sender

    And my headers look like:
    X-Virus-Scanned: by amavisd-new at mac007.com
    X-Spam-Status: No, hits=0 tagged_above=-999 required=2 tests=
    X-Spam-Level:

    Any suggestions?
    This is absolutely ridiculous and now I understand why training hasn’t had the effect it should.

    Jeff

    #365235
    MacDave
    Participant

    [QUOTE BY= uptimejeff]
    local.cf contains
    auto_learn 1
    use_bayes 1
    [/QUOTE]

    uptimejeff: looks like the Tiger Server installed config file has the syntax wrong in a few spots. ‘auto_learn’ has been changed to ‘bayes_auto_learn.’ Great explanation here.

Viewing 15 posts - 16 through 30 (of 41 total)
  • You must be logged in to reply to this topic.

Comments are closed