Er, sorry. Try to rename the /usr/local/libexec/clapf/maillog.pl script
to /usr/local/libexec/clapf/clapf-maillog.pl.

Then try to copy init.d/clapf.ubuntu to /etc/init.d/clapf, and
start it.

Janos

On Sun, 04 Sep 2011 22:17:42 +0200, Xavier Rosenfeld wrote:
Sorry but I found this on my system /usr/local/sbin/clapf
But it is not in any of my init script !! How to start it ?

Am I right ?

Best regards,
Xavier
Le 04/09/2011 22:10, Xavier Rosenfeld a écrit :

Hello,

My init script /etc/init.d/clapf start maillog.pl perhaps it is the problem ? I have got also the /etc/init.d/clapf-maillog init script but it does not start because root@mailgw01:~/clapf-nightly/contrib/zombie# /etc/init.d/clapf-maillog start Starting clapf mail log collector service:: clapf-maillogstart-stop-daemon: unable to stat /usr/local/libexec/clapf/clapf-maillog.pl (No such file or directory)
 failed!
root@mailgw01:~/clapf-nightly/contrib/zombie#


ls -la /usr/local/libexec/clapf
total 144
drwxr-xr-x 2 root staff  4096  4 sept. 21:59 .
drwxr-sr-x 3 root staff  4096  4 sept. 18:53 ..
-rwxr-xr-x 1 root root    258  4 sept. 21:59 check_clapf.sh
-rwxr-xr-x 1 root root   2552  4 sept. 21:59 clapf_admin.sh
-rwxr-xr-x 1 root root  38652  4 sept. 20:04 clapf-postgrey
-rwxr-xr-x 1 root root    350  4 sept. 19:07 clapf-rrd-create.sh
-rwxr-xr-x 1 root root 796 4 sept. 19:07 clapf-rrd-graph-oneline.sh
-rwxr-xr-x 1 root root    822  4 sept. 19:07 clapf-rrd-graph.sh
-rwxr-xr-x 1 root root    234  4 sept. 19:07 clapf-rrd-update.sh
-rwxr-xr-x 1 root root   2036  4 sept. 19:07 clapf-stat.run.sh
-rwxr-xr-x 1 root root   1596  4 sept. 21:59 db_init.sh
-rwxr-xr-x 1 root root   3307  4 sept. 21:59 db_train.sh
-rwxr-xr-x 1 root root   1968  4 sept. 21:59 ldap_sync.php
-rwxr-xr-x 1 root root  14043  4 sept. 21:59 maillog.pl
-rwxr-xr-x 1 root root   1256  4 sept. 21:59 prepare.pl
-rwxr-xr-x 1 root root  13278  4 sept. 21:59 prepare-sql
-rwxr-xr-x 1 root root   2259  4 sept. 19:07 process_syslog.pl
-rwxr-xr-x 1 root root 2626 4 sept. 21:59 quarantine-daily-report.php
-rwxr-xr-x 1 root root    496  4 sept. 21:59 shrink.pl
-rwxr-xr-x 1 root root   2839  4 sept. 21:59 summary.php
-rwxr-xr-x 1 root root    895  4 sept. 21:59 uribl.pl


I use clapf-nightly because 0.4.7.1 don't work for me ;(
.....................
...........
/usr/bin/install -c -m 0644 ./template.virus /usr/local/share/clapf
make[1]: quittant le répertoire « /root/clapf-0.4.7.1/templates »
Making install in history
make[1]: entrant dans le répertoire « /root/clapf-0.4.7.1/history »
echo "please run /usr/local/share/clapf/mail.sql"
please run /usr/local/share/clapf/mail.sql
/usr/bin/install -c -m 0755 ./maillog.pl /usr/local/libexec/clapf
/usr/bin/install -c -m 0644 ./history-purge-sqlite3.sql /usr/local/share/clapf /usr/bin/install: impossible d'évaluer « ./history-purge-sqlite3.sql »: Aucun fichier ou dossier de ce type (this is french in english not such file or directory)
make[1]: *** [install] Erreur 1
make[1]: quittant le répertoire « /root/clapf-0.4.7.1/history »
make: *** [install-recursive] Erreur 1
root@mailgw01:~/clapf-0.4.7.1#

My install is just for testing it is a base install of debian which is not in production.

Papp i try the strace comand with the maillog.pl script but does not work, is there a binary file who should be bind the 10025 port ?
I use dhclient to add an ip adress from my dhcp server

Hope that's we help.

Regards,
Xavier Rosenfeld

Le 04/09/2011 21:24, Janos SUTO a écrit :
Hello Xavier,

I'm a bit confused. The maillog script should NOT bind to any port. Its purpose is to read the maillog file, and put the extracted data into a database. However the clapf daemon should definitely bind to a tcp port (10025 by default).

It seems that all the utilities are running but the clapf daemon itself. So please start it (eg. /etc/init.d/clapf start), and see the maillog, and the output of 'ps'.

Best regards,

Janos

