|
|
LibAntispam Installation
Here, we explain how to install LibAntispam in your system, and how to patch and install an MTA (Mail Transport Agent) with LibAntispam support.
NOTE: In this example the MTA and the HTTP servers run in the same machine, but you can put the http-server in another machine and export LibAntispam configurations to your Mail Exchange servers using shells-scripts and nfs, sftp, scp, etc. Into LibAntispam distribution example/sharing_configurations directory you will find a tested script shell with use instructions. NOTE #1: You SHOULD change the DirectoryIndex directive (in httpd.conf file) to LibAntispam-GUI work correctly: From: DirectoryIndex index.html index.html.var To: DirectoryIndex index.html index.html.var index.cgi NOTE #2: Don't forget to uncomment this line in httpd.conf file too: AddHandler cgi-script .cgi NOTE #3: The /usr/local/www/data/scfantispam directory (in ssl.conf file) SHOULD have this options (see in examples/apache-2.x): Options +MultiViews -Indexes -FollowSymLinks +SymLinksIfOwnerMatch +IncludesNoExec +ExecCGI Example: <Directory "/usr/local/www/data/scfantispam"> AllowOverride FileInfo AuthConfig Limit Options Options +MultiViews -Indexes -FollowSymLinks +SymLinksIfOwnerMatch +IncludesNoExec +ExecCGI <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept> </Directory> You can only modify the file Makefile.include: I recommend keeping all default values, except ANTISPAM_WWW_URL (your secure https virtual host URL), VALID_CALLER_USERNAME (the pseudo-user that your http-server is running) and VALID_CALLER_GROUPNAME (the pseudo-group that your http-server is running). These values are required if you plan to use LibAntispam-GUI. You SHOULD create the group antispam in /etc/groups file, i.e: antispam::34: If you use a MTA system that use non-root pseudo-user to run, you SHOULD add this pseudo-user in antispam group as follow: For MeTA1: antispam::34:meta1s For Exim: antispam::34:exim For Postfix: antispam::34:postfix Execute the 'make' command to compile LibAntispam and LibAntispam-GUI. It will compile the libVBMcgi that LibAntispam-GUI needs too. Now, as a root user, do 'make install'. This command will install LibAntispam (static and shared libraries, headers files and the default configuration files templates), libVBMcgi (static and shared libraries and headers files) and LibAntispam-GUI support programs. It will also create all the directories that are needed. The installation creates LibAntispam default configuration files, LibAntispam-GUI default directories, and the Admin-MTA account, so that you can manage the LibAntispam facilities using a friendly web interface. You will be asked to create a new non-empty password for the Admin-MTA account. Also, some scripts are created (in /usr/local/www/scripts), which are useful to help you create, at once, massive user configuration accounts for all users of your system. After compile your MTA (see below), you should copy and edit (using vi, emacs, etc) the configuration template files. Another option is to edit the default configurations using the LibAntispam-GUI interface (in this case, you do not need to copy or rename the template files). It is recommended to see the link Configuration in the left menu before edit the configurations files! Patching your MTA to work with LibAntispamSendmail-8.14.xDownload the last Sendmail-8.14.x source distribution from Sendmail Consortium and unpack the source code (i.e. tar xzvf sendmail.8.14.3.tar.gz). Download the last LibAntispam patch for Sendmail from the Downloads link in the left menu, and copy it into the unpacked Sendmail source distribution. Apply the patch (i.e. patch -p0 < sendmail-8.14.x-LibAntispam-1.2.0.patch). In Sendmail source code distribution, go to the directory devtools/Site and create a customized site.config.m4 file. Add the following three lines (you can find a site.config.m4 example in the LibAntispam source distribution, in the directory examples/MTAs/sendmail-8.14.x) to the file: APPENDDEF(`confINCDIRS',`-I/usr/local/include') APPENDDEF(`confLIBDIRS',`-L/usr/local/lib') APPENDDEF(`confLIBS',`-lantispam') No further configurations is required for LibAntispam use. Compile Sendmail (i.e. ./Build) and install it (i.e. ./Build install and ./Build force-install) and go to cf/cf directory, and generate a new sendmail.cf file and a new submit.cf file (you will find two templates, sendmail.mc e submit.mc, in the directory examples/MTAs/sendmail-8.14.x in the LibAntispam source distribution). Generate the *.cf files and copy them to /etc/mail directory. Start Sendmail process, as explained in the Sendmail's documentation: /usr/sbin/sendmail -L sm-mta -bd -q15m /usr/sbin/sendmail -L sm-msp-queue -Ac -q15m MeTA-1.xDownload the last Meta-1.x source distribution from MeTA1 - Message Transfer Agent and unpack the source code (i.e. tar xzvf meta1-1.0.PreAlpha41.0.tar.gz). Download the last LibAntispam patch for MeTA1 from the Downloads link in the left menu, and copy it into the unpacked MeTA1 source distribution. Apply the patch (i.e. patch -p0 < MeTA1-1.0.PreAlpha41.0-LibAntispam-1.2.0.patch). Compile MeTA1 (i.e. ./configure && make) and install it (i.e. make install). There is a meta1.conf sample file in the patch distribution source package, it's strongly recommended that you use it due LibAntispam GrayList need that 'processes' option be set as anything between 4 and 10 (these values are only suggestions) due the internal thread implementation of MeTA1 (see "Processes and Threads" in MeTA1 manual! No further configurations is required for LibAntispam use. Exim-4.xDownload the last Exim-4.x source distribution from The Exim Home Page and unpack the source code (i.e. tar xzvf exim.4.74.tar.gz). Download the last LibAntispam patch for Exim from the Downloads link in the left menu, and copy it into the unpacked Exim source distribution. Apply the patch (i.e. patch -p0 < exim-4.74-LibAntispam-1.2.0.patch). To compile Exim with LibAntispam support, use the Makefile.local (and change it to your needs). If you don't want to use this Makefile.local, change your Makefile.local to add LibAntispam support (see README.TXT in the patch source package), i.e.:
LOOKUP_INCLUDE=-I/usr/local/include
LOOKUP_LIBS=-L/usr/local/lib -lantispam
So, Compile and install Exim.Use (and change before) the sample file configure.basic that you will find in the patch source package. Run Exim as the instruction in Exim source distribution and be happy. Postfix-2.8.xDownload the last Postfix-2.8.x source distribution from Postfix Home Page and unpack the source code (i.e. tar xzvf postfix.2.8.0.tar.gz). Download the last LibAntispam patch for Postfix from the Downloads link in the left menu, and copy it into the unpacked Postfix source distribution. Apply the patch (i.e. patch -p0 < postfix-2.8.0-LibAntispam-1.2.0.patch). To compile Postfix, see the INSTALL file in its source distribution package. There is a main.cf sample configuration file that you can use to configure Postfix to run correctly with LibAntispam. NOTE: Independently of the MTA that you use, the basic configuration approach for all them is disable all native antispam rules (except that who restrict the relay of the messages, i.e. close any open-relay possibility) to give to LibAntispam all control of system antispam mechanisms. To know how to configure LibAntispam, go to the link Configuration in the left menu. |
|
Copyright © 2002-2011 Rafael Jorge Csura Szendrodi |