PDA

View Full Version : ASSP fedora 5


galaxyboss
20th February 2007, 01:09
hi
I was installing ASSP
http://www.howtoforge.com/antispam_smtp_proxy

I have fedora 5
I stop in to
update-rc.d assp defaults

then I try to skip it and do the 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

-bash: /etc/logcheck/ignore.d.server/assp: No such file or directory


what is wrong ?
thanks

till
20th February 2007, 09:14
You get the error because the init script was not created. Please reun theis command:

cat > /etc/init.d/assp << "EOF"
#!/bin/sh -e

# Start or stop ASSP
#
# Ivo Schaap <ivo@lineau.nl>

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

galaxyboss
20th February 2007, 12:19
I did exactly script code as you mention:
but the problem is here:

[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
/etc/init.d/assp start

and then its working but not as Daemon!

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

till
20th February 2007, 12:24
The errors you get result in the fact that the file was not created properly. Please run the command again as I posted above.

galaxyboss
20th February 2007, 13:07
what about this error
[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
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.

galaxyboss
20th February 2007, 13:31
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 :
vi /etc/cron.daily/update_assp
add
#!/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

/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 ;)

falko
21st February 2007, 23:55
The update-rc.d command is for Debian based systems only. On Fedore, you must use chkconfig - e.g.

chkconfig --levels 235 name_of_init_script on

galaxyboss
22nd February 2007, 09:50
thank you falko

but assp seems not support this command:
[root@server1 ~]# chkconfig --levels 235 assp on
service assp does not support chkconfig
[root@server1 ~]#

but I think 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 ;)