Koozali.org: home of the SME Server

Spamassassin and ClamAV HowTo's for dummies

Jesper Knudsen

Spamassassin and ClamAV HowTo's for dummies
« on: December 02, 2003, 01:37:57 PM »
All,

Based on all the great ideas and written howto's from many people (no one mentioned - none forgotten) I have created an install script for both Spamassasin  and Clam Antivirus for both SME 5.6 and 6.0 (Beta3 will all updates).

I have tested the scripts on a couple of new installs and they are working nicely for me - however if they cause any problems in your system then please let me know so I can get it corrected.

The Howto's and scripts can be found at:

http://sme.swerts-knudsen.dk

There is also a new script for DShield for those of you who would like to battle port scanners.

Good luck,
Jesper Knudsen

Brad Jennings

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #1 on: December 02, 2003, 10:27:18 PM »
I used your Spamassassin script just yesterday and it worked great on my 5.6 box.  Thanks

Thor Anthrax

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #2 on: December 02, 2003, 10:56:15 PM »
Install does work perfectly, only fetchmail mailboxes are not scanned at all :S How to solve that?

Jesper Knudsen

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #3 on: December 03, 2003, 11:47:31 AM »
Thor,

Which SME version are you running?

Rgds,
Jesper

Thor Anthrax

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #4 on: December 03, 2003, 01:29:25 PM »
Sorry, I forgot to mention it...

I'm using 6.0b3

Mark

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #5 on: December 04, 2003, 11:26:25 AM »
I get this after installing. (BTW 'cab' is the first user under admin)
Activating procmail for user 'cab'.
Can't open directory /etc/e-smith/events/user-modprocmail
An error occurred while updating account 'cab'.
Installation of SpamAssassin complete.

The panel shows up in the server manager, but nothing in the e-mail headers indicating it was scanned by SA.

I'm using 6b3 with the latest updates.

Jesper Knudsen

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #6 on: December 04, 2003, 09:20:19 PM »
Mar,

Can you manually get to the mentioned directory? Did you login as root when you installed these scripts?

Did you upgrade a 5.5/5.6 to 6.0 ?

Did you have the User-Panel installed before this script tried ?

A ton of questions but we will figure out what went wrong. :-)

Rgds,
Jesper

Mark

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #7 on: December 04, 2003, 10:49:41 PM »
Can you manually get to the mentioned directory?
The directory doesn't exist.

Did you login as root when you installed these scripts?
Yes

Did you upgrade a 5.5/5.6 to 6.0 ?
No fresh install of 6b3

Did you have the User-Panel installed before this script tried ?
It was at one time but I had un-installed it prior to using your script. SA wasn't working then either.

I also have clamAV installed and working from dungog.

christopher

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #8 on: December 05, 2003, 04:27:47 AM »
Dude...your scripts were impeccable!!  Great Job....

nef kho

error upon installation of clamav
« Reply #9 on: December 06, 2003, 02:52:12 AM »
i got this error upon installation of the script for clamav. my email doest work now, i am running sme 5.6 update 5.

package amavis-ng-0.1.6.4-03dc is already installed
ERROR: LOGGER: Can't open file /var/log/clamav/freshclam.log to write.
ERROR: Problem with internal logger.
Starting clamd: ERROR: Problem with internal logger. Please check the permissions on the /var/clamav/log/clamd.log file.

thanks,

nef

nef kho

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #10 on: December 06, 2003, 05:08:28 AM »
hi,

i got the previous problem installed, dont know how, i just rpm -3 it and install it again, but i got new error when i try to qmailq output

[root@e-smith clam]# sudo ls -l /var/lib/clamav/clamd.sock
sudo: can't stat /etc/sudoers: No such file or directory

any idea, thanks

nef

Mark

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #11 on: December 07, 2003, 04:54:36 PM »
>Did you have the User-Panel
>installed before this script tried ?
Sorry, that was the wrong answer in my previous post. The correct answer would be _no_.

I think this is were the problem is because e-smith-userpanel-1.6.0-1.noarch.rpm was never installed.

In your script you have;
"This installation only supports SME 5.6 and 6.0 (beta 3 with updates)"

do the updates include these?
http://www.ibiblio.org/pub/linux/distributions/e-smith/dev/6.0dev/updates/6.0beta3/RPMS/

