Thread: [Amavisadmin-svn] SF.net SVN: amavisadmin: [41] amavisadmin/branches/documentation_1_0/docs/ instal
Status: Beta
Brought to you by:
streindl
From: <str...@us...> - 2007-01-22 17:33:57
|
Revision: 41 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=41&view=rev Author: streindl Date: 2007-01-22 09:33:48 -0800 (Mon, 22 Jan 2007) Log Message: ----------- Updates to installation guide Modified Paths: -------------- amavisadmin/branches/documentation_1_0/docs/installationguide.xml Modified: amavisadmin/branches/documentation_1_0/docs/installationguide.xml =================================================================== --- amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-21 16:45:08 UTC (rev 40) +++ amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-22 17:33:48 UTC (rev 41) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="US-ASCII"?> +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ <!ENTITY sreindl "Stephen Reindl"> @@ -15,7 +15,7 @@ <surname>Reindl</surname> - <address><street>Langster Str. 28</street> + <address><street>Langster Straße 28</street> <postcode>40668</postcode> <city>Meerbusch</city> <country>Germany></country></address> @@ -48,7 +48,17 @@ </legalnotice> <revhistory> - <revision><revnumber>0.1</revnumber><date>2007-01-20</date><authorinitials>sr</authorinitials><revdescription><para>Initial document</para></revdescription></revision> + <revision> + <revnumber>0.1</revnumber> + + <date>2007-01-20</date> + + <authorinitials>sr</authorinitials> + + <revdescription> + <para>Initial document</para> + </revdescription> + </revision> </revhistory> </articleinfo> @@ -193,30 +203,54 @@ url="http://www.ijs.si/software/amavisd/">Amavisd-new home page</ulink>. Please ensure to at least use version 2.4.1, as this version is at least from documentation point of view SQL save according to the current data - model. The following commands taken from the file - <filename>INSTALL</filename> that is part of the Amavisd-new - distribution explains how to download a particular version of the - software:</para> + model. For installation of amavisd-new and about how to setup SQL + storage and lookup, please refer to the following documentation + files:</para> - <screen><prompt>$ </prompt><userinput>curl -s -S -O http://www.ijs.si/software/amavisd/amavisd-new-<replaceable><version></replaceable></userinput><co id="sc-amavis-curl" /> -<prompt>$ </prompt><userinput>gzip -d -c amavisd-new-<replaceable><version></replaceable>.tar.gz | tar xvf -</userinput> -<computeroutput >amavisd-new-2.4.4 -amavisd-new-2.4.4/README_FILES -amavisd-new-2.4.4/helper-progs -amavisd-new-2.4.4/test-messages -amavisd-new-2.4.4/AAAREADME.first -amavisd-new-2.4.4/INSTALL + <itemizedlist> + <listitem> + <para><ulink + url="http://www.ijs.si/software/amavisd/INSTALL.txt">http://www.ijs.si/software/amavisd/INSTALL.txt</ulink> + describes how to download and install Amavisd-new in general</para> + </listitem> + + <listitem> + <para><ulink + url="http://www.ijs.si/software/amavisd/README.sql.txt">http://www.ijs.si/software/amavisd/README.sql.txt</ulink> + describes how to setup SQL access.</para> + </listitem> + </itemizedlist> + + <para>In addition, you have to make the PDP protocol available via + socket access. The PDP protocoll (see <ulink + url="http://www.ijs.si/software/amavisd/README.protocol.txt">http://www.ijs.si/software/amavisd/README.protocol.txt</ulink> + for reference) enables other applications to either perform SPAM/Virus + checks for mails or to release quarantined mails. To accomplish this, + the file <filename>/etc/amavisd.conf</filename> has to be adapted. The + following listing explains the changes in detail:</para> + + <programlisting>... +$inet_socket_port = (10024,<replaceable>10026</replaceable><co + id="pl-amavis-inet-socket-port" />); # listen on this local TCP port(s) (see $protocol) ... -tar: Read 4608 bytes from -</computeroutput> -<prompt>$ </prompt><userinput>cd amavisd-new-<replaceable><version></replaceable></userinput></screen> +$protocol='AM.PDP';<co id="pl-amavis-conf-protocol" /> +...</programlisting> - <calloutlist> - <callout arearefs="sc-amavis-curl"> - <para>Other tools like <command>wget</command> or downloading via - your favourite web browser should work also.</para> - </callout> - </calloutlist> + <calloutlist> + <callout arearefs="pl-amavis-inet-socket-port"> + <para>Please add here the port that should be used for communication + between AmavisAdmin and amavisd-new. This port number should be + selected with caution as there might be some inteference with other + application if you would select a port that is already in use by + another application.</para> + </callout> + <callout arearefs="pl-amavis-inet-socket-port"> + <para>This line defines the general protocol to be used for talking + to amavisd-new. As described above, the PDP-protocol is the right + value here.</para> + </callout> + </calloutlist> </section> </section> </article> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-25 20:27:19
|
Revision: 51 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=51&view=rev Author: streindl Date: 2007-01-25 12:27:15 -0800 (Thu, 25 Jan 2007) Log Message: ----------- installationguide.xml: * More text for the Modified Paths: -------------- amavisadmin/branches/documentation_1_0/docs/installationguide.xml Modified: amavisadmin/branches/documentation_1_0/docs/installationguide.xml =================================================================== --- amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-25 20:25:43 UTC (rev 50) +++ amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-25 20:27:15 UTC (rev 51) @@ -95,6 +95,14 @@ </listitem> <listitem> + <para>A Database server where the Amavisd-Server stores it's mails and + AmavisAdmin is doing the administration. For development <ulink + url="http://www.postgresql.org">PostgreSQL</ulink> version <ulink + url="http://www.postgresql.org/docs/8.1/static/index.html">8.1</ulink> + is used.</para> + </listitem> + + <listitem> <para><ulink url="http://www.ijs.si/software/amavisd/">Amavisd-new</ulink> as the SPAM and Virus filter engine. At least version 2.4.2 has to be @@ -106,14 +114,6 @@ </listitem> <listitem> - <para>A Database server where the Amavisd-Server stores it's mails and - AmavisAdmin is doing the administration. For development <ulink - url="http://www.postgresql.org">PostgreSQL</ulink> version <ulink - url="http://www.postgresql.org/docs/8.1/static/index.html">8.1</ulink> - is used.</para> - </listitem> - - <listitem> <para>The JDBC-driver suitable for your database system. As mentioned before the development is based on PostgreSQL, therefore the appropriate driver for the database server is located at <ulink @@ -257,6 +257,13 @@ <para>The first two password prompts are asking for the password for user <systemitem class="username">amavis</systemitem>, the last password prompt is asking for the superuser password.</para> + + <note> + <para>Please ensure to reload the configuration files by + restarting your postgres SQL server. Please refer to your local + PostgreSQL documentation for details about how to restart the + server.</para> + </note> </section> <section> @@ -354,11 +361,31 @@ <para>With the Amavisd-new distribution, a README-file is distributed that contains a sample data model. As this data model is mixed together with MySQL comments, a clean version for PostgreSQL is - provided in appendix <xref linkend="app-postgres-ddl" />. To apply - this file, please use the <command>\i</command> command while - executing <command>psql</command>:<screen><prompt>postgres=# </prompt><userinput>\i ddlfile.sql</userinput> -<computeroutput>...</computeroutput> -<prompt>postgres=#</prompt></screen></para> + provided in the distribution of AmavisAdmin. To execute this file, you + can pass the filename directly to the <command>psql</command> command + on the command line:<screen><prompt>sreindl@linux-fest:~> </prompt><userinput>psql --username=amavis --password amavis <<replaceable>create_tables.sql</replaceable> +</userinput><prompt>Password for user amavis: </prompt><replaceable><password></replaceable> +<computeroutput>...</computeroutput> <lineannotation>lots of output.</lineannotation> +<prompt>sreindl@linux-fest:~> </prompt></screen></para> + + <para>The file can be found in + <filename>db/postgres/create_tables.sql</filename>. After creating the + data model, some initial data has to be loaded to let Amavisd-new + start over:</para> + + <screen><prompt>sreindl@sreindl:~> </prompt><userinput>psql --username=amavis --password amavis <inital_load.sql</userinput> +<prompt>Password for user amavis: </prompt><userinput><replaceable><password></replaceable></userinput> +<computeroutput>... +</computeroutput><prompt>sreindl@linux-fest:~></prompt> </screen> + + <para>A more complete example with input data can be found in the + AmavisAdmin distribution in + <filename>db/postgres/initial_load.sql</filename>.</para> + + <para>As there're no local users defined in the database, the messages + are stored according to the <emphasis>catchall</emphasis> user. After + finalizing this step your database should be ready to run + amavisd-new.</para> </section> </section> @@ -417,185 +444,90 @@ value here.</para> </callout> </calloutlist> - </section> - </section> - <appendix id="app-postgres-ddl"> - <title>Sample PostgreSQL DDL script</title> + <para>Another part that has to be updated is the lookup and storage + section. Both sections define how and where to lookup user and policy + informartion and in addition where to store mails (either quarantined or + not, depending on the settings). The following example shows how to + define database lookups (the perl module DBI::Pg needs to be installed + for this):</para> - <para><screen linenumbering="numbered" width="132">-- local users -CREATE TABLE users ( - id SERIAL NOT NULL, -- unique id - priority integer NOT NULL DEFAULT '7', -- sort field, 0 is low prior. - policy_id integer unsigned NOT NULL DEFAULT '1', -- JOINs with policy.id - email varchar(255) NOT NULL UNIQUE, - fullname varchar(255) DEFAULT NULL, -- not used by amavisd-new - local char(1), -- Y/N (optional field, see note further down) - PRIMARY KEY (id); -); + <programlisting>... +@lookup_sql_dsn = + ( ['DBI:Pg:database=amavis', 'amavis', 'amavis'] ); + <lineannotation>The values used are matching the examples given above.</lineannotation> +... +@storage_sql_dsn = @lookup_sql_dsn; # none, same, or separate database +</programlisting> --- any e-mail address (non- rfc2822-quoted), external or local, --- used as senders in wblist -CREATE TABLE mailaddr ( - id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - priority integer NOT NULL DEFAULT '7', -- 0 is low priority - email varchar(255) NOT NULL UNIQUE -); + <para>Your settings might be different from the settings above, + especially if the database is located on a different host or other + settings might be different as well. For details please refer to the + Amavisd-new documentation.</para> --- per-recipient whitelist and/or blacklist, --- puts sender and recipient in relation wb (white or blacklisted sender) -CREATE TABLE wblist ( - rid integer unsigned NOT NULL, -- recipient: users.id - sid integer unsigned NOT NULL, -- sender: mailaddr.id - wb varchar(10) NOT NULL, -- W or Y / B or N / space=neutral / score - PRIMARY KEY (rid,sid) -); + <para>In addition the storage of mails has to be defined. It can be + individually set if mails of specific types (e.g. clean mail, virus, + ...) should be stored with mail contents or not. This settings should be + adjusted by your needs and available disk space. As the table that + contains the mail contents (table <database + class="table">quarantine</database>) is not accessed for read access by + amavisd-new, the performance depends on your write throughput of your + database server. The following list describes the important + configuration settings available and values which seem + reasonable:</para> -CREATE TABLE policy ( - id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - -- 'id' this is the _only_ required field - policy_name varchar(32), -- not used by amavisd-new, a comment + <variablelist> + <varlistentry> + <term>$clean_quarantine_method</term> - virus_lover char(1) default NULL, -- Y/N - spam_lover char(1) default NULL, -- Y/N - banned_files_lover char(1) default NULL, -- Y/N - bad_header_lover char(1) default NULL, -- Y/N + <listitem> + <para>If this variable will be set to sql, all message texts of + mails that have passed all checks successfully are stored in the + database.</para> + </listitem> + </varlistentry> - bypass_virus_checks char(1) default NULL, -- Y/N - bypass_spam_checks char(1) default NULL, -- Y/N - bypass_banned_checks char(1) default NULL, -- Y/N - bypass_header_checks char(1) default NULL, -- Y/N + <varlistentry> + <term>$virus_quarantine_method</term> - spam_modifies_subj char(1) default NULL, -- Y/N + <listitem> + <para>If this variable is set to sql, virus mail texts are stored + in the database. </para> + </listitem> + </varlistentry> - virus_quarantine_to varchar(64) default NULL, - spam_quarantine_to varchar(64) default NULL, - banned_quarantine_to varchar(64) default NULL, - bad_header_quarantine_to varchar(64) default NULL, - clean_quarantine_to varchar(64) default NULL, - other_quarantine_to varchar(64) default NULL, + <varlistentry> + <term>$banned_files_quarantine_method</term> - spam_tag_level float default NULL, -- higher score inserts spam info headers - spam_tag2_level float default NULL, -- inserts 'declared spam' header fields - spam_kill_level float default NULL, -- higher score triggers evasive actions - -- e.g. reject/drop, quarantine, ... - -- (subject to final_spam_destiny setting) - spam_dsn_cutoff_level float default NULL, - spam_quarantine_cutoff_level float default NULL, + <listitem> + <para>If this variable is set to sql, for mails that have been + rejected because of banned attachments (e.g. executable files, + ...), the mail text (including the attachments) is stored in the + database.</para> + </listitem> + </varlistentry> - addr_extension_virus varchar(64) default NULL, - addr_extension_spam varchar(64) default NULL, - addr_extension_banned varchar(64) default NULL, - addr_extension_bad_header varchar(64) default NULL, + <varlistentry> + <term>$spam_quarantine_method</term> - warnvirusrecip char(1) default NULL, -- Y/N - warnbannedrecip char(1) default NULL, -- Y/N - warnbadhrecip char(1) default NULL, -- Y/N - newvirus_admin varchar(64) default NULL, - virus_admin varchar(64) default NULL, - banned_admin varchar(64) default NULL, - bad_header_admin varchar(64) default NULL, - spam_admin varchar(64) default NULL, - spam_subject_tag varchar(64) default NULL, - spam_subject_tag2 varchar(64) default NULL, - message_size_limit integer default NULL, -- max size in bytes, 0 disable - banned_rulenames varchar(64) default NULL -- comma-separated list of ... - -- names mapped through %banned_rules to actual banned_filename tables -); + <listitem> + <para>if this variable is set to sql, the mail text for mails that + have been marked as SPAM are stored in the database.</para> + </listitem> + </varlistentry> + </variablelist> --- R/W part of the dataset (optional) --- May reside in the same or in a separate database as lookups database; --- REQUIRES SUPPORT FOR TRANSACTIONS; specified in @storage_sql_dsn --- --- Please create additional indexes on keys when needed, or drop suggested --- ones as appropriate to optimize queries needed by a management application. --- See your database documentation for further optimization hints. + <para>Usually only for viruses, banned attachments and SPAM mails this + setting should be touched. In addition please check the legal impact of + storing each and every mail in a database that is not directly + accessable to the users.</para> + </section> --- provide unique id for each e-mail address, avoids storing copies -CREATE TABLE maddr ( - id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - email varchar(255) NOT NULL UNIQUE, -- full mail address - domain varchar(255) NOT NULL -- only domain part of the email address - -- with subdomain fields in reverse -) ENGINE=InnoDB; + <section> + <title>AmavisAdmin</title> --- information pertaining to each processed message as a whole; --- NOTE: records with NULL msgs.content should be ignored by utilities, --- as such records correspond to messages just being processes, or were lost --- NOTE: with PostgreSQL, instead of a character field time_iso, please use: --- time_iso TIMESTAMP WITH TIME ZONE NOT NULL, --- NOTE: with MySQL, instead of a character field time_iso, one might prefer: --- time_iso TIMESTAMP NOT NULL DEFAULT 0, --- but the following MUST then be set in amavisd.conf: $timestamp_fmt_mysql=1 -CREATE TABLE msgs ( - mail_id varchar(12) NOT NULL PRIMARY KEY, -- long-term unique mail id - secret_id varchar(12) DEFAULT '', -- authorizes release of mail_id - am_id varchar(20) NOT NULL, -- id used in the log - time_num integer unsigned NOT NULL, -- rx_time: seconds since Unix epoch - time_iso char(16) NOT NULL, -- rx_time: ISO8601 UTC ascii time - sid integer unsigned NOT NULL, -- sender: maddr.id - policy varchar(255) DEFAULT '', -- policy bank path (like macro %p) - client_addr varchar(255) DEFAULT '', -- SMTP client IP address (IPv4 or v6) - size integer unsigned NOT NULL, -- message size in bytes - content char(1), -- content type: V/B/S/s/M/H/O/C: - -- virus/banned/spam(kill)/spammy(tag2) - -- /bad mime/bad header/oversized/clean - -- is NULL on partially processed mail - quar_type char(1), -- quarantined as: ' '/F/Z/B/Q/M - -- none/file/zipfile/bsmtp/sql/mailbox - quar_loc varchar(255) DEFAULT '', -- quarantine location (e.g. file) - dsn_sent char(1), -- was DSN sent? Y/N/q (q=quenched) - spam_level float, -- SA spam level (no boosts) - message_id varchar(255) DEFAULT '', -- mail Message-ID header field - from_addr varchar(255) DEFAULT '', -- mail From header field, UTF8 - subject varchar(255) DEFAULT '', -- mail Subject header field, UTF8 - host varchar(255) NOT NULL, -- hostname where amavisd is running - FOREIGN KEY (sid) REFERENCES maddr(id) ON DELETE RESTRICT -) ENGINE=InnoDB; -CREATE INDEX msgs_idx_sid ON msgs (sid); -CREATE INDEX msgs_idx_time_num ON msgs (time_num); --- alternatively when purging based on time_iso (instead of msgs_idx_time_num): --- CREATE INDEX msgs_idx_time_iso ON msgs (time_iso); - --- per-recipient information related to each processed message; --- NOTE: records in msgrcpt without corresponding msgs.mail_id record are --- orphaned and should be ignored and eventually deleted by external utilities -CREATE TABLE msgrcpt ( - mail_id varchar(12) NOT NULL, -- (must allow duplicates) - rid integer unsigned NOT NULL, -- recipient: maddr.id (dupl. allowed) - ds char(1) NOT NULL, -- delivery status: P/R/B/D/T - -- pass/reject/bounce/discard/tempfail - rs char(1) NOT NULL, -- release status: initialized to ' ' - bl char(1) DEFAULT ' ', -- sender blacklisted by this recip - wl char(1) DEFAULT ' ', -- sender whitelisted by this recip - bspam_level float, -- spam level + per-recip boost - smtp_resp varchar(255) DEFAULT '', -- SMTP response given to MTA - FOREIGN KEY (rid) REFERENCES maddr(id) ON DELETE RESTRICT, - FOREIGN KEY (mail_id) REFERENCES msgs(mail_id) ON DELETE CASCADE -) ENGINE=InnoDB; -CREATE INDEX msgrcpt_idx_mail_id ON msgrcpt (mail_id); -CREATE INDEX msgrcpt_idx_rid ON msgrcpt (rid); - --- mail quarantine in SQL, enabled by $*_quarantine_method='sql:' --- NOTE: records in quarantine without corresponding msgs.mail_id record are --- orphaned and should be ignored and eventually deleted by external utilities -CREATE TABLE quarantine ( - mail_id varchar(12) NOT NULL, -- long-term unique mail id - chunk_ind integer unsigned NOT NULL, -- chunk number, starting with 1 - mail_text blob NOT NULL, -- store mail as chunks (in PostgreSQL use: bytea) - PRIMARY KEY (mail_id,chunk_ind), - FOREIGN KEY (mail_id) REFERENCES msgs(mail_id) ON DELETE CASCADE -) ENGINE=InnoDB; - --- field msgrcpt.rs is primarily intended for use by quarantine management --- software; the value assigned by amavisd is a space; --- a short _preliminary_ list of possible values: --- 'V' => viewed (marked as read) --- 'R' => released (delivered) to this recipient --- 'p' => pending (a status given to messages when the admin received the --- request but not yet released; targeted to banned parts) --- 'D' => marked for deletion; a cleanup script may delete it - -</screen></para> - </appendix> + <para>To install AmavisAdmin, you can download the distribtion file from + <?target aSAsAS?></para> + </section> + </section> </article> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-27 12:02:22
|
Revision: 53 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=53&view=rev Author: streindl Date: 2007-01-27 04:02:15 -0800 (Sat, 27 Jan 2007) Log Message: ----------- docs/installationguide.xml: * Initial draft Modified Paths: -------------- amavisadmin/branches/documentation_1_0/docs/installationguide.xml Modified: amavisadmin/branches/documentation_1_0/docs/installationguide.xml =================================================================== --- amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-25 20:39:12 UTC (rev 52) +++ amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-27 12:02:15 UTC (rev 53) @@ -156,7 +156,8 @@ <itemizedlist> <listitem> - <para>java-1_5_0-sun-1.5.0_update10-2.1</para> + <para><filename>java-1_5_0-sun-1.5.0_update10-2.1</filename> + or a more recent version.</para> </listitem> </itemizedlist> </listitem> @@ -164,39 +165,7 @@ </variablelist> </section> - <section id="sec-download-and-install-tomcat"> - <title>Apache Tomcat</title> - - <para>Apache Tomcat can be downloaded and installed for various - Operating Systems. For Microsoft Windows and other operating systems and - several Linux distributions there are binary packages available that - work usually out of the box.</para> - - <para>For the development and testing Apache Tomcat release 5.5.17 has - been used. The current version 5.5.20 lacks some files for mail handling - and therefore this version has not been taken into consideration as - there's from my point of view no need to install the newer version if - the old version is working fine.</para> - - <para>Version 5.5.17 of Apache Tomcat can be downloaded for example - from</para> - - <para><ulink - url="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/">http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/</ulink></para> - - <para>You should also look for <ulink - url="http://www.apache.org/dyn/closer.cgi">mirrors</ulink> to reduce - load on the apache servers.</para> - - <para>After downloading the (usually) binary distribution you can - install tomcat. This is dependend on your operating system and vendor. - Therefore please check the manuals how to install tomcat. You might find - <ulink - url="http://tomcat.apache.org/tomcat-5.5-doc/setup.html">http://tomcat.apache.org/tomcat-5.5-doc/setup.html</ulink> - an intersting source of information about how to install tomcat.</para> - </section> - - <section> + <section id="sec-postgresql-database"> <title>PostgreSQL database</title> <para>This document does not describe how to setup the PostgreSQL @@ -215,7 +184,7 @@ Other versions might work also but no tests have been done to ensure working on different releases of PostgreSQL.</para> - <section> + <section id="sec-creating-the-database-for-storing-amavisd-data"> <title>Creating the database for storing Amavisd-new data</title> <para>It makes sense (from performance, sizing and other aspects like @@ -225,7 +194,7 @@ In addition PostgreSQL offers the possibility to move parts of the data to other filesystems/paths by using tablespaces.</para> - <section> + <section id="sec-creating-a-functional-database-user"> <title>Creating a functional database user</title> <para>It makes sense to create a functional user that is used by the @@ -266,7 +235,7 @@ </note> </section> - <section> + <section id="sec-creating-a-tablespace"> <title>Creating a tablespace</title> <para>For maintainability I would suggest to create the database @@ -322,7 +291,7 @@ <prompt>postgres=#</prompt></screen></para> </section> - <section> + <section id="sec-creating-the-database"> <title>Creating the database</title> <para>After doing the preparation steps described in the sections @@ -355,7 +324,7 @@ </section> </section> - <section> + <section id="sec-create-sql-data-model"> <title>Create SQL data model</title> <para>With the Amavisd-new distribution, a README-file is distributed @@ -387,9 +356,112 @@ finalizing this step your database should be ready to run amavisd-new.</para> </section> + + <section id="sec-download-postgres-jdbc"> + <title>Download PostgreSQL JDBC driver</title> + + <para>In addition to the standard PostgreSQL distribution you need the + JDBC driver that builds the interface between Java and PostgreSQL. The + JDBC driver is either part of the binary distribution itself or it can + be downloaded from <ulink + url="http://jdbc.postgresql.org/download.html">http://jdbc.postgresql.org/download.html</ulink>. + It is important that the version 3 JDBC driver (for JDK 1.4.x/1.5) + will be downloaded.</para> + </section> </section> - <section> + <section id="sec-download-and-install-tomcat"> + <title>Apache Tomcat</title> + + <para>Apache Tomcat can be downloaded and installed for various + Operating Systems. For Microsoft Windows and other operating systems and + several Linux distributions there are binary packages available that + work usually out of the box.</para> + + <para>For the development and testing Apache Tomcat release 5.5.17 has + been used. The current version 5.5.20 lacks some files for mail handling + and therefore this version has not been taken into consideration as + there's from my point of view no need to install the newer version if + the old version is working fine.</para> + + <para>Version 5.5.17 of Apache Tomcat can be downloaded for example from + <ulink + url="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/">http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/</ulink>. + You should also look for <ulink + url="http://www.apache.org/dyn/closer.cgi">mirrors</ulink> to reduce + load on the apache servers.</para> + + <para>After downloading the (usually) binary distribution you can + install tomcat. This is dependend on your operating system and vendor. + Therefore please check the manuals how to install tomcat. You might find + <ulink + url="http://tomcat.apache.org/tomcat-5.5-doc/setup.html">http://tomcat.apache.org/tomcat-5.5-doc/setup.html</ulink> + an intersting source of information about how to install tomcat.</para> + + <section> + <title>Installing the database connection</title> + + <para>An important step after installing PostgreSQL is the creation of + the database resource that is used by AmavisAdmin to actually connect + to the database. There's a + <filename>$CATALINA_HOME/conf/context.xml</filename>, where you can + store resource definitions that are available for all applications + running on this instance of Tomcat (for other options how to define + resources, please refer to <ulink + url="http://tomcat.apache.org/tomcat-5.5-doc/config/context.html">http://tomcat.apache.org/tomcat-5.5-doc/config/context.html</ulink>). + </para> + + <para>To run AmavisAdmin, you need to define a database connection + resource named <varname>amavisDB</varname>. An example context.xml + file might look like this: </para> + + <programlisting><Context> + <!-- ... other global settings ... --> + <WatchedResource>WEB-INF/web.xml</WatchedResource> + <!-- ... other global settings ... --> + <Resource auth="container" + type="javax.sql.Datasource" + name="jdbc/amavisDB" + driverClassName="org.postgresql.Driver" + url="jdbc:postgresql://<replaceable>localhost:5432/amavis</replaceable>" + username="<replaceable>amavis</replaceable>" + password="<replaceable>amavis</replaceable>" + /> + <!-- ... other global settings ... --> +</Context></programlisting> + + <para>You have to ensure that the last three entries in the list (url, + username and password) are matching the settings that you have defined + while installing the database (see <xref + linkend="sec-postgresql-database" />).</para> + + <para>On top of this you have to copy the postgres JDBC driver to the + directory <filename + class="directory">$CATALINA_HOME/common/lib</filename>.</para> + </section> + + <section id="sec-starting-tomcat"> + <title>Starting Tomcat</title> + + <para>After finishing the steps above you should start Tomcat now to + see that everything is running smooth. By running</para> + + <screen><prompt>sreindl@linux-fest:~> </prompt><userinput>$CATALINA_HOME/bin/startup.sh</userinput> +<computeroutput>Using CATALINA_BASE: /opt/apache-tomcat-5.5.17 +Using CATALINA_HOME: /opt/apache-tomcat-5.5.17 +Using CATALINA_TMPDIR: /opt/apache-tomcat-5.5.17/temp +Using JRE_HOME: /usr/lib64/jvm/java/jre +</computeroutput><prompt>sreindl@linux-fest:~> </prompt></screen> + + <para>You should have a look now in the <filename + class="directory">$CATALINA_HOME/log</filename> directory and scan the + log files appearing there for errors (esp. the files + <filename>catalina*</filename> and + <filename>localhost*</filename>).</para> + </section> + </section> + + <section id="sec-download-and-install-amavisd-new"> <title>Amavisd-new</title> <para>The Amavisd-new application can be downloaded from the <ulink @@ -438,7 +510,7 @@ another application.</para> </callout> - <callout arearefs="pl-amavis-inet-socket-port"> + <callout arearefs="pl-amavis-conf-protocol"> <para>This line defines the general protocol to be used for talking to amavisd-new. As described above, the PDP-protocol is the right value here.</para> @@ -492,7 +564,7 @@ <listitem> <para>If this variable is set to sql, virus mail texts are stored - in the database. </para> + in the database.</para> </listitem> </varlistentry> @@ -523,11 +595,112 @@ accessable to the users.</para> </section> - <section> + <section id="sec-install-amavis-admin"> <title>AmavisAdmin</title> - <para>To install AmavisAdmin, you can download the distribtion file from - <?target aSAsAS?></para> + <para>To install AmavisAdmin, you can download the distribution file + from the AmavisAdmin project at sourceforge.net: <ulink + url="http://sourceforge.net/project/showfiles.php?group_id=187080">http://sourceforge.net/project/showfiles.php?group_id=187080</ulink>. + There you have the different versions available. As this version is + based on AmavisAdmin version @version@, please select the appropriate + section and download the file <filename>@distfile@</filename>.</para> + + <section id="sec-install-amavisadmin-on-unix"> + <title>Installation of AmavisAdmin on a Unix/Linux operating + system</title> + + <para>After downloading the distribution, the files have to be + untarred. Depending on the format you have to use + <command>gunzip</command> (for files with the extension + <filename>.gz</filename>) or <command>bunzip2</command> (files with + the extension <filename>.bz2</filename>) to uncompress the files + first:</para> + + <screen><prompt>sreindl@linux-fest:~> </prompt><userinput>gunzip @distname@.tar.gz +</userinput><prompt>sreindl@linux-fest:~> </prompt></screen> + + <para>for gzip compressed files or</para> + + <screen><prompt>sreindl@linux-fest:~> </prompt><userinput>bunzip2 @distname@.tar.bz2 +</userinput><prompt>sreindl@linux-fest:~> </prompt></screen> + + <para>After uncompressing there should be a file named + <filename>@tarfile@.tar</filename>. This file can now be extracted + with the <command>tar</command> command:</para> + + <screen><prompt>sreindl@linux-fest:~> </prompt><userinput>cd /tmp +</userinput><prompt>sreindl@linux-fest:/tmp> </prompt><userinput>tar xfv @distname@.tar +</userinput><computeroutput>... </computeroutput><lineannotation>Several lines of output</lineannotation> +<prompt>sreindl@linux-fest:/tmp> </prompt><userinput>cd @distname@ +</userinput><prompt>sreindl@linux-fest:/tmp/@distname@></prompt></screen> + + <para>The following sections let you first update your database + system, deploy your web application and configure the AmavisAdmin + software.</para> + </section> + + <section id="sec-perform-database-update"> + <title>Updating the database for AmavisAdmin</title> + + <para>For several purposes the database model used by Amavisd-new has + to be enhanced by several items, this process can be done by running a + script on the database that performs the steps:</para> + + <screen><prompt>sreindl@linux-fest:/tmp/@distname@> </prompt><userinput>psql --username=amavis amavis <db/postgres/update_v0_v1.sql +</userinput><computeroutput>... </computeroutput><lineannotation>Several lines of output / Only warnings should appear</lineannotation> +<prompt>sreindl@linux-fest:/tmp/@distname@> </prompt></screen> + + <para>After running this script, several tables have been updated + (i.e. new columns have been added) and several new tables have been + created. In addition some entries have been inserted into the new + table to enable AmavisAdmin to recognize that the database has been + changed and in addition some jobs have been inserted to perform + further migration of existing database entries.</para> + </section> + + <section id="sec-deploy-AmavisAdmin"> + <title>Deploy the AmavisAdmin application</title> + + <para>The deployment of the AmavisAdmin application is quite simple. + For deploying the application to Tomcat you just need to copy the war + file to the folder <filename + class="directory">$CATALINA_HOME/webapps/</filename>. Tomcat is + unpacking and initializing the application by itself. That's + it.</para> + </section> + + <section id="sec-AmavisAdmin-initial-configuration"> + <title>Configuration of AmavisAdmin</title> + + <para>After deploying the application you need to set several + configuration parameters before the actual application can be + executed. The configuration can be started by pointing your web + browser to the starting page of your AmavisAdmin installation (e.g. + <ulink + url="http://localhost:8080/AmavisAdmin">http://localhost:8080/AmavisAdmin</ulink>). + About what can be configured and the configuration fields itself you + can find an explanation in the AmavisAdmin user guide. You should also + enable the maintenance jobs that are running inside the application + server. This can be done by selecting the menu item + <guimenuitem>Jobs</guimenuitem> after logging in the first time as an + administrator.</para> + + <para>After performing the configuration you are ready to use + AmavisAdmin. For more details abount administration and use of + AmavisAdmin please refer to the user guide.</para> + </section> </section> </section> + + <section id="sec-building-amavsiadmin-from-scratch"> + <title>Building AmavisAdmin from scratch</title> + + <warning> + <para>Please be aware that the development has been done on a single + machine only. There might be hard dependencies due to the fact that it + has been never tested to build this stuff on another machine.</para> + </warning> + + <remark>To be filled</remark> + </section> </article> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |