Koozali.org: home of the SME Server

Spamassassin and ClamAV HowTo's for dummies

djmrmagic

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #15 on: December 10, 2003, 01:47:30 AM »
I am also having the same problem as Dave.

Used you SA script on a fresh 6.0 b3 machine with all the updates installed. Your script worked ok, no errors.
I have a junkmail folder but nothing is going into it, still comes into my in box?????

dave

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #16 on: December 10, 2003, 02:10:14 AM »
5.6 with a previous version of the server-manager spamassasin interface there was an option to move spam to the junkmail folder - anyone any ideas how to get this funcionality back? or what i need to add as a procmail rule?

Jesper Knudsen

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #17 on: December 10, 2003, 12:28:21 PM »
The current spamassassin.rpm does not provide this option so you would have to make a promail rule. I am working on this and will (if time permit) release a version this weekend that can #1 nove to junkmail, #2 move a seperate account (spam@domain.com) or dump if HITS is higher than f.ex 15.

Rgds,
Jesper

dave

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #18 on: December 10, 2003, 09:02:53 PM »
Excellent Jasper - they sound like great additions!

for now I got the procmail rule added using User-Manager
For anyone else who misses this feature, just add a new rule with:

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

NiGhTsPiRiT

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #19 on: December 10, 2003, 09:26:14 PM »
Will the forward-issue be fixed too?

Jesper Knudsen

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #20 on: December 11, 2003, 04:32:49 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"

Paul Wolsink

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #21 on: January 06, 2004, 11:36:01 PM »
Hi Jesper
I hope you can help.
What I have done is installing your scripts for CLAm and Spamassassin which worked great first time round. Thanks for making such scripts available.
What I have found however is:
Everything works great until I go to the server-manager>User Accounts>modify a user account. Even if I do not change anything, but click on SAVE, then Spamassassin for that user is disabled, but CLAM still works.
If I run the :
./lat-procmail -c "*|enabled|no|some|normal"
command, then it works again. It will only stop for the user where I clicked on Save or for example added a Forward. If the user had a forward upon running this command, then it is de-activated until I click on SAVE again in server-manager>User Accounts>modify a user .

Either the one or the other is activated which is rather anoying.
Any advise?

thanks
Paul

Jesper Knudsen

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #22 on: January 09, 2004, 10:13:24 PM »
Hi Paul,

This is quite annoying but I am afraid that I cannot fix it. Spamassassin installes some procmail templates which the system ought to use every time it changes i's own. The forwarding mechanism is actually also based on procmail (as far as I know). CLAM inserts itself in the mail queue and is much harder to mess with.

I am afriad I have no better solution than the one you have found yourself.

Rgds,
Jesper

Jeff Martin

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #23 on: January 15, 2004, 08:48:02 PM »
Thanks for the great Spammassassin script.

After installing is an option for "Use procmail to process mail" supposed to show up in the server-manager user panel or is that option only visible in the user-manager panel?

After I installed in the user-manager forward mail panel users are shown with "Use procmail to process mail" but in the server-manager user panel users are shown with "Both deliver locally and forward"

Thanks,
Jeff

goniol

spamc problem
« Reply #24 on: January 20, 2004, 11:24:49 AM »
is anybody can help me?
after installing spamassassin on 5.6  with jesper script's, all mails stays in queue , message log tell me a spamc unable access denied.
any idea ?

Graeme Fleming

Spamassassin and ClamAV HowTo's for dummies
« Reply #25 on: January 22, 2004, 04:08:32 PM »
.. on 6.0 I had to delete the clamd.sock file cos all mail was being sent to the problem mail folder

Anonymous

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #26 on: January 27, 2004, 03:39:18 PM »
I am having some trouble with the procmail rules and forwarding. If I setup in server-manager to both deliver locally and forward then the procmail rules are missed.  If I set up fowarding in user-manager using the forward mail option again it bypassess the procmail rules.  If I try to define a custom procmail rule in user-manager it seems to either forward without the procmail rules or not forward at all. There seems to be a stray semi-colon inserted before the email address for forwarding.

What I was hoping to achieve was to get the email both delivered locally and forwarded to remote email address, whilst still using the procmail rules for spamassassin on both the local and forwarded email.

Any suggestions to achieve this?

bobk

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #27 on: January 27, 2004, 04:44:29 PM »
I would like to be able to do the same thing - use Spamassassin and forward mail. Hope someone here has an answer.


Quote from: "Guest"

What I was hoping to achieve was to get the email both delivered locally and forwarded to remote email address, whilst still using the procmail rules for spamassassin on both the local and forwarded email.

Any suggestions to achieve this?

SteveB

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #28 on: January 28, 2004, 02:55:24 AM »
Quote from: "bobk"
I would like to be able to do the same thing - use Spamassassin and forward mail.


I've been looking for an answer to this and have found a procmail rule to forward the mail and leave a copy in the local mail. This involes editing your .procmailrc file, and I would guess (as I can't try this until tomorrow)that you should change your procmail rules to the "geek" option in user-manager.

# this fowards non-spam email to a remote address and delivers locally
:0c
* ^X-Spam-Status: No
! someone@somewhere.com

The tag "c" in the :0c means the mail is passed on to the next recipe in this case to be delivered locally.
Remove the "c" to just forward non-spam flagged email.

I would also like to use a recipe to move spam flagged email to a specific account (for manual checking if needed) with no local copy.

# forward all "tagged" messages to a specific user
:0
* ^X-Spam-Status: Yes
! user@some.where

I don't know enough about the limitations of stacking procmail recipes yet,(although I am willing to learn) but I would be interested in creating a How-to on customising the .procmailrc file with common recipes for forwarding after spamassassin, multiple forwarding, conditional forwarding etc.

Maybe someone has already done this? Perhaps someone could suggest other procmail recipes or problems with stacking recipes?

Is there a global .procmailrc file to have recipes for all users, or a way to modify the default template in user-manager so that the average user need not be a "geek" to use these recipes?

I will experiment with this and post my results.

SteveB

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #29 on: January 28, 2004, 04:21:41 PM »
Quote from: "SteveB"
I will experiment with this and post my results.


The user .procmailrc file is in the /home/e-smith/files/users/[username] directory.

I used WinSCP to browse to this file and edit it.

Scroll down to the bottom of this file and add just above the last entry (all else goes to inbox)

# -------------------------------------------------------------------------
# this fowards non-spam email to a remote address and delivers locally
# -------------------------------------------------------------------------
:0c
* ^X-Spam-Status: No
! someone@somewhere.com

This worked fine for me right away, without having to reboot etc.

There are other rules in this .procmaailrc that can be changed like what to do with positive spam hits or spam hits over 15 score.

These changes only apply to the user of whatever the .procmailrc file you have just changed.