Jesper Knudsen

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #12 on: December 08, 2003, 03:37:42 PM »
All,

I have noticed a few changes to Razor and Pyzor than needs some correcting to work perfectly.

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

The Razor and Pyzor servers have changed since the RPMs used in this installation have been build so if you have run this script before December 8, 2003 you should get it updated. The razor_patch script from now on incorporated in the above sa_install script. Also there is a Razor patch available in order to get Razor to work flawlessly with SpamAssassin 2.60. This can be done with this simple script:

 

[root@e-smith]# wget http://sme.swerts-knudsen.dk/downloads/SpamAssassin/razor_patch.sh

[root@e-smith]# sh razor_patch.sh

NiGhTsPiRiT

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #13 on: December 08, 2003, 03:49:43 PM »
When I configured email to be forwarded for a user it is scanned by both spamassassin and amavis and deliverd locally instead of being forwarded.
Also, admin is not congured by your script.


But anything else on the scripts is just great! :)

dave

Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #14 on: December 08, 2003, 07:17:57 PM »
Hi Jasper & thanks for the great scripts!
after installing your spamassassin script on my 6.0b3 box it works like a charm but all SPAMS are still in my inbox - a junkmail folder has been created but the spams are not sent there - is there anything I need to do to get the spams delivered into the junkmail folder?
dave.

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.

bobk

Spamassassin and ClamAV HowTo's for dummies
« Reply #30 on: January 28, 2004, 04:48:01 PM »
Thanks SteveB that works perfectly. :-D

Offline Rigger

  • ***
  • 71
  • +0/-0
Re: Spamassassin and ClamAV HowTo's for dummies
« Reply #31 on: January 28, 2004, 05:38:23 PM »
Quote from: "Jesper Knudsen"
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



Searching the forums I ran accross this fix. Apparently both Spammassassin and Amavis use the same method the to launch in version 6. Edit the /etc/amavis-ng/amavis.conf

Change;

[Qmail]

qmail-queue = /var/qmail/bin/qmail-queue

to:

[Qmail]

;qmail-queue = /var/qmail/bin/qmail-queue
qmail-queue = /var/qmail/bin/qmail-spamc


--
Doug M.
"Rigger"

shanen

Spamassassin and ClamAV HowTo's for dummies
« Reply #32 on: January 29, 2004, 02:16:37 AM »
If you want to use amavis-ng/clam and sa together, I can suggest using them sitewide. This works very well for me and you don't have to mess with procmail rules.

Read:

http://www.pagefault.org/howto/amavis_clam.shtml
or jespers site.

Then go to Jespers site and use his cool sa script:

http://sme.swerts-knudsen.dk

Then modify the amavis.conf file as Doug just suggested:

http://forums.contribs.org/index.php?topic=9115.msg34508#msg34508

jerryyap

Spamassassin and ClamAV HowTo's for dummies
« Reply #33 on: January 29, 2004, 01:22:27 PM »
Hi Jesper,

Just a note to say a big Thank You for writing the scripts to help novices like us install clamav amavis-ng.

My system caught about 20 Worm.Sco.A within the first hour of installation.

Thanks again for contributing so much to this project.

Regards,
Jerry Yap

jerryyap

Spamassassin and ClamAV HowTo's for dummies
« Reply #34 on: January 29, 2004, 01:38:32 PM »
Hi Jesper,

Just a note to say a big Thank You for writing the scripts to help novices like us install clamav amavis-ng.

My system caught about 20 Worm.Sco.A within the first hour of installation.

Thanks again for contributing so much to this project.

Regards,
Jerry Yap

akuma

When does Clam Update?
« Reply #35 on: January 29, 2004, 04:10:04 PM »
Hi Jesper,
Great script and it's working like a charm, but I'm wondering when the definitions are updated?  And where do I find those parameters?

Thanks

Offline stiperstones

  • *
  • 177
  • +0/-0
    • http://www.stiperstones.com
Problem with clamd 'reported log'
« Reply #36 on: January 29, 2004, 08:28:27 PM »
Very easy to install but a problem with clamd AV
Log fie report sent ot me as below

ERROR: Can't get information about clamav.catt.com host.
ERROR: Connection with clamav.catt.com (IP: ???) failed.

