PDA

View Full Version : Spamassassin


guidovanh
27th February 2006, 20:55
My manual describes about Spamassassin to run after the installation of ISPConfig:

/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamasssassin

and tells:

If errors appear you have to install some Perl modules:, followed by a list how to do that.

When I enter above mentioned command, the cursor comes onto a new line and no more.

I think this is ok, there are no errors. Is that right?

till
27th February 2006, 21:02
Yes, that's OK. You can return to the prompt by pressing [ctrl] + c

tarndt
25th August 2006, 16:22
What about if you run:
/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamasssassin

And you get the error:
bash: /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamasssassin: No such file or directory

?

till
25th August 2006, 17:56
Please execute:

ls -la /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/

tarndt
25th August 2006, 23:00
Nevermind LOL I see the axtra s in spassassin...My spam assassin is not working however. Anything I can try? When I try the line mentioned (dropping the extra 's') I do get the blank line and need to Ctrl+C to get out.

Hans
25th August 2006, 23:10
Sometimes Spamassassin is not running after you started your server because in the file /etc/default/spamassassin there is a line like:

ENABLED=0

To enable Spamassassin after a reboot you have to change this line into:

ENABLED=1

You can try this, maybe it helps you one step further...

:rolleyes:

falko
26th August 2006, 14:33
I do get the blank line and need to Ctrl+C to get out.
That's the normal behaviour - spamassassin is waiting for input (e.g. a mail message). Normally you pipe email messages through it.

tarndt
29th August 2006, 18:11
/etc/default/spamassassin does not exist, howver the spamd daemon is running, and I can also execute spamassissin and spamc.

Anything else I can look for?

falko
30th August 2006, 16:28
Have a look at the directories in /home/admispconfig/ispconfig/tools/spamassassin.

tarndt
30th August 2006, 17:43
What should I be looking for here? All looks well. It just appears as though postfix is not piping the mail through spamassassin.

Rocky
30th August 2006, 20:31
You have to make sure that you have the Spamfilter option checked under ISP Manger -> Website -> User & Email -> User -> Spamfilter & Antivirus.

tarndt
30th August 2006, 23:03
I have confirmed this.

till
31st August 2006, 08:47
Please go to the home directory of a user where you have spamassassin enabled and execute:

ls -la

and post the output here.

tarndt
1st September 2006, 14:09
drwxr-xr-x 4 web1_ web1 4096 Aug 23 14:28 .
drwxr-xr-x 4 web1_www web1 4096 Aug 22 13:56 ..
-rw-r--r-- 1 root root 103 Aug 24 13:21 .antivirus.rc
-rw-r--r-- 1 root root 769 Aug 24 13:21 .autoresponder.rc
-rw------- 1 web1_ web1 22 Aug 24 13:21 .forward
-rw-r--r-- 1 root root 67866 Aug 24 13:21 .html-trap.rc
-rw-r--r-- 1 root root 3889 Aug 24 13:21 .local-rules.rc
drwx------ 2 web1_ web1 4096 Aug 22 13:56 Maildir
-rw-r--r-- 1 root root 204 Aug 24 13:21 .mailsize.rc
-rw-r--r-- 1 root root 419 Aug 24 13:21 .procmailrc
-rw-r--r-- 1 root root 656 Aug 24 13:21 .quota.rc
-rw-r--r-- 1 root root 1141 Aug 24 13:21 .spamassassin.rc
-rw-r--r-- 1 root root 2006 Aug 24 13:21 .user_prefs
-rw-r--r-- 1 root root 32 Aug 24 13:21 .vacation.msg
drwxrwxr-x 2 web1_ web1 4096 Aug 22 13:56 web

falko
1st September 2006, 16:26
What's in .procmailrc, .spamassassin.rc, and .user_prefs?

tarndt
7th September 2006, 17:02
.procmailrc
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
ORGMAIL=$MAILDIR

INCLUDERC=/var/www/web1/user/web1_/.mailsize.rc
## INCLUDERC=/var/www/web1/user/web1_/.quota.rc
## INCLUDERC=/var/www/web1/user/web1_/.antivirus.rc
## INCLUDERC=/var/www/web1/user/web1_/.local-rules.rc
## INCLUDERC=/var/www/web1/user/web1_/.html-trap.rc
INCLUDERC=/var/www/web1/user/web1_/.spamassassin.rc
## INCLUDERC=/var/www/web1/user/web1_/.autoresponder.rc


