PDA

View Full Version : A tutorial for installing spamassassin and clam (av)


pascal
07-10-2004, 07:46 AM
Hello,

This tutorial aim to protect your mail server against spam and virus

First, Original of this document is available at http://www.pipeline.com.au/staff/mbowe/isp/webmail-server.htm

The one I give you is the same but I change somethings to do it works fine on our Interworx box.

We will install :
Razor
Dcc
Spamassassin
Clam
Tnef unpacker
Maildrop
Qmail-scanner

On my box everything si working fine, but it doesn't mean it will work on yours. Be carreful, do it only if you understand what you are doing.

For any questions I can try to help you or maybe Paul could to

The file attached is a zip file containing a html page

So good install

@+++
squalito

timryberg
09-29-2004, 09:34 PM
Thanks, I'll take a look at this later and let you know how it works out.

oaf357
09-30-2004, 12:02 PM
I'm very curious to see how well this works.

eDixon
09-30-2004, 01:45 PM
Im hoping this makes it onto the user docs page.

pascal
09-30-2004, 03:51 PM
Im hoping this makes it onto the user docs page.

User docs page ???

Not sure to understand

I remember all of you that a new spamassassin has been released :
SpamAssassin 3.0

I install it and change the tutoriel as well to reflete the last release (the config files is modified a little)

Pascal

pascal
09-30-2004, 04:43 PM
Ok

I have upgraded my spamassassin release to the spamassasin 3.00 release without pbm. (I followed up this tutorial). The only thing is about the local.cf configuration file

I added :
NOTE for VERSION = 3.00 owner
- The "rewrite_subject" and "subject_tag" configuration options were deprecated and are now removed.
Instead, using "rewrite_header Subject [your desired setting]".
e.g. rewrite_subject 1 subject_tag ****SPAM(_SCORE_)****
becomes rewrite_header Subject ****SPAM(_SCORE_)****


For VERSION < 3.00 owner
# Allow SpamAssassin to rewrite the subject line of any messages it classifies as spam
rewrite_subject 1
# This is the value that will prepended to the subject line of messages classified as spam
subject_tag [SPAM]

That all

Hope it will help you

Pascal

timryberg
09-30-2004, 06:41 PM
User docs page ???

Pascal

Sago now allows users to submit "whitepapers" for publication on the websitee. Go to Support => Documentation

I have a tutorial there (the InterWorx DNS Tutorial), and my FAQ will go there arfer InterWorx 1.8.1 is released and Chris or someone has the chance to check it for facts.

I have a couple others in the system that are draft (NOT PUBLISHED or viewable on the site), as does Chris.

You said you modified this from someone else's work so Chris would probably want that person's permission to put it here on the site.

pascal
09-30-2004, 06:55 PM
Yep and it's why for I do not put it on my faq page, or something like that.
I Only give the links and write modifications to make it working on an iworx box.

let us return to cesar what belongs to cesar (heu maybe not like that in english :rolleyes: )

newmind
10-02-2004, 10:42 AM
Hey all.

Sqailto, thanks so much for the SA tutorial. I tried the QmailRocks tutorial, but couldn't manage to get it working; with your tutorial, on the other hand, I was up and running in three hours -- very cool.

Question(s) for you, and anyone else who wants to chime in:

Is there a way to prevent Qmail-scanner/SpamAssassin/ClamAv from processing non-existent messages?

90% of the Spam/Virii my server processes is going to mail accounts that don't exist!

Furthermore, of these emails sent to non-existent accounts, I routinely receive messages from qmail-scanner (I believe), informing me, the administrator, that there was a problem with the email:

"problem 'Disallowed characters found in MIME headers'"

What do I care?!!! First of all, the message was sent to a non-existent account; secondly, it's very likely a virus of some sort; thirdly, I'm getting notified about these "problem" emails, which is essentially spam as far as I'm concerned.

OK, I'm sure I'm not alone here. Anyone found a solution?

Definitely let me know....

--Noah

pascal
10-06-2004, 06:30 PM
I try to install this tutorial on my new box (I already successfuly install it on my old one)

but I have some pbm.
I begin with razor.

As I had some pbm with MCPAN I decid to install the razor-agent-sdk (which one contains all prerequisites) and not to use cpan