Could someone explain what it mean's
Stiperstones

http://wiki.contribs.org/Koozali_Foundation
Try the Wiki some great how's there

"My Licence".........

Don't report security issues here - Contact security at contribs dot org
Don't report problems here - Please report bugs @ http://bugs.contribs.org/
Don't ask the same question twice - Please search the forums, your question may have been asked before - Thank You.

wacko

Few Errors
« Reply #37 on: January 29, 2004, 11:12:37 PM »
firstly id like to say thnks for a great script!

i seem to have a few problems when running this, the default works fine. both normal and geek mode, moves the mail into the junk mail folder which is great!

When I installed spamassassin using the howto it tried to automatically udate itself via cron which is fine but I got dependency errors

The first email i got was

The following files were downloaded and installed:
  - spamassassin-2.63-1.i386.rpm
  - spamassassin-tools-2.63-1.i386.rpm
  - perl-Mail-SpamAssassin-2.63-1.i386.rpm

followed closely by


/etc/cron.daily/USA:

error: failed dependencies:
   perl-Mail-SpamAssassin = 2.63-1 is needed by spamassassin-2.63-1
error: failed dependencies:
   perl-Mail-SpamAssassin = 2.63-1 is needed by spamassassin-tools-2.63-1
error: failed dependencies:
   perl-Mail-SpamAssassin = 2.61-1 is needed by spamassassin-2.61-1
   perl-Mail-SpamAssassin = 2.61-1 is needed by spamassassin-tools-2.61-1
Shutting down spamd: [   OK   ]

Starting spamd: [   OK   ]


any fix for this? as i believe i will probably get the same error everytime cron runs?

I changed one of the users to geek mode from the user-manager and edited the .procmail file in the users home directory as shown below to mail spam to a separate account which I have set up ( I wish to do this for all the accounts so that they can be monitored this way. but currently trying to get it to work with one)


# ---------------------------------------------
# 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/


this does not seem to deliver the mail to either account I cant see it in the original account or the one which has been set up

the qmail log file shows me this

@4000000040197e4232f46154 delivery 12: success: procmail:_Skipped_"_"/procmail:_Couldn't_chdir_to_"/home/e-smith/files/users/username/Maildir/_"/procmail:_Skipped_"_"/did_0+0+1/
@4000000040197e4232f4da6c status: local 0/10 remote 0/20
@4000000040197e4232f4f9ac end msg 159729


it creates a procmail.log? file with a ? in the userhomedirectory which shows


"rocmail: Skipped "
"rocmail: Skipped "
"rocmail: Skipped "
"rocmail: Skipped "
: No such file or directory
"rocmail: Error while writing to "/usr/bin/spamc
procmail: Rescue of unfiltered data succeeded
"rocmail: Skipped "
 Subject: RE: 100%!!! FREEE!!!!!!!!!!!!!1  21:41
  Folder: /home/e-smith/files/users/username/Maildir/


in the Maildir directory I can see the email shown as ?? , also the devnull file for spam with a higher score, does that delete the mail automatically after a set period? or would it just build up there?

[root@sme Maildir]# ls
??  cur  devnull  ;INBOX  ;junkmail  new  tmp
[root@sme Maildir]#

and lastly is there a way to make the .procmail file setting to mail to a spam account (rather than a sep folder) permanent and global!?

Thnks for any help
wc

SteveB

Spamassassin and ClamAV HowTo's for dummies
« Reply #38 on: January 30, 2004, 01:00:29 AM »
wacko,

I hope this helps a little, I have been doing more or less the same thing today and for me it went well.

I used the scripts and how-to's over at
http://sme.swerts-knudsen.dk/ (many thanks Jesper)
to install spamassasin and clamav/amavis.

The updates went fine for me after a reboot.

Normal mode allows interaction in the user-manager panel
Geek mode transfers "ownership & responsibility" of maintaining the .procmailrc file to the user or admin and the file is not overwritten during updates etc.

If you move back from geek to normal in user-manager I believe it overwrites the .procmailrc with the default script, ISTR that it says something like that in the user-manager.

I did have a little trouble when setting to both deliver locally and to a remote address, with the mail then not using procmail, but this was fixed using
./lat-procmail -c "*|enabled|no|some|normal"

