Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Spamtrainer -f & X-Spam-***: Question

I switched to a Mac Pro Intel as my server a few months ago. I have been working out the kinks. I was moving from a Tiger Server install on a PowerMac G5. I had all the stuff for amavis, clamav, & spamassassin fixed on that install. I missed something since I have 2 .spamassassin directories and no symlink in /var/clamav/ or /var/amavis/. I have been running the nightly cron job as setup by Spamtrainer 1.2.7. I just updated to 1.5.7.
So since I have been running this I do have a bayes DB.
sudo su - clamav -c "sa-learn --dump magic"
0.000 0 3 0 non-token data: bayes db version
0.000 0 14767 0 non-token data: nspam
0.000 0 1402 0 non-token data: nham
0.000 0 181092 0 non-token data: ntokens
0.000 0 1165964162 0 non-token data: oldest atime
0.000 0 1170363924 0 non-token data: newest atime
0.000 0 1170396013 0 non-token data: last journal sync atime
0.000 0 1170396020 0 non-token data: last expiry atime
0.000 0 2764800 0 non-token data: last expire atime delta
0.000 0 12699 0 non-token data: last expire reduction count

First question is if I run spamtrainer -f will this delete the current DB?
If yes how do I combine the 2 directories before making the symlink?
What directory does spamtrainer -b backup /var/amavis/ or /var/clamav/?

/var/amavis/.spamassassin root# ls -loa
total 61896
-rw------- 1 clamav clamav - 20983808 Feb 2 17:43 auto-whitelist
-rw------- 1 clamav clamav - 95472 Feb 2 17:43 bayes_journal
-rw------- 1 clamav clamav - 5218304 Feb 2 17:43 bayes_seen
-rw------- 1 clamav clamav - 5390336 Feb 2 17:43 bayes_toks

/var/clamav/.spamassassin root# ls -loa
total 13128
-rw------- 1 clamav clamav - 1310720 Feb 2 05:30 bayes_seen
-rw------- 1 clamav clamav - 5410816 Feb 2 05:30 bayes_toks

My final question goes to the X-Spam- *: headers.
They should be in every mail that is delivered right? I only see these headers in mail with subject * JUNK MAIL *.
Will this be fixed after the symlink is done so all mail has X-Spam- *: headers in them?

Mac Pro 2 x 2.66Ghz intel 2006, Mac OS X (10.4.8), ATTO SCSI320 2CH, Highpoint 2322 SATA 2 RAID

Posted on Feb 2, 2007 5:10 PM

Reply
Question marked as Best reply

Posted on Feb 2, 2007 11:18 PM

First question is if I run spamtrainer -f will this
delete the current DB?


Unless your setup is really messed up it won't. It will check your config and backup first if in doubt.

If in doubt do the symlink manually.

What directory does spamtrainer -b backup
/var/amavis/ or /var/clamav/?


/var/clamav/

My final question goes to the X-Spam- *: headers.
They should be in every mail that is delivered right?
I only see these headers in mail with subject *
JUNK MAIL *.
Will this be fixed after the symlink is done so all
mail has X-Spam- *: headers in them?


This depends on the $sa tag_leveldeflt setting in amavisd.conf
To have headers inserted in all mails, set to -999
4 replies
Question marked as Best reply

Feb 2, 2007 11:18 PM in response to Michael Ojaste

First question is if I run spamtrainer -f will this
delete the current DB?


Unless your setup is really messed up it won't. It will check your config and backup first if in doubt.

If in doubt do the symlink manually.

What directory does spamtrainer -b backup
/var/amavis/ or /var/clamav/?


/var/clamav/

My final question goes to the X-Spam- *: headers.
They should be in every mail that is delivered right?
I only see these headers in mail with subject *
JUNK MAIL *.
Will this be fixed after the symlink is done so all
mail has X-Spam- *: headers in them?


This depends on the $sa tag_leveldeflt setting in amavisd.conf
To have headers inserted in all mails, set to -999

Feb 3, 2007 1:04 AM in response to pterobyte

Thanx Alex was waiting for your post.
All appears well sudo su - clamav -c "sa-learn --dump magic"
0.000 0 3 0 non-token data: bayes db version
0.000 0 14789 0 non-token data: nspam
0.000 0 1402 0 non-token data: nham
0.000 0 182231 0 non-token data: ntokens
0.000 0 1165964162 0 non-token data: oldest atime
0.000 0 1170466264 0 non-token data: newest atime
0.000 0 1170482415 0 non-token data: last journal sync atime
0.000 0 1170465843 0 non-token data: last expiry atime
0.000 0 2764800 0 non-token data: last expire atime delta
0.000 0 12699 0 non-token data: last expire reduction count

so that looks good. but I get this error now which i did not get before.

~ root# sudo su clamav -c "spamassassin --lint"
su: Can't start from current directory: Permission denied
su: Trying to start from "/var/clamav"

$sa tag_leveldeflt was set to -999 so I don't know why all messages did not get X-Spam- *: headers?

Feb 3, 2007 4:54 AM in response to Michael Ojaste

so that looks good. but I get this error now which i
did not get before.

~ root# sudo su clamav -c "spamassassin --lint"
su: Can't start from current directory: Permission
denied
su: Trying to start from "/var/clamav"


This is normal. You are in root's home directory, when sudoing to clamav. User clamav has no rights to see this directory so it switches to its own home directory.

$sa tag_leveldeflt was set to -999 so I don't know
why all messages did not get X-Spam- *: headers?


Virtual domains or local host aliases by any chance? If yes you need to fix this by addding "@local domainsmaps = ( 1 );" to amavisd.conf

Feb 3, 2007 6:40 AM in response to pterobyte

Thanx Again for the help.
@local domainsmaps = ( 1 );
I believe this was just added by spamtrainer 1.5.7 -f because it is there and I just scrolled back in Terminal and it says it add it as well as the symlink and fixes to local.cf. Not sure if it was there before but I doubt it. So thank you for the help and thank you for coming up with such excellent little freeware tools. Makes us Unix geek wannabes look good, lol.

Spamtrainer -f & X-Spam-***: Question

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.