.spamassassin.rc

# SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
# 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
| /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin --prefs-file=/var/www/web1/user/web1_/.user_prefs

# 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. (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 "/dev/null".
#:0:
#* ^X-Spam-Status: Yes
#/dev/null

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
:0
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "

:0 fhw
| sed -e '1s/^/F/'
}


and .user_prefs

# SpamAssassin user preferences file. See 'perldoc Mail::SpamAssassin::Conf'
# for details of what can be tweaked.
#*
#* Note: this file is not read by SpamAssassin until copied into the user
#* directory. At runtime, if a user has no preferences in their home directory
#* already, it will be copied for them, allowing them to perform personalised
#* customisation. If you want to make changes to the site-wide defaults,
#* create a file in /etc/spamassassin or /etc/mail/spamassassin instead.
################################################## #########################

# How many hits before a mail is considered spam.
required_score 5.0

rewrite_header Subject [SPAM]

# Whitelist and blacklist addresses are now file-glob-style patterns, so
# "friend@somewhere.com", "*@isp.com", or "*.domain.net" will all work.
# whitelist_from someone@somewhere.com
# whitelist_from

# blacklist_from

# URIBL support (see http://www.uribl.com)
# urirhssub URIBL_BLACK multi.uribl.com. A 2
# body URIBL_BLACK eval:check_uridnsbl('URIBL_BLACK')
# describe URIBL_BLACK Contains an URL listed in the URIBL blacklist
# tflags URIBL_BLACK net
# score URIBL_BLACK 3.0

# Add your own customised scores for some tests below. The default scores are
# read from the installed spamassassin rules files, but you can override them
# here. To see the list of tests and their default scores, go to
# http://spamassassin.org/tests.html .
#
# score SYMBOLIC_TEST_NAME n.nn

# Speakers of Asian languages, like Chinese, Japanese and Korean, will almost
# definitely want to uncomment the following lines. They will switch off some
# rules that detect 8-bit characters, which commonly trigger on mails using CJK
# character sets, or that assume a western-style charset is in use.
#
# score HTML_COMMENT_8BITS 0
# score UPPERCASE_25_50 0
# score UPPERCASE_50_75 0
# score UPPERCASE_75_100 0


Thank you for your continued support.

till
8th September 2006, 10:23
Is this the correct home directory of the user?

/var/www/web1/user/web1_/

It looks like your use has no username, only the web prefix.

tarndt
8th September 2006, 14:17
Yes, this is the correct user. I didn't specify a user name. I use this account to receive mail for email addresses such as sales@... support@... etc. and forward on to the appropriate individuals. (Like a DL). The account still receives mail and forwards it appropriately, does it require a username in order to work? I assumed not.

falko
8th September 2006, 18:59
Yes, this is the correct user. I didn't specify a user name.
It's a bit unusual, but should work.
What's the output of ls -la /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin?
What's the output of /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin -V?

tarndt
8th September 2006, 19:15
ls -la /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin

-rwxr-xr-x 1 admispconfig admispconfig 25380 Aug 12 22:41 /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin

/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin -V

SpamAssassin version 3.1.3
running on Perl version 5.8.8

falko
9th September 2006, 14:05
That's ok so SpamAssassin should be working fine.

tarndt
9th September 2006, 15:54
I'm certain it's not working... I get so much spam that used to be filtered by spamassassin but has been getting in since my last system reload... Only difference I can think of is that I am using postfix now instead of sendmail. I even tried enabling it globally for the entire system with no sucess.

Any other idea's?

till
9th September 2006, 17:30
Do you have any spamassassin headers in the emails?

tarndt
12th September 2006, 12:40
I have checked several messages and do not see Spam Assassin headers on any of them since I reloaded my system and put ISPConfig on it. I had it enabled globaly last time (And used Sendmail). I tried to enable SpamAssassin globaly by placing this line in /etc/procmailrc:

INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc


That doesn't appear to be working either. Any other suggestions?