When I launch the Perl Makefile.pl I have a warning

[root@padawan razor-agents-sdk-2.03]# perl Makefile.PL
Warning: prerequisite Digest::SHA1 1 not found.
.....


but it goes on

The pbm is that I have error in make test

make[1]: Entering directory `/usr/local/src/razor-agents-sdk-2.03/Digest-MD5-2.20'
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
t/badfile....ok
t/files......Wide character in subroutine entry at t/files.t line 108.
t/files......dubious
Test returned status 25 (wstat 6400, 0x1900)
DIED. FAILED tests 1-5
Failed 5/5 tests, 0.00% okay
t/md5-aaa....ok
t/utf8.......ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/files.t 25 6400 5 5 100.00% 1-5
Failed 1/4 test scripts, 75.00% okay. 5/266 subtests failed, 98.12% okay.
make[1]: *** [test_dynamic] Error 29
make[1]: Leaving directory `/usr/local/src/razor-agents-sdk-2.03/Digest-MD5-2.20'
make: *** [test] Error 2


If I look in MCPAN (perl -MCPAN -e shell) and try to install the famous Digest::SHA1 it says :
[code]
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Wed, 06 Oct 2004 01:18:53 GMT
Digest::SHA1 is up to date.
[/quote]

More I found the Digest::SHA1 in the razor-agent-sdk library
So I decided to try to install it manually

perl Makefile.pl without pbm
Make without pbm
but the Make test failed

[root@padawan Digest-SHA1-2.01]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/badfile....Digest::SHA1 object version 2.01 does not match bootstrap parameter
2.10 at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 249.
Compilation failed in require at t/badfile.t line 6.
BEGIN failed--compilation aborted at t/badfile.t line 6.
t/badfile....dubious
Test returned status 255 (wstat 65280, 0xff00)
t/sha1.......Digest::SHA1 object version 2.01 does not match bootstrap parameter
2.10 at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 249.
Compilation failed in require at t/sha1.t line 3.
BEGIN failed--compilation aborted at t/sha1.t line 3.
t/sha1.......dubious
Test returned status 255 (wstat 65280, 0xff00)
FAILED--2 test scripts could be run, alas--no output ever seen
make: *** [test_dynamic] Error 2


Erffff I'm really becoming crazy !!!!

I gave you a tutorial on how install razor/clamav/spamassassin, it worked on my previous box, but on this one nothing to do !!!!!!!!!

I'm not going to reinstall the box again :\

If somebody could help me I will very appreciate :)

timryberg
10-06-2004, 07:03 PM
I try to install this tutorial on my new box (I already successfuly install it on my old one)




Was your old box a different OS than your new one (RH9, CentOS)? A different OS will sometimes behave differently. I've been getting similar errors and am looking into MCPAN and if I fine anything that helps I will let you know.

Tim

pascal
10-06-2004, 07:33 PM
cool

Maybe you already know how to uninstall a perl module,

I mean I think there is to time the disgest::SHA1 perl module.

One time installed by MCPAN and one time tried to install by razor-agents-sdk
So I'd like to uninstall which one installed by mcpan

Thanks Tim

timryberg
10-06-2004, 07:42 PM
Actually I haven't figured THAT out yet. I'm more looking for a way to refresh perl's database of installed modules (sort of like you refresh your RPM database) because I'm installing modules (or at least I think I am) but when I try to install an RPM that wants them it says they aren't there. I'll keep you posted.

pascal
10-06-2004, 08:14 PM
Tim

Perl modules works like that
for example Digest::SHA1 will install SHA1.pm in /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Digest/
and in /usr/lib/perl5/site_perl/5.8.0/Digest/

so you can look in these perl directories

When you use CPAN, it saves the files you installed (or try to) in /root/.cpan/build/

Sometimes if it is only a .pm to install without C compilation you could move the .pm file directly in the perl directory

For our example I could move SHA1.pm directly in /usr/lib/perl5/site_perl/5.8.0/Digest/ and /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Digest/

(not sure for this last)

Here is what I know

Good luck, and I let yu inform too :)

pascal
10-06-2004, 08:20 PM
ok for my problem

it seems that SHA1 is installed with version 2.10 and razor-agent-sdk try to install the version 2.01

