Home › Forums › OS X Server and Client Discussion › Mail › Automatic learning of junk mail by SpamAssassin for 10.4
- This topic has 11 replies, 5 voices, and was last updated 19 years, 7 months ago by
Anonymous.
-
AuthorPosts
-
June 9, 2005 at 2:03 pm #361934
frequencydip
ParticipantThe Tiger Server documentation, claims that two e-mail accounts (junkmail and notjunkmail) will run a cron job at 1 am to train the filter.
Is this really happening. I don’t see any messages that a process called sa-learn is being created (this should appear in the system.log, right?) if not there where would I see the results. I don’t belive it to be running because mail I send to notjunkmail is still being marked as junkmail and the system does not seam to be filtering more mail after attempting to train it.
If this cron job won’t run automatically how do I run it manually?
Thanks for any help?
June 29, 2005 at 2:21 am #362142Anonymous
GuestDid you have any luck ? This problem is unchanged for a clean install of 10.4 server with the 10.4.1 and security updates applied.
Seems to me Apple forgot a launchd plist for this !
There’s certainly no crontab for root…I created this launchdaemon plist by copying and editing the plist for com.apple.periodic-daily.plist:
/System/Library/LaunchDaemons/com.apple.learnjunkmail.plist
and then loaded it with:
launchctl load /system/library/launchdaemons/com.apple.learnjunkkmail.plist## file-content follows this line ##
Label
com.apple.learnjunkmail.plist
ProgramArguments
/etc/mail/spamassassin/learn_junk_mail
daily
StartCalendarInterval
Hour
1
Minute
15
And it ran as it should.
June 29, 2005 at 2:58 pm #362150Anonymous
GuestSince it should be run as user clamav , I changed the plist to as follows (and fixed my posting to display properly):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.learnjunkmail.plist</string>
<key>ProgramArguments</key>
<array>
<string>/etc/mail/spamassassin/learn_junk_mail</string>
<string>daily</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>1</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
<key>UserName</key>
<string>clamav</string>
</dict>
</plist>July 23, 2005 at 10:30 pm #362455papplegate
ParticipantWhat output in the logs will show that the script ran at 1am? I do not see anything that would indicate that it ran successfully.
Thanks,
PaulJuly 24, 2005 at 9:37 pm #362463Anonymous
GuestThere is an alternative: put a symbolic link of the script in /etc/periodic/daily
ln -s /etc/mail/spamassassin/learn_junk_mail /etc/periodic/daily/750.learn_junk_mail
Output should be in /var/log/daily.out
July 26, 2005 at 1:14 pm #362489woodgie
ParticipantWhere is it set that the eMail accounts the SpamAssasin cron job looks at are called ‘junkmail’ and ‘notjunkmail’ and is it a good idea to change this if you can?
It was noted somewhere else (I forget where I read it) that ‘junkmail’ and ‘notjunkmail’ might be open to abuse as spammers can send to ‘notjunkmail’ first to teach SA bad habits.
I have so many damned questions, and the Apple manuals are simplistic to the point of torture!
July 26, 2005 at 9:59 pm #362502papplegate
Participant[QUOTE BY= Jelle] There is an alternative: put a symbolic link of the script in /etc/periodic/daily
ln -s /etc/mail/spamassassin/learn_junk_mail /etc/periodic/daily/750.learn_junk_mail
Output should be in /var/log/daily.out
[/QUOTE]
Going to try that, because I do not see any evidence that is working via the other method.July 26, 2005 at 10:02 pm #362503papplegate
Participant[QUOTE BY= woodgie] Where is it set that the eMail accounts the SpamAssasin cron job looks at are called ‘junkmail’ and ‘notjunkmail’ and is it a good idea to change this if you can?
It was noted somewhere else (I forget where I read it) that ‘junkmail’ and ‘notjunkmail’ might be open to abuse as spammers can send to ‘notjunkmail’ first to teach SA bad habits.
I have so many damned questions, and the Apple manuals are simplistic to the point of torture![/QUOTE]
I do not know, but would like to know, to change then as well. It makes sense to have a “non-public” address, by that I mean one that has not been shown in the docs to prevent what woodgie was takling about.
August 18, 2005 at 12:15 pm #362835serversolutions
ParticipantTwo things:
First, you can resttrict those accounts from recieving mail from outside domains by using a hash statment in the postfix config files.
Second, that plist isn’t working for me.
What gives???
if you have one that is working tar it up and e-mail it to me at –> Dale
August 29, 2005 at 3:09 pm #362995Luc-Olivier
Participant[QUOTE BY= heteronymous] Since it should be run as user clamav , I changed the plist to as follows (and fixed my posting to display properly):
…[/QUOTE]I can run as root because all "sa-learn" command are su "clamav".
August 31, 2005 at 12:32 pm #363032Anonymous
Guestadditionally, you are supposed to delete the mail in the junk/notjunk accounts each night… what is the best way to script this if its not already there?
August 31, 2005 at 12:41 pm #363033Anonymous
Guesthere is the thread at apple discussions: http://discussions.apple.com/[email protected]@.68aedf14
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed