Koozali.org: home of the SME Server

SA-0.6.2beta-1jp2.60 - move spam to Junkmail

dave

SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« on: December 10, 2003, 02:01:23 AM »
Folks,
i am using:
e-smith-spamassassin-0.6.2beta-1jp2.60.noarch.rpm on SME 6.0b3 but nolonger have an option in my server manager admin to move SPAM to the junkmail folder - any idea how i get this funcionality back?
it is tagging spams correctly but they are still filling up my inbox...

jb

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #1 on: December 10, 2003, 03:21:48 AM »
Dave,

I can't help you out, but I am interested in testing spamassassin.  I am trying to build a box to test it.  After the rpm install, how much setup is necessary?  Does it automatically download a new spam database, or do you have to train it.  I will be going to the spamassassin site to read me, but anything you can or want to add would be most helpful.

Thanks,

JB

Derek

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #2 on: December 10, 2003, 05:14:09 PM »
You can install dungog.net's user-manager and use procmail to do it. Works well for me.

jb

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #3 on: December 10, 2003, 05:53:30 PM »
Have you tested this with 6.0b3.  That's where I will want to run it.

I'll see what I get.

Thanks for the respons,

JB

Derek

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #4 on: December 10, 2003, 07:38:07 PM »
Yup. That's what I'm running.

dave

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #5 on: December 10, 2003, 08:48:31 PM »
JB,
I am also using it on 6.0b3.
I'd recommend using the install script over at:
http://sme.swerts-knudsen.dk/howtos/howto_16.htm

it will install and set up all the bits and pieces for you including User Manager if you don't already have it installed.
The only thing missing is the move to junkmail feature from the Spamassassin Server-Manager panel, so you need to enter the .procmail rule for this yourself - i just figured this step out and it is pretty easy to do from the user-manager.
Just add a new rule with:

Based on: custom headers
Criterion: X-Spam-Status: Yes

jb

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #6 on: December 10, 2003, 09:04:25 PM »
Dave,

Damn,

There's contribs all over the place.  Just went to this site, didn't even know it existed.

Thanks,

JB

jb

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #7 on: December 11, 2003, 05:15:59 AM »
Derek,

I got this installed and it seems to be working. I now need to test this.  

I guess I could black list my own domain and send mail to it to see if it makes it spam are just blocks it.  How did you test it out to make sure it was running and doing what it was supposed to do?  Is there a RBL list that it can download as well.  I haven't had a chance to read the Spamassassin docs yet.

Any other info you or anyone else wants to share is welcomed.

Thanks,

JB

Jesper Knudsen

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #8 on: December 11, 2003, 04:28:33 PM »
All,

I have now made som procmail rules that will enable this as well.

From http://sme.swerts-knudsen.dk:

I have created two default procmail templates that I install in the script only when running SME 6.0. The first makes sure to send incomming email through SpamAssassin to get the X-Spam header on the mail. The second rules will delete email that have a hit above 15 (according to Spamassassin.org this only gives a 0.05% chance to delete non-spam emails) or move them into the "junkmail" folder.

This is ONLY for 6.0

mkdir -p /etc/e-smith/templates-user/.procmailrc
cd /etc/e-smith/templates-user/.procmailrc
rm -f 30spamassassin
rm -f 95SpamSort
wget http://sme.swertsknudsen.dk/downloads/SpamAssassin/30spamassassin
wget http://sme.swerts-knudsen.dk/downloads/SpamAssassin/95SpamSort

# And then lets enable ProcMail for all users
cd /root/
wget  http://sme.swerts-knudsen.dk/downloads/SpamAssassin/lat-procmail
chmod 755 lat-procmail
./lat-procmail -c "*|enabled|no|some|normal"

Derek

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #9 on: December 11, 2003, 05:17:47 PM »
If you have a hotmail/yahoo...etc account you can try adding that account to the blacklist and sending an email from that acocunt to an account on your SME box.

I use Darrel May's dsbl.org contrib. Anything that sneaks through that and through spamassassin's detection, I add to the spamassassin blacklist. Works quite well.

Hmmm...as I look for a link to that dsbl.org contrib, I can't seem to find it. Anyone have a copy?

jb

Re: SA-0.6.2beta-1jp2.60 - move spam to Junkmail
« Reply #10 on: December 13, 2003, 03:53:35 AM »
Jesper Knudsen wrote:

> I have created two default procmail templates that I install
> in the script only when running SME 6.0. The first makes sure
> to send incomming email through SpamAssassin to get the X-Spam
> header on the mail. The second rules will delete email that
> have a hit above 15 (according to Spamassassin.org this only
> gives a 0.05% chance to delete non-spam emails) or move them
> into the "junkmail" folder.

Jesper,

I setup a new 6.0 final server today, and installed your latest spamassassin script.  The script ran flawlessly.  I set up a black list account and sent mail to it.  It was tagged as spam - [SPAM 100.00] test 3 -  but still showed up in my inbox and not my junkmail folder.  So, with the above statement of, "or move them into the junkmail folder", what is needed to make sure this function is enabled.

Here is a copy of my procmail rules copied from the user-manager panel, advanced panel:

Current procmail rules file
#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# SME Server software. Instead, modify the source template in
# an /etc/e-smith/templates-custom directory. For more
# information, see http://www.e-smith.org/custom/
#
# copyright (C) 1999-2003 Mitel Networks Corporation
#------------------------------------------------------------

# ---------------------------------------
# Default Shell, Program & file locations
# ---------------------------------------
SHELL=/bin/bash
DEFAULT=$HOME/Maildir/
FORMAIL=/usr/bin/formail
MAILDIR=$HOME/Maildir/
PMDIR=$HOME
SENDMAIL=/usr/sbin/sendmail

# ------------
# some logging
# ------------
VERBOSE=no
LOGFILE=$HOME/procmail.log


# ----------------------------------------------------------------------
# Route email to SpamAssassin Router
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
# ----------------------------------------------------------------------
:0fw
* < 256000
| /usr/bin/spamc




# -------------------------------------------------------------------------
# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox or simply delete them. (This one is optional.)
# --------------------------------------------------------------------------
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\dev\null

# -------------------------------------------------------------------------
# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to spam@ mailbox
# -------------------------------------------------------------------------
#:0
#* ^X-Spam-Status: Yes
#! spam@domain.com


# -------------------------------------------------------------------------
# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to the junkmail folder
# -------------------------------------------------------------------------
:0
* ^X-Spam-Status: Yes
$MAILDIR/;junkmail/



# --------------------------
# all else goes to the inbox
# --------------------------
:0
$DEFAULT

 


Thanks,

JB