The part of the .procmailrc file you show has two basic recipes
:0
* ^X-Spam-Status: Yes
! spam@domain.com

If spam status (determined by spamassassin level) is yes then the mail will go to remote address spam@domain.com
I use this rule to forward spam identified by spamassassin to a seperate user account on my system
! spam@[my domain]
for manual checking whilst I experiment with the spamassassin levels. Im using 'high' with no false positives yet.

The second recipe
#:0
#* ^X-Spam-Status: Yes
#$MAILDIR/;junkmail/

is disabled by use of the "#" at the start of the line. Removing the # in itself is not enough to activate the recipe though. If the condition is met in the first recipe i.e. the X-Spam-Status is yes then the first recipe sends it to spam@domain.com and that would stop procmail using any further recipes on the .procmailrc script.

If you want the spam to be sent remote to the remote address,that is what you will achieve with your script as it is. If you want it to move it to the ;junkmail folder of the user then change your recipes to

#:0
#* ^X-Spam-Status: Yes
#! spam@domain.com

ignores the first recipe

:0
* ^X-Spam-Status: Yes
$MAILDIR/;junkmail/

uses the second

If you want more than 1 recipe to be used, like I did today when I wanted to send non-spam mail to a remote address and deliver locally then put a 'c' after the :0 which in script terms generates a copy of your mail to be passed along to the next condition.  

:0c
* ^X-Spam-Status: Yes
! spam@domain.com

:0
* ^X-Spam-Status: Yes
$MAILDIR/;junkmail/

This sends spam mail to a remote and to the local junkmail folder.

...

"rocmail: Skipped "

The missing 'P' at the start of the line, could be a clue.
Did you edit the .procmailrc in a DOS enviroment? This can cause problems with how DOS ends lines.
I used WinSCP to browse to the file and edit it, with no problems.

...

/dev/null
Sending your mail here is like lending your TV Tray to Homer Simpson - you are never gonna see it again - Just ask Ned Flanders  :-D

Regards

SteveB

wacko

Spamassassin and ClamAV HowTo's for dummies
« Reply #39 on: January 30, 2004, 12:08:53 PM »
thnks for your reply steve,

Quote from: "SteveB"


...

"rocmail: Skipped "

The missing 'P' at the start of the line, could be a clue.
Did you edit the .procmailrc in a DOS enviroment? This can cause problems with how DOS ends lines.
I used WinSCP to browse to the file and edit it, with no problems.

...



This was the reason it was not working and i was getting those errors. I did a proper edit and everything worked like a charm. All spam eMail is now going through to a separate spam box.

Quote from: "SteveB"


/dev/null
Sending your mail here is like lending your TV Tray to Homer Simpson - you are never gonna see it again - Just ask Ned Flanders  :-D

Regards

SteveB


yes but the the .procmail file generated by this script seems to point to \dev\null which is creating a directory in the users mail folder with all of the spam eMails which are supposed to be deleted.

Am not sure if this is supposed to happen or it is a typo by the developer? Just confirming if it is okie to change


* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\dev\null


to


* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/dev/null


one last thing i was processing eMail through the system last night and let it run as there seemed to be over a thousand emails going through (nearly all spam), but early this morning it shutdown and spam was getting through which was a pain to delete manually via webmail


Jan 30 04:03:53 spamassassin: spamd shutdown succeeded
Jan 30 04:04:34 root: spamd starting
Jan 30 04:04:34 spamd: Could not create INET socket: Address already in use IO::Socket::INET: Address already in use
Jan 30 04:04:35 spamassassin: spamd startup failed


any ideas on how to fix this? and make sure it doesn't happen again? Also if spamd does fail for whatever reason to put a process in place to make sure it starts up again later? as i had to start it manually later on when i started getting spam and noticed it had not been scanned by spamassassin.

Thnks
wc

Anonymous

Spamassassin and ClamAV HowTo's for dummies
« Reply #40 on: January 30, 2004, 08:23:24 PM »
wacko,

* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/dev/null

certainly works to delete the spam but use with caution, if you are completely confident of no false positives.

\dev\null is in the default .procmailrc template installed by the scripts, as you say it does not delete the mail.

The default template is in the etc/e-smith/templates-user/.procmailrc/ folder called 95spamsort.