On Sun, 04 Sep 2011 21:13:15 +0200, Xavier Rosenfeld wrote:
Hello,

I have some troubles with the how to :


http://clapf.acts.hu/wiki/doku.php/howto:debian_6.0.1_clapf_mysql_clamd

I can't bind the 10025 port.

I set verbosity to 5 but log does not speak to much :

Sep  4 21:07:43 mailgw01 clapf-maillog[3933]: terminated
Sep  4 21:07:48 mailgw01 clapf-maillog[4126]: started
Sep  4 21:07:58 mailgw01 clapf-maillog[4126]: creating partitions:
p20110904 (less than 1315249678)
Sep 4 21:07:58 mailgw01 clapf-maillog[4126]: dropping partitions: p20110805
root@mailgw01:~/clapf-nightly/contrib/zombie#

Here my clapf.conf :

##not in the how to, I added myself to force 10025 port binding.
verbosity=5
; clapf will listen here
listen_addr=127.0.0.1
listen_port=10025

; where postfix is waiting for connections from clapf
postfix_addr=127.0.0.1
postfix_port=10026

; pass spam to this smtp server. If you have one computer set these variables
; to the same values as postfix_addr and postfix_port.
spam_smtp_addr=127.0.0.1
spam_smtp_port=10026
##end
clamd_socket=/var/run/clamav/clamd.ctl
clapf_header_field=X-Clapf-spamicity:
clapf_spam_header_field=X-Clapf-spamicity: Yes
group_type=1
historydb=clapfhistory
historypid=/var/run/clapf/clapf-maillog.pid
hostid=mailgw.rosenfeld.fr
locale=
maillog=/var/log/mail.log
max_message_size_to_filter=100000
max_number_of_tokens_to_filter=6000
memcached_servers=127.0.0.1
memcached_ttl=86400
mynetwork=127.0.0.1,null
mysqlsocket=/var/run/mysqld/mysqld.sock
mysqluser=clapf
mysqlpwd=x115103
mysqldb=clapf
mysql_connect_timeout=2
our_signo=X-Anti-Backscatter: xxxxxxxxxxxx
penalize_embed_images=0
penalize_images=0
penalize_octet_stream=0
possible_spam_limit=0.8000
possible_spam_subject_prefix=[spam???]
quarantine_dir=/var/lib/clapf/quarantine
skipped_received_ips=
spam_overall_limit=0.92
spaminess_oblivion_limit=0.99
spaminess_of_strange_language_stuff=0.88
store_metadata=1
store_only_spam=1
surbl_domain=multi.surbl.org,multi.uribl.com
training_mode=0
update_counters_to_memcached=1
update_tokens=1
use_antispam=1
verbosity=1
##end

root@mailgw01:~/clapf-nightly/contrib/zombie# ps -ef |grep clapf
nobody    1815     1  0 20:05 ?        00:00:00
/usr/local/libexec/clapf/clapf-postgrey
--pidfile=/var/lib/clapf/postgrey/clapf-postgrey.pid --daemonize -i
127.0.0.1:10023 --user=nobody --group=nogroup
--dbdir=/var/lib/clapf/postgrey --greylist-text=greylisted for 300
seconds, try again later
root      3933     1  0 20:57 ?        00:00:00 /usr/bin/perl
/usr/local/libexec/clapf/maillog.pl /usr/local/etc/clapf.conf
root      4071  1748  0 21:06 pts/0    00:00:00 grep clapf
root@mailgw01:~/clapf-nightly/contrib/zombie# netstat -auntp
Connexions Internet actives (serveurs et établies)
Proto Recv-Q Send-Q Adresse locale          Adresse distante
Etat        PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*
LISTEN      685/portmap
tcp        0      0 0.0.0.0:22              0.0.0.0:*
LISTEN      1478/sshd
tcp        0      0 0.0.0.0:25              0.0.0.0:*
LISTEN      2438/master
tcp        0      0 0.0.0.0:33979           0.0.0.0:*
LISTEN      705/rpc.statd
tcp        0      0 127.0.0.1:10023         0.0.0.0:*
LISTEN      1815/postgrey --gre
tcp        0      0 127.0.0.1:10026         0.0.0.0:*
LISTEN      2438/master
tcp        0      0 127.0.0.1:3306          0.0.0.0:*
LISTEN      1349/mysqld
tcp        0     52 192.168.1.49:22         192.168.1.48:60777
ESTABLISHED 1746/0
tcp6       0      0 :::80                   :::*
LISTEN      900/apache2
tcp6       0      0 :::22                   :::*
LISTEN      1478/sshd
udp        0      0 0.0.0.0:34353           0.0.0.0:*
         705/rpc.statd
udp        0      0 0.0.0.0:68              0.0.0.0:*
         872/dhclient
udp        0      0 0.0.0.0:111             0.0.0.0:*
         685/portmap
udp        0      0 0.0.0.0:881             0.0.0.0:*
         705/rpc.statd

Any help would be very appreciate.

Best regards,
Xavier Rosenfeld






Reply via email to