Difficulty Learning Junk Mail

I having some trouble gettting Spamassasin to learn junk mail.
I'd noticed that the levels of Junk mail had not come down after some time of having a [email protected] address and creating the symbolic link to the clamav directory as suggested in some other posts on this topic. However, when I try to initiate the learnjunkmail scrpit manually I get the the following result:
mail:/ root# /etc/mail/spamassassin/learnjunkmail
Database path: Store does not exist
So, I ckecked out the details of the learnjunkmail script and noticed ( I think) that the Database path depends on the following variable:
MAILSTOREPATH=`cat /etc/imapd.conf | grep partition-default | sed 's/^.* / /'`
However, with my novice UNIX skills I'm having trouble understanding what this means. Can anybody help?
TIA,
Huw.
XServe   Mac OS X (10.4.5)   Server

As I understand this, all the work we are having end users do with redirecting messages, is totally useless since spamassassin is learning itself anyways. I am asking this primarily because we have some users whose e-mail's from specific users have been continually tagged as spam, even with a somewhat low detection level. I have tried to also add addresses to the whitelist_sender file and un-comment the #readhash(%whitelistsender, '/var/amavis/whitelist_sender');
line in the amavisd.conf file, and no go.
So just curious about your comment, that sa-learn and the auto-learn are not updating the same db.
Thanks for any and all help!
P.S. Is there anyway to merge the db's?
SpamAssassin in OS X Server needs some work before it
really works well (or acceptably)
1. Take a look at the spamtrainer script from:
http://osx.topicdesk.com/downloads
This script helps to automate learning and purging of
the spam/ham mailboxes.
2. A bug exists in the SA installation on OS X
Server.
The auto-learning and the analysis of incoming mail
both use:
/var/amavis/.spamassassin
But... SA-Learn (or spamtrainer) record their
learning to:
/var/clamav/.spamassassin
All of the training you perform with SA-Learn (also
called by spamtrainer) goes into a different database
than is used for analysis of incoming mail.
Compounding the problem, the auto-learning of
incoming mail is never corrected by your training.
When a message is misidentified the traits of that
messagea are used to score future messages incorectly
(because correction is never applied).
Many people have fixed this by symlinking one DB to
the other. An example (use sudo or root shell):
serveradmin stop mail
rm -r /private/var/amavis/.spamassassin
ln -s /private/var/clamav/.spamassassin
/private/var/amavis/.spamassassin
serveradmin start mail
Be aware that to symlink one db location to the
other, you will be destroying the info in one of the
databases. It doesn't really matter which directory
you replace with symlink.
If you've saved a good corpus of spam and ham, you
may want to start the training over and clear the
databases- then feed a new set of spam/ham.
3. You should expect to train the system with at
least 2000 SPAM and 2000 HAM messages before you
start seeing decent accuracy.
Hope this helps
Jeff