This is the default .procmailrc that gets generated when you change back from geek to normal, or run the lat-procmail for new users.

I customised this and it worked for all normal users.

...

I am not sure what caused your spamd: error sorry.

...

It would be great to auto check if spamassassin and amavis are running and if not restart them, could this be called from the fetchmail/sendmail scripts whenever mail is sent or received?
 
...

What would be really handy would be a custom set of procmail recipes for a "special user", eg.. specialuser@mydomain.com

Imagine sending your "special user" an email from anywhere, with code in the body to check and restart services, check stats, check logs etc, and email results back. Procmail recipes to strip out the code and act on them.

Anyone know of such a project?

Regards

SteveB

Offline stancol

  • ***
  • 90
  • +0/-0
    • http://www.srcproductions.com
WOW
« Reply #41 on: February 01, 2004, 02:09:55 AM »
It works great on 5.6. Just installed it today. Wonderful wonderful scripts. The how to's are great too Thanks a bunch. :-P
What are the three dots for at the end of my signature file and why can't I get rid of them?These three dots right here >...

Unique_Rabbit

Breaks Webmail
« Reply #42 on: February 01, 2004, 03:31:34 AM »
Hey guys... I just built a brand new 6.0 final server... first thing to add was Jesper's SA package.  Then, to "watch" it, I added the MRTG package, which has SA built in (also from Jesper's site)...  Then added ClamAV, again, from Jesper's site.  Now, everything seems to work fine, except webmail won't let you log in... asks for username and password, but sits there for ever... never gets past it...

Did I miss something?

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Outgoing mail stays in Queue after SA install - HELP !
« Reply #43 on: February 01, 2004, 04:05:21 PM »
Hello All,

I am wondering if anyone can help with the following problem ?

I have done a fresh install of SME 6.0 set it up very nicely - all working.

I then applied Jespers script and have incoming email filtered / marked as spam etc.

The only problem seems to be that mail is not now being sent to the ISP SMTP relay. (You can see them lined up in the 'view mail log' in server manager)

I have set the times as every 15 mins but that hasnt helped at all. Things were working ok beforehand.

So a few questions :-

a) How to 'force' a mail send ?
b) Anything to check after installing SA ?

Many thanks for any time in replying !
"If you don't know what you want, you end up with a lot you don't."

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Spamassassin and ClamAV HowTo's for dummies
« Reply #44 on: February 01, 2004, 07:33:13 PM »
I dont know if this has any bearing on anything
but when I said I done a fresh install that was not strictly true - what I actually did was a backup
to desktop ona v5.6 and then a restore to the fresh 6.0 - however it did seem to run ok and SA was actually filtering incoming email.

I tried to maually run qmail-send and I think a run  script in another dir somewhere both of which said qmail was already running. I ran top and could not see any incidence of qmail.

As I am not sure how to interpret the log files is there anyone who can tell me how to best diagnose this issue and which logs to post or what to try next ?

Would it be better to do a re-install of 6.0 and a manual file copy of al the data / inputting users
and settings etc etc ???

Thanks for any suggestions.
"If you don't know what you want, you end up with a lot you don't."

Unique_Rabbit

Breaks Webmail
« Reply #45 on: February 03, 2004, 01:43:33 AM »
Hey guys... I just built a brand new 6.0 final server... first thing to add was Jesper's SA package.  Then, to "watch" it, I added the MRTG package, which has SA built in (also from Jesper's site)...  Then added ClamAV, again, from Jesper's site.  Now, everything seems to work fine, except webmail won't let you log in... asks for username and password, but sits there for ever... never gets past it...

Did I miss something?

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Spamassassin and ClamAV HowTo's for dummies
« Reply #46 on: February 03, 2004, 09:11:58 AM »
On my SA problem on previous page :-

OK - I did a new install of 6.0 final and manual restore of settings / users etc and restored the
data from HDD on a desktop.

Everything is wokring fine.

I discovered that the ISP I am using in the UK
(www.uk2.net) is using SA on their FREE mailboxes
and configurable from the web interface.

I created an acount and am using that to colect from.

I am reluctant to install Jespers script now but will do on my own test server when I get around to it.

I suspect the problems where possibly to do with my restore from a 5.6 system (that had several mods applied to it) on top of 6.0 - maybe I was asking for trouble ?

