Spamassassin

Discussion in 'Installation/Configuration' started by guidovanh, Feb 27, 2006.

  1. guidovanh

    guidovanh Member

    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?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's OK. You can return to the prompt by pressing [ctrl] + c
     
  3. tarndt

    tarndt New Member

    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

    ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please execute:

    ls -la /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/
     
  5. tarndt

    tarndt New Member

    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.
     
  6. Hans

    Hans Moderator ISPConfig Developer

    One more hint

    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:
     
    Last edited: Aug 25, 2006
  7. falko

    falko Super Moderator ISPConfig Developer

    That's the normal behaviour - spamassassin is waiting for input (e.g. a mail message). Normally you pipe email messages through it.
     
  8. tarndt

    tarndt New Member

    /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?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Have a look at the directories in /home/admispconfig/ispconfig/tools/spamassassin.
     
  10. tarndt

    tarndt New Member

    What should I be looking for here? All looks well. It just appears as though postfix is not piping the mail through spamassassin.
     
  11. Rocky

    Rocky Member

    You have to make sure that you have the Spamfilter option checked under ISP Manger -> Website -> User & Email -> User -> Spamfilter & Antivirus.
     
  12. tarndt

    tarndt New Member

    I have confirmed this.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please go to the home directory of a user where you have spamassassin enabled and execute:

    ls -la

    and post the output here.
     
  14. tarndt

    tarndt New Member

    Code:
    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
    
     
  15. falko

    falko Super Moderator ISPConfig Developer

    What's in .procmailrc, .spamassassin.rc, and .user_prefs?
     
  16. tarndt

    tarndt New Member

    .procmailrc
    Code:
    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

    Code:
    # 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

    Code:
    # 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
    # "[email protected]", "*@isp.com", or "*.domain.net" will all work.
    # whitelist_from        [email protected]
    # 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.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  18. tarndt

    tarndt New Member

    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.
     
  19. falko

    falko Super Moderator ISPConfig Developer

    It's a bit unusual, but should work.
    What's the output of
    Code:
    ls -la /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin
    ?
    What's the output of
    Code:
    /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin -V
    ?
     
  20. tarndt

    tarndt New Member

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

    Code:
    -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

    Code:
    SpamAssassin version 3.1.3
      running on Perl version 5.8.8
    
     

Share This Page