ASSP fedora 5

Discussion in 'HOWTO-Related Questions' started by galaxyboss, Feb 20, 2007.

  1. galaxyboss

    galaxyboss New Member

    hi
    I was installing ASSP
    http://www.howtoforge.com/antispam_smtp_proxy

    I have fedora 5
    I stop in to
    Code:
    update-rc.d assp defaults
    then I try to skip it and do the code
    Code:
    cat > /etc/logcheck/ignore.d.server/assp << "EOF"
    ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ assp\[[0-9]+\]: *
    EOF
    and also I had error there

    Code:
    -bash: /etc/logcheck/ignore.d.server/assp: No such file or directory
    
    what is wrong ?
    thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You get the error because the init script was not created. Please reun theis command:

    Code:
    cat > /etc/init.d/assp << "EOF"
    #!/bin/sh -e
    
    # Start or stop ASSP
    #
    # Ivo Schaap <[email protected]>
    
    PATH=/bin:/usr/bin:/sbin:/usr/sbin
    
    case "$1" in
    
        start)
            echo -n "Starting the Anti-Spam SMTP Proxy"
            cd /usr/share/assp
            perl assp.pl
        ;;
    
        stop)
            echo -n "Stopping the Anti-Spam SMTP Proxy"
            kill -9 `ps ax | grep "perl assp.pl" | grep -v grep | awk '{ print $1 }'`
        ;;
    
        restart)
            $0 stop || true
            $0 start
        ;;
       
        *)
        echo "Usage: /etc/init.d/assp {start|stop|restart}"
        exit 1
        ;;
    
    esac
    
    exit 0
    EOF
     
  3. galaxyboss

    galaxyboss New Member

    the update-rc.d is not found ,

    I did exactly script code as you mention:
    but the problem is here:
    Code:
    [root@server1 ~]# chmod 755 /etc/init.d/assp
    [root@server1 ~]# update-rc.d assp defaults
    -bash: update-rc.d: command not found
    [root@server1 ~]#
    
    the update-rc.d is not found ,
    as i mentioned I am running fedora, and assp is in /etc/init.d/
    and I can run it
    Code:
     /etc/init.d/assp start
    
    and then its working but not as Daemon!

    anyidea, also how to check if its working...?:confused:
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The errors you get result in the fact that the file was not created properly. Please run the command again as I posted above.
     
  5. galaxyboss

    galaxyboss New Member

    what about this error
    Code:
    [root@server1 init.d]# cat > /etc/logcheck/ignore.d.server/assp << "EOF"
    > ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ assp\[[0-9]+\]: *
    > EOF
    -bash: /etc/logcheck/ignore.d.server/assp: No such file or directory
    [root@server1 init.d]#
    
    what is the meaning of
    HTML:
    Set the permissions.
    
    chmod 755 /etc/init.d/assp
    
    and add it to the default runlevel.
    
    update-rc.d assp defaults
    
    Here is a treat for logcheck users.
    
    cat > /etc/logcheck/ignore.d.server/assp << "EOF"
    ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ assp\[[0-9]+\]: *
    EOF
    
    Now you get mail what the heck is going on.
    
     
  6. galaxyboss

    galaxyboss New Member

    I found what is the problem
    as I mentioned I am running fedora, I found small how to ASSP for fedora:
    http://fedoranews.org/contributors/keith_howanitz/assp/

    how ever I just need the last 2 steps:
    1- create update spam data base
    2- start on boot

    I think for fedora users they need just to do :
    Code:
    vi /etc/cron.daily/update_assp
    add
    Code:
    #!/bin/sh
    # update_assp
    # place this file in /etc/cron.daily/ to update the
    # assp database each night
    BASE=/usr/share/assp
    cd $BASE
    # Rebuild the spam database
    /usr/bin/perl /$BASE/rebuildspamdb.pl
    this to rebuild the spam database each night

    now
    To start ASSP on boot, add the following to end of /etc/rc.local
    Code:
    /usr/bin/perl /usr/share/assp/assp.pl /usr/share/assp
    
    so I will start testing it right now :D:rolleyes: :p
    and many thanks for your replies ;)
     
    Last edited: Feb 20, 2007
  7. falko

    falko Super Moderator Howtoforge Staff

    The update-rc.d command is for Debian based systems only. On Fedore, you must use chkconfig - e.g.

    Code:
    chkconfig --levels 235 [I]name_of_init_script[/I] on
     
  8. galaxyboss

    galaxyboss New Member

    falko thanks

    thank you falko

    but assp seems not support this command:
    Code:
    [root@server1 ~]# chkconfig --levels 235 assp on
    service assp does not support chkconfig
    [root@server1 ~]#
    but I think
    Code:
    To start ASSP on boot, add the following to end of /etc/rc.local
    Code:
    
    /usr/bin/perl /usr/share/assp/assp.pl /usr/share/assp
    
    
    sis the job

    btw, assp work @ my server and this is great

    once again thanks ;)
     

Share This Page