Some people said just run the upgrade option but I wanted to make sure 6.0 was working and stable for this a.m. so people can get some work done :)

I think then - a fresh clean install is probably the best way to go :)
"If you don't know what you want, you end up with a lot you don't."

gargola

Problem during installation
« Reply #47 on: April 26, 2004, 05:15:58 PM »
Hi,

I have to install this script couple of times, however  for an uncertain reason it doesn´t seem to work ok, at least in my system. I get the following error during the installation, any possible solution?

Thanks a lot!
gargol.-


[root@b30a root]# sh razor_patch.sh
Now update and patch Razor2 to work with SpamAssassin 2.60
--17:18:59--  http://sme.swerts-knudsen.dk/downloads/SpamAssassin/razor/Razor2_236.tar
           => Razor2_236.tar.3'
Resolving b30a... done.
Connecting to b30a[172.20.46.90]:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 184,320 [application/x-tar]

100%[===========================================================>] 184,320       25.11M/s    ETA 00:00

17:18:59 (25.11 MB/s) - Razor2_236.tar.3' saved [184320/184320]

--17:18:59--  http://sme.swerts-knudsen.dk/downloads/SpamAssassin/razor/Razor2.patch
           => Razor2.patch.3'
Resolving b30a... done.
Connecting to b30a[172.20.46.90]:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 2,911 [text/plain]

100%[===========================================================>] 2,911          2.78M/s    ETA 00:00

17:18:59 (2.78 MB/s) - Razor2.patch.3' saved [2911/2911]

patching file Client/Agent.pm
Hunk #1 succeeded at 981 (offset 12 lines).
patching file Client/Config.pm
Hunk #1 succeeded at 333 (offset 10 lines).
patching file Client/Core.pm
Hunk #1 succeeded at 218 (offset 2 lines).
Updating Pyzor database...
downloading servers from http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x
Traceback (most recent call last):
  File "/usr/bin/pyzor", line 4, in ?
    pyzor.client.run()
  File "/usr/lib/python2.2/site-packages/pyzor/client.py", line 934, in run
    ExecCall().run()
  File "/usr/lib/python2.2/site-packages/pyzor/client.py", line 175, in run
    download(config.get('client', 'DiscoverServersURL'), servers_fn)
  File "/usr/lib/python2.2/site-packages/pyzor/client.py", line 943, in download
    urllib.urlretrieve(url, outfile)
  File "//usr/lib/python2.2/urllib.py", line 80, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "//usr/lib/python2.2/urllib.py", line 210, in retrieve
    fp = self.open(url, data)
  File "//usr/lib/python2.2/urllib.py", line 178, in open
    return getattr(self, name)(url)
  File "//usr/lib/python2.2/urllib.py", line 292, in open_http
    h.endheaders()
  File "//usr/lib/python2.2/httplib.py", line 695, in endheaders
    self._send_output()
  File "//usr/lib/python2.2/httplib.py", line 581, in _send_output
    self.send(msg)
  File "//usr/lib/python2.2/httplib.py", line 548, in send
    self.connect()
  File "//usr/lib/python2.2/httplib.py", line 532, in connect
    raise socket.error, msg
IOError: [Errno socket error] (111, 'Connection refused')
razor_patch.sh: service: command not found
Update and Patch completed.

Offline gasparraposo

  • 16
  • +0/-0
    • http://www.gasjen.com
Spamassassin and ClamAV HowTo's for dummies
« Reply #48 on: April 28, 2004, 12:42:35 AM »
hi there Jesper, i dont know if you remember me. I send you emails one off sometimes. Well i am putting this one out for everyone. I have to say you guys really know your stuff though.

Here is there problem.

I am running SME6 beta3
Installed the Spamassassin from the site http://sme.swerts-knudsen.dk/ and i dont see any errors. this is supposed to be automatically detacting the spam and putting it in the junkmail folder.
well it is coming up in the inbox and it does say spam 7.16 in the subject line. What am i do about this now. Is there anyway that i can have it delete itsleft automatically?

Next > how does it differenciate between my friends email and junk mail. Will it also delete my friends email at times. How can i rectify that.

> some emails are still coming up in the inbox undetected.

> Am i supposed to be seeying something in the user-manager when i install the spam assassin?

Please help
...