In /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Digest/SHA1.pm , SHA1 is version 2.10
In /usr/lib/perl5/site_perl/5.8.0/Digest/SHA1.pm , SHA1 is version 2.01

Could I copy/replace directly SHA1.pm version 10 in /usr/lib/perl5/site_perl/5.8.0/Digest/SHA1.pm

pascal
10-06-2004, 09:07 PM
I have copied all files from /usr/lib/perl5/site_perl/5.8.0/Digest/
to /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Digest/

And now it seems to be ok. (??? !!! ??? erf )

pascal
10-06-2004, 09:30 PM
Ok I continue.....

Well I have installed DCC (take this one : http://www.rhyolite.com/anti-spam/dcc/source/dcc-dccproc-1.2.54.tar.Z) without pbm

Héhé a new PBM....
I get spamassassin 3.0
perl Makefile.PL said me that it doesn't find POD2MAN
I have POD2MAN in /bin/

I know this pod2man pbm, you have to enter
[root@padawan Mail-SpamAssassin-3.0.0]# export LANG=en_US

Well I remimber you I am on CentOS, so I'll not continue to create 1 bilion posts but I promise that I'll update the Tutorial to install all the last versions of razor/dcc/clam/spamassassin/... on a CentOS distrib

Next stage

Pascal

pascal
10-06-2004, 11:05 PM
Ok it's finish, 6:00 am french time and everything is up and running :)

It was very difficult at the beginning but when we have all the perls modules it's OK

I'll update the tutorial for CentOS but for spamassassin 3.0 too and all the others last versions !!!

Stay tuned

Pascal
ps could a modo move this thread in Hack / tips / trick forum

IWorx-Chris
10-07-2004, 07:39 PM
Pascal, do you even need the razor-sdk? It was my understanding that it was only necessary to get all the perl mods in a bundle as opposed to having to download them individually. I'd say either get all the perl mods yourself *or* uninstall SHA1 and have the razor sdk reinstall an older one.

Chris

pascal
10-08-2004, 07:03 PM
Well chris, in fact, I began to install all perl modules individualy because I didn't know razor-sdk

As it didn't work, and as I found the razor-sdk, I decided to install this last one.

The fact is, by doing that, I have installed two differents SHA1 version (I don(I didn't know how uninstall a perl module, only delete the pm files ?)

It's why I had a lot of pbm with perl
I deleted all pm files in /Digest and installed razor-sdk. And now everything is fine

Now I have another pbm on a CGI perl module but it's in an other thread ( here (http://interworx.info/forums/showthread.php?t=236) )
Thanks

IWorx-Chris
10-10-2004, 02:39 PM
The fact is, by doing that, I have installed two differents SHA1 version (I don(I didn't know how uninstall a perl module, only delete the pm files ?)


Yes, I'd assume deleting all the relavent .pm files and module directories would do the trick pascal.

Chris

ignacius
01-04-2005, 11:15 PM
Dear friends,
We have our dedicated server in sago networks.We have installed interworx CP1.7.1.It is working fine.We are getting lots of spam mails and viruses in our client side.And also lots of double bounce[spams] are forwarded to the nodeworx admin ID.

I downloaded source rpms of pamassassin,clamav,qmail-scanner,tnef,maildrop package provided by iworx from
http://updates.interworx.info/iworx/SRPMS/experimental/
and compiled and built rpm binaries for spamassassin,clamav and tnef and installed them.

as

#cd /usr/src/redhat/RPMS/i386/

#wget http://updates.interworx.info/iworx/SRPMS/experimental/SpamAssassin-2.63-100.iworx.src.rpm

#rpm -i SpamAssassin-2.63-100.iworx.src.rpm

#rpmbuild -bb spamassassin.spec

#wget http://updates.interworx.info/iworx/SRPMS/experimental/clamav-0.74-100.iworx.src.rpm

#rpm -i /usr/src/redhat/RPMS/i386/clamav-0.74-100.iworx.src.rpm

#rpmbuild -bb clamav.spec

#wget http://updates.interworx.info/iworx/SRPMS/experimental/qmail-scanner-1.22-100.iworx.src.rpm

#wget http://updates.interworx.info/iworx/SRPMS/experimental/tnef-1.2.3.1-100.iworx.src.rpm

#wget http://updates.interworx.info/iworx/SRPMS/experimental/maildrop-1.6.3-100.iworx.src.rpm

#rpm -i qmail-scanner-1.22-100.iworx.src.rpm

#rpm -i maildrop-1.6.3-100.iworx.src.rpm

#rpm -i tnef-1.2.3.1-100.iworx.src.rpm

#rpmbuild –bb tnef.spec

#rpm -i clamav-0.74-100.iworx.i386.rpm

#rpm -i clamav-devel-0.74-100.iworx.i386.rpm

#rpm -i SpamAssassin-2.63-100.iworx.i386.rpm

#rpm -i perl-Mail-SpamAssassin-2.63-100.iworx.i386.rpm

#rpm -i SpamAssassin-2.63-100.iworx.i386.rpm

#rpm -i tnef-1.2.3.1-100.iworx.i386.rpm

But, the build process for maildrop and qmail-scanner failed as:

# rpmbuild -bb maildrop.spec
error: Failed build dependencies:
vpopmail >= 5.3.8 is needed by maildrop-1.6.3-100.iworx
courier-imap is needed by maildrop-1.6.3-100.iworx

# rpmbuild -bb qmail-scanner.spec
error: Failed build dependencies:
qmail is needed by qmail-scanner-1.22-100.iworx


These are the iworx packages that are available.
[root@server1 SPECS]# rpm -qa |grep iworx
proftpd-1.2.8p-1.iworx
qmail-pop3d-toaster-1.03-1.iworx
ucspi-tcp-toaster-doc-0.88-1.iworx
interworx-nodeworx-1.7.1-1.iworx
djbdns-1.05-1.iworx
clamav-0.74-100.iworx
SpamAssassin-2.63-100.iworx
webalizer-2.01_10-1.iworx
daemontools-toaster-doc-0.76-1.iworx
interworx-siteworx-1.7.1-1.iworx
daemontools-toaster-0.76-1.iworx
mod_watch-4.3-1.iworx
vpopmail-toaster-doc-5.4.0-1.iworx
interworx-1.7.1-1.iworx
perl-Mail-SpamAssassin-2.63-100.iworx
httpd-devel-2.0.40-21.5.iworx
ucspi-tcp-toaster-0.88-1.iworx
qmail-toaster-doc-1.03-1.iworx
tnef-1.2.3.1-100.iworx
SpamAssassin-tools-2.63-100.iworx
qmail-toaster-1.03-1.iworx
httpd-manual-2.0.40-21.5.iworx
vpopmail-toaster-5.4.0-1.iworx
courier-imap-toaster-doc-2.1.2-1.iworx
courier-imap-toaster-2.1.2-1.iworx
clamav-devel-0.74-100.iworx

And I upgraded mysql from 3.1 to 4.1.17:
MySQL-client-4.1.7-0
MySQL-shared-4.0.20-0
MySQL-server-4.1.7-0

The problem that I could not install maildrop and qmail-scanner is because of all packages are iworx toaster packages instead of ordinary iworx packages.Please suggest a solution to install and configure maildrop and qmailscanner and make to work with TOASTER IWORX packages[My thinking may be wrong].
If this process wont work please suggest good alternatives to avoid spam and scan virus using clam scan.
I posted a ticket and the interworx staff asked to upgrade iworx CP to 1.8.1. I dont want to experiment and get hindered.We are using redhat 9.


thank you,
Ignacius

timryberg
01-04-2005, 11:37 PM
you may need to use the FORCE option (-f) to override the dependancies. As I understand it qmail-toaster is a variation of qmaail and should work the same.

Since you're dealing with qmail and that's his specialty I'll let Chris handle ot of it doesn't work ;-)

timryberg
01-04-2005, 11:51 PM
I posted a ticket and the interworx staff asked to upgrade iworx CP to 1.8.1. I dont want to experiment and get hindered.We are using redhat 9.

There's nothing to fear about the upgrade, just use the script they give you to go from 1.7.1 to 1.8.0 and then do a yum update to go to 1.8.1. It was very painless for me and I'm by no means a Linux guru. The script leads you right through it, and as I recall i didn't have to do anything but type two lines of code:

wget http://updates.interworx.info/iworx/scripts/171to180.sh
sh 171to180.sh or ./171to180.sh

and let it do it's work.

Tim

relative links below:

http://interworx.info/forums/showthread.php?t=268

http://interworx.info/forums/showthread.php?t=166

http://updates.interworx.info/iworx/scripts/171to180.txt

ignacius
01-05-2005, 02:13 AM
Dear friend,

I did as per:
http://interworx.info/iworx-cp/support/docs/install/script.php
http://updates.interworx.info/iworx/RPMS/
http://updates.interworx.info/iworx/scripts/iworx-cp-install.sh

Now the packages have been upgraded properly:
the list of packages is:
yum-conf-1.0-101.iworx
daemontools-0.76-100.iworx
apr-devel-0.9.4-100.iworx
ucspi-tcp-0.88-100.iworx
rrdtool-1.0.48-100.iworx
php-iworx-4.3.9-2.iworx
libmcrypt-2.5.7-100.iworx
webalizer-2.01_10-100.iworx
mod_ssl-2.0.51-101.iworx
libmcrypt-devel-2.5.7-100.iworx
httpd-devel-2.0.51-101.iworx
qmail-pop3d-1.03-101.iworx
interworx-nodeworx-1.8.1-1.iworx
perl-Mail-SpamAssassin-2.63-100.iworx
djbdns-1.05-100.iworx
mysql-client-4.0.21-104.iworx
apr-util-0.9.4-100.iworx
mysql-server-4.0.21-104.iworx
vpopmail-5.4.0-100.iworx
httpd-2.0.51-101.iworx
curl-devel-7.12.1-100.iworx
mysql-shared-4.0.21-104.iworx
tnef-1.2.3.1-100.iworx
SpamAssassin-tools-2.63-100.iworx
mod_watch-4.3-100.iworx
apr-util-devel-0.9.4-100.iworx
proftpd-1.2.10-100.iworx
courier-imap-2.1.2-100.iworx
php-4.3.9-101.iworx
analog-5.32-100.iworx
httpd-iworx-2.0.51-1.iworx
interworx-1.8.1-1.iworx
mysql-devel-4.0.21-104.iworx
interworx-siteworx-1.8.1-1.iworx
httpd-manual-2.0.51-101.iworx
php-mysql-4.3.9-101.iworx
ucspi-tcp-doc-0.88-100.iworx
qmail-doc-1.03-101.iworx
courier-imap-doc-2.1.2-100.iworx
php-imap-4.3.9-101.iworx
qmail-1.03-101.iworx
apr-0.9.4-100.iworx
yum-headers-1.0-100.iworx
curl-7.12.1-100.iworx
perl-Compress-Zlib-1.33-101.iworx
perl-Archive-Zip-1.13-101.iworx
awstats-6.1-101.iworx
mysql-iworx-4.0.21-3.iworx
daemontools-doc-0.76-100.iworx
vpopmail-doc-5.4.0-100.iworx
php-pear-4.3.9-101.iworx
rrdtool-devel-1.0.48-100.iworx

The sites created through siteworx account are available ..
But, those that were mapped a DNS record were not available...
I wanted to run localhost mysqld daemon.I get :

# /etc/init.d/mysqld start
It shows OK
But,Output of /etc/init.d/mysqld status:-
mysqld dead but subsys locked

Now,I am unable to connect to mysql databases in localhost.But, the databases are as such in /var/lib/mysql DIRECTORY...
When i did:
cat /var/log/mysqld.log
it shows
050105 02:15:09 mysqld started
050105 2:15:09 Fatal error: Can't open privilege tables: File '/usr/share/mysql
/charsets/?.conf' not found (Errcode: 2)
050105 2:15:09 Aborting

How do I make the mysqld service in /etc/init.d/mysqld work properly?


thank you,
Ignacius

ignacius
01-05-2005, 03:11 AM
Dear friend,
Everything works perfectly now:
1] I edited the /etc/httpd/conf/httpd.conf file and enters the virtualhost,and other left out settings from the /etc/httpd/conf/httpd.conf.bak [previous apache's config file]
#/etc/init.d/httpd restart
Now, the sites that were directly mapped to IP [only DNS record and no site worx account] are working.

2]I downloaded mysql-4.1.17 source RPM from experimental section of iworx packages and installed it and ran:
#cd /usr/src/redhat/SPECS
#rpmbuild -bb mysql.spec

And I installed[rpm -U] all the created rpms except mysql-max

Now the mysqld is working perfectly.

================================================== ======
I have a doubt:
[root@server1 conf]# rpm -qa | grep mysql
mysql-server-4.1.7-100.iworx
mysql-shared-4.0.21-104.iworx
mysql-bench-4.1.7-100.iworx
mysql-devel-4.1.7-100.iworx
php-mysql-4.3.9-101.iworx
mysql-iworx-4.0.21-3.iworx
mysql-client-4.1.7-100.iworx

When I try to install /usr/src/redhat/RPMS/i386/mysql-shared-4.1.7-100.iworx.i386.rpm, i get:

[root@server1 i386]# rpm -U mysql-shared-4.1.7-100.iworx.i386.rpm
error: Failed dependencies:
libmysqlclient.so.12 is needed by (installed) php-iworx-4.3.9-2.iworx
libmysqlclient.so.12 is needed by (installed) proftpd-1.2.10-100.iworx
libmysqlclient.so.12 is needed by (installed) php-mysql-4.3.9-101.iworx


Should I leave it as such or I have to install it any way. If so, How to?


thank you,
Ignacius

pascal
01-05-2005, 04:05 PM
Hello,

for me you should have it in
/usr/lib/libmysqlclient.so.12

Did you tried to install the mysql-shared-4.0.21-104.iworx (current version in interworx-cp 1.8.1) rather than the experimental one ?

For me your pbm is like a dependency pbm. I recommand you to install all the "normal" rpm delivers with a 1.8.1 interworx-cp release.

mysql-server-4.0.21-104.iworx
mysql-shared-4.0.21-104.iworx
mysql-client-4.0.21-104.iworx
mysql-iworx-4.0.21-3.iworx
php-mysql-4.3.9-101.iworx
mysql-devel-4.0.21-104.iworx

But if you absolutly need last rpms, I think that the MySQL-shared-compat rpm may help you.

About spamassassin and clamav I have them running on my interworx box.
In the experimental interworx acrhves it is not the last version of spamassassin (the last one is 3.x)

If you need help to install them (but from the tar.gz not the .rpm) I may help you


Pascal

ignacius
01-05-2005, 07:49 PM
Dear pascal,
You please give the procedure that you followed to install spamasssassin,clamav and qmail-scanner fron source. I will try to replicate the same procedure using the rpms provided by iworx.
If it doesnt work, lI will do that by installing all these from source.

thank you,
Ignacius

pascal
01-05-2005, 08:26 PM
Dear pascal,
You please give the procedure that you followed to install spamasssassin,clamav and qmail-scanner fron source. I will try to replicate the same procedure using the rpms provided by iworx.
If it doesnt work, lI will do that by installing all these from source.

thank you,
Ignacius

Hello,

I understand that you find it's better to use rpm rather than .tar as it allow you to easily uninstall pgms, whitout thinking about dependancies.

The only problem you will have is that the spamassasin, clamav, ... have not the same version. My tuto is for a spamassassin 3 and not 2.x

anyway, here is my tuto in zipped html format (see the attachment)

Personnaly I update the tcpserver wrapper rather than the /etc/rc.d/init.d/smtp file to change the qmail queue to the qmail-scanner queue. Also I update the /service/smtp/run file to increase softlimit

Do not hesitate if you have any pbm

Pascal

ignacius
01-09-2005, 11:46 PM
Dear friend,
I am going to install as per your tutorial...

thank you,
Ignacius

ignacius
01-10-2005, 05:14 AM
Dear pascal,
I installed pyrazor instead of razor and did the necessary changes in spamassassin config file.
Everything has been setup.
I have completed till:
edit the file /service/smtp/run : vi /service/smtp/run and change to 15000000

Begining of the file here ......< >

exec /usr/bin/softlimit -m 15000000 \
/usr/bin/tcpserver -v -R -S -p -x $TCP_CDB -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
$RBLSMTPD $BLACKLIST $SMTPD $HOSTNAME $VCHKPW /bin/true 2>&1

The rest of the file .... < >

Now define what mail is to be sent through the Qmail-Scanner.


I could'nt understand:
if you don't want to virusscan all mail, you can selectively nominate which IP ranges should or shouldn't be checked by setting the QMAILQUEUE variable via your /etc/tcprules.d/tcp.smtp file rather than inside the supervise/smtp/run file. Refer to the Qmail-Scanner home page for setup examples.

I personnaly update the tcpserver wrapper rather than the /etc/rc.d/init.d/smtp file

Edit /etc/tcprules.d/tcp.smtp : vi /etc/tcprules.d/tcp.smtp

127.:allow,RELAYCLIENT=""
192.168.0.:allow,RELAYCLIENT="",RBLSMTPD="";QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
213.30.139:allow,RELAYCLIENT="",QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"


The adress 127 absolutly need to be present 127.
The parameter RBLSMTPD="" put SpamAssassin OFF et QMAILQUEUE gives the qmail queue to use (here the qmail-scanner queue)

Then you have to rebuild the database

# tcprules /etc/tcprules.d/smtp.cdb /etc/tcprules.d/tcp.smtp.tmp < /etc/tcprules.d/tcp.smtp

Please help how to setup the last step in detail

thank you
ignacius

pascal
01-10-2005, 09:42 AM
Dear pascal,

Please help how to setup the last step in detail

thank you
ignacius

lol no pbm

just do this :

vi /service/smtp/run


and change to 15000000

you should have something like this


exec /usr/bin/softlimit -m 15000000 \
/usr/bin/tcpserver -v -R -S -p -x $TCP_CDB -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
$RBLSMTPD $BLACKLIST $SMTPD $HOSTNAME $VCHKPW /bin/true 2>&1


then you have to tell to qmail that you want your emails must be checked with spamassassin

to do this there could have few methods, but I did this one.
So just edit your vi /etc/tcprules.d/tcp.smtp


vi /etc/tcprules.d/tcp.smtp


then add the qmail-scanner queue rather than the qmail one. Like this all mails will be checked with spamassassin

So just add these lines


127.:allow,RELAYCLIENT=""
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"


For your information :
- The adress 127 absolutly need to be present 127.
- The parameter RBLSMTPD="" put SpamAssassin OFF et QMAILQUEUE gives the qmail queue to use (here the qmail-scanner queue)

After this, you have to rebuild your tcp wrapper rules.

so just do


tcprules /etc/tcprules.d/smtp.cdb /etc/tcprules.d/tcp.smtp.tmp < /etc/tcprules.d/tcp.smtp


that's it

But normally a new release of interworx-cp should be done this month with this feature enable (spamassassin). It should be better than this solution as I think they'll use withelist management in a database. So maybe it'd be better to wait just few days.

Pascal

ignacius
01-10-2005, 12:12 PM
Dear pascal,
As per the tutorial and your instructions I have completed the installation and setup properly.
Thank you very much.[If any problem means I will reply in this same thread]

thank you,
Ignacius

ignacius
06-13-2005, 03:58 AM
Dear pascal,
I am about to upgrade iworx packages. I manually setup clamav,pyrazor,dcc,spamassassin,qmail-scanner in iworx 1.8[as per previous messages posted by me in this thread].
Is it ok to upgrade as such through yum-update?

This is the output of my yum update:

[root@qxsys root]# yum update
Gathering header information file(s) from server(s)
Server: Red Hat Linux 9 - Base
Server: Red Hat Linux 9 - Fedora Legacy - Updates
Server: InterWorx-CP - Generic
Server: InterWorx-CP - Red Linux 9
Server: Red Hat Linux 9 - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
.......Unable to satisfy dependencies
Package spamassassin-tools needs perl-Mail-SpamAssassin = 3.0.2-1, this is not available.
[root@qxsys root]# rpm -qa | grep ssass
spamassassin-tools-3.0.2-1
spamassassin-3.0.2-1
perl-Mail-SpamAssassin-3.0.2-1

What might be the problem?

thank you,
N.Nallu Ignacius

pascal
06-13-2005, 04:13 AM
Te best way in this case is to open a support ticket :)

ignacius
06-15-2005, 01:52 AM
Dear pascal,
I reverted things back to the previous state.

Contents removed to remove pyzor:
/usr/bin/pyzor
/usr/bin/pyzord
/usr/lib/python2.2/site-packages/pyzor
/usr/lib/python2.2/site-packages/pyzor/__init__.py
/usr/lib/python2.2/site-packages/pyzor/client.py
/usr/lib/python2.2/site-packages/pyzor/server.py
/usr/lib/python2.2/site-packages/pyzor/__init__.pyc
/usr/lib/python2.2/site-packages/pyzor/client.pyc
/usr/lib/python2.2/site-packages/pyzor/server.pyc
/usr/share/doc/pyzor
/usr/share/doc/pyzor/usage.html

Except this I had created rpms using checkinstall.
Contents removed to remove dcc:
rpm -e dcc-dccproc-1.2.66-1

Contents removed to remove spamassasin:
rpm -e perl-Mail-SpamAssassin-3.0.2-1
rpm -e spamassassin-3.0.2-1
rpm -e spamassassin-tools-3.0.2-1
userdel spamd
groupdel spamd
rm -R -f /home/spamd
rm /etc/sysconfig/spamassassin
chkconfig --del spamd
rm /etc/rc.d/init.d/spamd

Contents removed to remove clamav:
userdel clamav
groupdel clamav
rm -R -f /home/clamav
chkconfig --del clamd
rm /etc/rc.d/init.d/clamd

Removed the cron entry for : 0 * * * * /usr/local/bin/freshclam --quiet -l /var/log/clam-update.log

Contents removed to remove qmail scanner:
rpm -e maildrop-1.7.0-1.i386.rpm
rpm -e tnef-1.2.3.1-1.i386.rpm
userdel qscand
groupdel qscand
rm -R -f /home/qscand
rm /var/spool/qmailscan/qmail-scanner-queue-version.txt
rm /var/qmail/bin/qmail-scanner-queue.pl

Removed the cron entry for : 0 0 * * * /var/qmail/bin/qmail-scanner-queue.pl -z

edited /service/smtp/run and removed the line:QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE




edited /etc/tcprules.d/tcp.smtp and changed to
127.:allow,RELAYCLIENT=""
:allow

tcprules /etc/tcprules.d/tcp.smtp.cdb /etc/tcprules.d/tcp.smtp.tmp < /etc/tcprules.d/tcp.smtp

edited /etc/init.d/smtp and removed the lines :
export QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
/etc/rc.d/init.d/spamd start
/etc/rc.d/init.d/clamd start


After this I ran yum update from console. Now, I have upgraded to iworx2.0.3 and all service are working fine.

Now, I have a simple doubt : Is the folder /var/spool/qmailscan used by interworx qmail scanner;
For your reference, the directory content is:
[root@XYZ qmailscan]# ls -la
total 428
drwxrwx--- 5 552 547 4096 Jun 13 06:21 .
drwxr-xr-x 13 root root 4096 Jan 10 05:24 ..
-rw------- 1 552 root 21 Jun 13 00:00 qmail-scanner-queue-version.txt
drwxrwx--- 5 552 547 4096 Jan 10 05:24 quarantine
-rw-r----- 1 552 nofiles 12288 Jan 21 03:50 quarantine-attachments.db
-rw-rw---- 1 552 547 4390 Jan 21 01:48 quarantine-attachments.txt
-rw-rw---- 1 552 547 385989 Jun 13 06:12 quarantine.log
drwx------ 3 552 root 4096 Jun 13 06:35 tmp
lrwxrwxrwx 1 552 547 31 Jan 10 05:24 viruses -> /var/spool/qmailscan/quarantine
lrwxrwxrwx 1 552 547 35 Jan 10 05:24 viruses.log -> /var/spool/qmailscan/quarantine.log
drwxrwx--- 5 552 547 4096 Jan 10 05:24 working

Is it safe to remove the directory /var/spool/qmailscan. The timestamp values show that the folders and their content have not changed after the upgradation.


bye,
[B]N.Nallu Ignacius

pascal
06-15-2005, 03:19 AM
Everything seems to be good

You could let Pyzor and Dcc as they are not in the Iworx Spamassassin install, anyway.

Pascal