Similar Messages

  • Junk Mail only works after I disable and reenable Junk Mail Filtering

    Since installing Tiger, junk mail filtering does not work automatically. It neither marks incoming messages as junk nor moves them to the Junk folder.
    I am able to get it to work by selecting Preferences > Junk Mail and then unchecking "Enable junk mail filtering" and then checking it. Mail then asks to "Move Junk Messages" and when I respond "Yes" it marks the appropriate messages as Junk and moves them to the Junk folder.
    Unfortunately, it only works for the messages already received. New mail that is "junk" is not marked as such and appears in my inbox and I have to repeat the manual process to get it removed.
    Any suggestions for a more permanent solution?
    17 iMac   Mac OS X (10.4)  

    Will it also forget the "learned" junk mail? (That took years to learn.)
    No.
    The MessageRules.plist file stores all Mail.app rules including the default Junk Mail rules.
    All Junk Mail "learned" settings are stored in the LSMMap2 file also located at the first level within the Mail folder.
    Since the LSMMap2 file can become corrupt as with any other file, this file should be included with a regular backup of the Mail folder and the Mail.app preference file at Home > Library Preferences > com.apple.mail.plist.
    All Mail.app account information is stored in the Mail.app preference file.
    If you experience any problems with the Junk Mail filter, your options are using the Junk Mail reset feature which resets all "learned" settings or replace the existing LSMMap2 file with a copy of a working backup copy with the Mail.app quit before doing so.
    If the Mail.app preference file becomes corrupt (which I've never experienced but others have), when targeting the preference file requires re-entering all email account information. If you have a working backup copy of the com.apple.mail.plist file, you can replace the existing with the Mail.app quit before doing so without having to re-enter all email account information again.
    You need to replace an existing backup copy of the Mail.app preference file only after making any changes to account information or when adding or deleting an account in Mail.
    You may already have a backup strategy but if not, it is very important since it isn't a matter of if but when your hard drive has a partial or complete failure. I learned my lesson the hard way about 5 years ago. Without warning, I experienced a complete hard drive failure. I didn't maintain a backup at the time and none of the existing data was recoverable.

  • Remove Specified Junk Mail ONLY

    I have tried using Rules to mark specified subjects as junk mail. But I lost legitimate emails too. My error MIGHT have been to have Junk filter on, but I don't recall. If I use Rules ONLY, can I have specified subject spam go directly to trash all leave all other Junk to my discretion?
    My priority is to safeguard legitimte email first, and delete torrents of repeat spam as #2
    thanks

    Will it also forget the "learned" junk mail? (That took years to learn.)
    No.
    The MessageRules.plist file stores all Mail.app rules including the default Junk Mail rules.
    All Junk Mail "learned" settings are stored in the LSMMap2 file also located at the first level within the Mail folder.
    Since the LSMMap2 file can become corrupt as with any other file, this file should be included with a regular backup of the Mail folder and the Mail.app preference file at Home > Library Preferences > com.apple.mail.plist.
    All Mail.app account information is stored in the Mail.app preference file.
    If you experience any problems with the Junk Mail filter, your options are using the Junk Mail reset feature which resets all "learned" settings or replace the existing LSMMap2 file with a copy of a working backup copy with the Mail.app quit before doing so.
    If the Mail.app preference file becomes corrupt (which I've never experienced but others have), when targeting the preference file requires re-entering all email account information. If you have a working backup copy of the com.apple.mail.plist file, you can replace the existing with the Mail.app quit before doing so without having to re-enter all email account information again.
    You need to replace an existing backup copy of the Mail.app preference file only after making any changes to account information or when adding or deleting an account in Mail.
    You may already have a backup strategy but if not, it is very important since it isn't a matter of if but when your hard drive has a partial or complete failure. I learned my lesson the hard way about 5 years ago. Without warning, I experienced a complete hard drive failure. I didn't maintain a backup at the time and none of the existing data was recoverable.

  • Junk mail and spam - learning mode?

    Have been receiving unsolicited stock picks and viagara offers and move them to junk email folder that I created. Someone mentioned on a forum that a .mail account has a learning mode to help filter spam. I can't locate it. Any suggestions? Thank you.

    Look up the topic "Changing the junk mail filter" in Mail's Help to learn about Mail's built-in junk filter.

  • Mail : Junk Mail, does it still learn ?

    Hello,
    My question is :
    First, when you begin to use Mail there is, in Preferences-> Junk Mail, a learning mode. So you can mark messages that seem to be spam and Mail learns to recognize them. Then, after a while, you switch to the "automatic mode" and Mail put the spam in the Junk box.
    But, in the automatic mode, when you mark messages as spam, does it improve the knowledge of Mail about spam ?

    Yes - the Junk Mail filter continues to learn (or should if working properly) when set to Automatic.
    The ONLY difference between Training and Automatic is messages automatically or manually marked as Junk when received are moved to the account's Junk mailbox automatically.

  • Why doesn't "Mark as Junk Mail" learn?

    I'm getting numerous Junk Mail messages a day, all actually directed to my main email-address. The senders adresses are always different, without something Mail Rules can get a grip on. The only thing left for me is to manually mark them as Junk Mail.
    But often i get the same emails over and over again. Tomorrow i'll get, among several new ones, exact similar mails i thought i disposed of yesterday.
    Why can't Mail.app learn to recognize these emails and mark them as Junk Mail automatically? I wanted to get rid of them yesterday, why would i want them today? This is eating me...

    It's ok - i figured that you need to delete the account and then re sign in.

  • Having difficulty finding who to report a junk mail that supposedly came from Firefox.

    I received this in my junk mail today. The incoming address was: [email protected]
    Thanks for checking on it.
    Sir/Madam,
    Your E-mail Address has won (Seven Hundred and Fifty Thousand Great British Pounds only) GBP750,000 in the Mozilla Firefox this year Online promo recently conducted. To claim this prize, contact us by email for confirmation at: [email protected]
    Congratulations!
    Yours faithfully,
    Jane Karl
    For: Mozilla Firefox Online Promo Team
    Mozilla Foundation © 2011 • English (UK)

    I just got the same thing. I checked the properties of the email and it was sent from a unusual named server that doesn't look like one I would expect from Mozilla/Firefox. In fact when I tried to track down the "Inmail,sk" (note: calmma was used instead of a period to prevent a click-able link), I ended up at an infected web page. Fortunitly my anti-virus caught and blocked it and if it had not I'm using the Firefox add on No-Script, which would not allowed any scripts to run.
    My advice would be Don't visit any Inmail,sk sites and to block emails from r3,rs,email-od,com ([173.203.166.158]). (Period was also replaced in the previous string.) Also I doubt the Mozilla people can track this back to the source with the little info we have provided here.

  • Is Mail really "Learning" my junk mail?

    I've read various forum threads about training Mail. I might not be doing it right, but I mark spam messages as Junk, and they go to the junk box. It seems I get repeats though, from the same sender, or same subject. Which tells me, it's not doing anything, or, i don't have it set up right. I get a ton of spam though, and it drives me nuts. I switched to Thunderbird on a PC for a couple months, and surprisingly, didn't get but one a day. I finally received my new Macintosh, and really want to use Mail, but all of these spams just drive me crazy.
    Here's what I've done so far:
    - We use Postini on our server. All levels are set as high as can go.
    - I started creating "rules" for every single spam that came in, but I couldn't keep up. I must have 50 of them created, and I still get 30-50 spams a day.
    - Now, I mark them all as "Junk" but it still doesn't deter any of these spams. Fortunately, some of the spam emails do go directly into Junk mail, but not as many as I wish did.
    I see there are paid add-ons you can use for Mail. I find it hard to believe that there isn't a way using Mail, to at least cut down on all of these spams. If Thunderbird can do it for free, I'd bet there's a way to do it in Mac Mail.. I'm probably just not doing something right. Any ideas would help. Thanks!

    Hi grannysmith.nc,
    I apologize, I'm a bit unclear on exactly what you are seeing with regard to junk mail in Mail under Yosemite. I'm unclear if it is not marking junk mail at all, or if it is marking it but simply not moving it to the Junk mail folder. If it is the latter (not moving), it may be as simple as changing the settings as outlined in the following article under Change the junk mail filter:
    Mail (Yosemite): Reduce junk mail in your inbox
    If Mail isn't recognizing junk mail at all, you might find these articles more useful:
    Mail (Yosemite): If junk mail filters aren’t working correctly
    Mail (Yosemite): Junk Mail Advanced settings
    Regards,
    - Brenden

  • Junk mail not automatically moved to Junk folder

    Hello.
    I'm using an IMAP account and have configured Mail to move junk mail to the chosen junk mail folder (junk is not filtered on the server but on my client). Since the junk mail filter is still learning sometimes junk mail is not detected and still goes to the inbox. That's okay.
    If I then select that message it is somehow miraculously detected and marked as junk. However, it is not automatically moved to the junk folder but remains in the inbox marked as junk?
    Is this desired behaviour? Why is the mail not automatically moved to the junk folder, like it is when I manually mark a mail as junk?
    Thanks in advance

    I just happened to notice that even mail that is automatically marked as spam/junk remains in my inbox. So I open the inbox folder and there is message that is marked as junk. Only when I manually reset and set the junk status is the message moved to the junk folder.
    This seems to be the case in an IMAP acount where all folders (sent, drafts, spam, etc.) are subfolders of the actual inbox folder.
    Is anyone else experiencing this behaviour?
    Thanks in advance

  • Mail Version 2.1.1 (752.3) Junk Mail Buttons Don't Work

    I have ... Reset junk mail.
    The problem occurs before and after junk mail is reset and junk mail learning mode is active for any number of days.
    When I get junk mail in my inbox and click on it once and then use either the "Not Junk" icon in Toolbar or "Not Junk" button in message header, Mail treats the message as not junk. When another e-mail arrives from same sender, it's again marked as junk. I've noticed that some messages revert to the "junk" colour even after they are marked as not junk.
    I've repaired permissions and restarted the iMac and restarted Mail app.
    Wonder if I have the latest version of Mail? Please help. Thanks
    iMac 2.16 GHz Intel Core 2 Duo, 2GB SDRAM   Mac OS X (10.4.9)   Have dual boot with XP Pro on "other side"

    Have you made any changes to the junk filter in Preferences > Junk Mail > Advanced? Try this:
    1. Go to Preferences > Junk Mail, disable junk mail filtering, then enable it again. This resets the junk filter rule.
    2. Choose either Training or Automatic mode (it doesn’t matter) and leave the other options checked. Click Advanced to see how the junk filter rule is defined now if you want, but don’t change anything there.
    3. Reset the junk filter database (Preferences > Junk Mail > Reset).
    You can use the Colors palette (Format > Show Colors) to manually change the background highlight of messages in the message list. Although the Colors palette cannot be used to set the foreground color, it can be used to remove it. In particular, choosing either black or white removes both the background highlight and the foreground color of the messages currently selected in the message list.

  • Odd Junk Mail Behavior

    I've been experiencing odd Junk Mail behavior on my Mac; I've got the Mail app set so it puts the emails it thinks is Junk in the Junk folder. I do this because I've noticed that certain legitimate emails keep ending up in the Junk folder automatically.
    I've also noticed that some of the emails in the Junk folder have not actually been flagged as Junk Mail, they were not colored brown by the Junk Mail rule and there is no button available to tell Mail it's not Junk. How do I stop Mail from flagging something as Junk when it doesn't seem to tag it as Junk but it still ends up in the Junk folder?
    I see emails tagged as Junk in the Junk folder that are legit, so I click the "Not Junk" button and move them back to the proper mail folder. But the next time I get mail from the same source, it gets flagged and tagged as Junk again. I thought the Mail app learns from the training we give it. How do I resolve this situation?
    I've already set the Junk filtering to not filter emails from recipients who are in my Address Book.

    Either you’ve messed with the Preferences > Junk Mail > Advanced settings, or those settings have become corrupt, or you have one or more rules that have a bearing on this.
    Assuming it isn’t the latter, try this:
    1. Go to Preferences > Junk Mail, disable junk mail filtering, then enable it again. This resets the rule that governs what the junk filter does.
    2. Choose either Training or Automatic mode (it doesn’t matter) and leave the other options checked. Click Advanced to see how the junk filter rule is defined now if you want, but don’t touch anything there.
    3. Reset the junk filter database (Preferences > Junk Mail > Reset).

  • How to unmark junk mail in mail 5.1?

    I am unable to find a way to unmark mail as junk in Mail 5.1 (OS X Lion).  In previous versions of Mail, there were obvious ways to do this.
    Can someone tell me how to do this? 

    Aha.   I reset the junk mail under Mail->Preferences->Junk Mail,  and the behavior changed.  Now the menu item and toolbar button act as toggles, whereas they did not before the reset.
    BUT:  junk mail handling gives us a choice between a)  moving junk mail to the junk mailbox  or b)  marking it as junk but leaving it in the inbox.   Now I don't see a way to make it do both,  even through the custom handling option.  
    Why do I want it to do both?   I want to make sure the the filter is learning what I think  is junk and what I think is is not, and I want the junk out of the way.

  • Is there a comprehensive list of what X-Spam headers Apple Mail will look at when determining junk mail status?

    Apple Mail has a preference to 'Trust junk mail headers in messages' but I can not find a list of what those headers are.  By trial and error I've learned the "X-Spam-Flag: YES" will work (exactly that, no extra info), but I'd like to know what other options there are... particularly if I can send a score/rating back and have it look at that.
    But I can't find a list of supported headers.  The Internet is full of "common spam headers" and yet none of them actually seem to work -- and lots of people who can't get it working with spamassassin which is incredibly common...
    So... is there such a list?

    I'm in the process of trying to get this information for a client. Even with a paid AppleCare agreement, the only answer I'm getting is "look in the forums" and "look on the developer site" (although I have to give credit to the Tier-1 rep who's trying to help me.) The impression I'm getting is that they consider an exact list of header names to be proprietary information for some reason, and are going to great pains to try not to give out the information, but also to not create ill will amongst their customers by explicitly saying "that's proprietary".

  • Junk Mail Flagging Issue

    I was trying to correct an error I made with Mail and I clicked reset in the junk mail pane. Now it no longer marks anything as junk. I have junk filtering enabled. It's set to mark as junk but leave it in my inbox. I know this is training mode and I am marking the spam as junk but I thought it would still mark the messages that didn't conform to the default rules of the sender not being in address book, or in previous recipients, etc. but it's not. Prior to my clicking on reset it was marking them correctly.
    Does the filter start picking these up after a certain period of time or is there something I need to correct?

    You should set the junk mail filter to move the mail to the junk folder.
    Mail / Junk will eventually 'learn' what is and not junk.
    Until you have a large amount of mail in the junk it would be advisable to check through once in a while for messages that you actually need.
    Spamsieve gives you the oppotunity to create rules to keep the messages from known address's. Download the 30 day trial to give a go, if you prefer mail junk filtering you can revert back after 30 days.
    For your information, I get between 70-100 spam messages per day, I now trust spamsieve to filter them out - it does a great job.

  • Junk mail filtering only working on internal mail (and only some of them)

    Good morning
    I'm trying to get Junk Mail filtering working properly on my server (currently running 10.5.6). All mail that comes from externally doesn't seem to pass through the spam filter at all. It gets scanned for viruses (in the email header i get "X-Virus-Scanned: amavisd-new at example.co.uk" but no sign of any spam filtering.
    I have previously configured the filtering using the instructions here http://www.netmojo.ca/blog/2009/04/13/spam-proofing-leopard-server/ but i had been searching through the support here and had started following the instructions in the OS X mail manual, creating a junkmail user and forwarding email to it. Whilst doing this i noticed that some emails had started to be tagged as junk using the settings i had set in server admin. These have something like the following in the email header:
    X-Virus-Scanned: amavisd-new at example.co.uk
    X-Spam-Flag: YES
    X-Spam-Score: 3.479
    X-Spam-Level: *
    X-Spam-Status: Yes, score=3.479 tagged_above=2 required=2
    tests=[ALL_TRUSTED=-1.44, AWL=0.286, HTML_MESSAGE=0.001,
    RAZOR2CF_RANGE_51100=0.5, RAZOR2CF_RANGE_E8_51100=1.5,
    RAZOR2_CHECK=0.5, URIBLOBSURBL=2.132]
    However those emails not tagged as spam do not have any such lines. I would have expected to see X-Spam-Flag: NO and the spam score and such. Are these lines hidden if a mail does not trigger the threshold?
    I've had this aparently learning for about a week now and even with the setting set on 1 it's still yet to catch a single piece of junk mail entering into the server.
    I do have emails to quite a few different domains directed to this server so i added the lines suggested here http://discussions.apple.com/thread.jspa?messageID=7034527&#7034527 to /etc/amavisd.conf but to no avail.
    Any suggestions? Any parts of any log files that may be of use? I've been looking at the junk mail log in debug mode in SA and also in terminal but there's so many lines per mail it's difficult to see what's going on. I can't see anything different from one mail to the next...
    Thanks

    I would have expected to see X-Spam-Flag: NO and the spam score and such. Are these lines hidden if a mail does not trigger the threshold.
    You need to edit /etc/amavisd.conf and set:
    $satag_leveldeflt = -999;
    This will make sure all mails get the headers inserted.
    Also make sure that "@bypassspam_checksmaps = (1); " is commented out.
    That said, the Bayesian filter will need to be fed at least 200 HAM and 200 SPAM messages before it kicks in.
    Each time you modify settings in amavisd.conf, you need to restart amavisd by issuing:
    sudo /bin/launchctl unload /System/Library/LaunchDaemons/org.amavis.amavisd.plist
    sudo /bin/launchctl load /System/Library/LaunchDaemons/org.amavis.amavisd.plist
    HTH,
    Alex
    P.S. When you make changes in Postfix' configuration files, simply issue "sudo postfix reload" to make the m stick. No need to stop Postfix (BTW: That article you linked to is full of inaccuracies).

Maybe you are looking for