amavisadmin-svn Mailing List for Amavisd-new Maintenance
Status: Beta
Brought to you by:
streindl
You can subscribe to this list here.
2007 |
Jan
(42) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|
From: <str...@us...> - 2007-12-19 18:20:54
|
Revision: 60 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=60&view=rev Author: streindl Date: 2007-12-19 10:21:00 -0800 (Wed, 19 Dec 2007) Log Message: ----------- removed xml documentation as this will be replaced Removed Paths: ------------- amavisadmin/trunk/docs/Makefile amavisadmin/trunk/docs/architecture.sdr amavisadmin/trunk/docs/cust/ amavisadmin/trunk/docs/docbook-xsl-1.71.1/ amavisadmin/trunk/docs/images amavisadmin/trunk/docs/installationguide.xml amavisadmin/trunk/docs/user_guide.xml Deleted: amavisadmin/trunk/docs/Makefile =================================================================== --- amavisadmin/trunk/docs/Makefile 2007-01-28 16:57:16 UTC (rev 59) +++ amavisadmin/trunk/docs/Makefile 2007-12-19 18:21:00 UTC (rev 60) @@ -1,645 +0,0 @@ -# $Source$ -# $Author: xmldoc $ -# $Date: 2006-09-01 15:47:16 +0900 (Fri, 01 Sep 2006) $ -# $Revision: 6235 $ -# vim: number -# -# ----------------------------------------------------------------- -# ** Makefile.DocBook -- generate output from DocBook sources ** -# ----------------------------------------------------------------- -# -# This file is part of the DocBook Project XSL Stylesheet -# distribution. -# -# See http://docbook.sourceforge.net/release/xsl/current/ -# for copyright and other information. -# DOCBOOK_OUTPUT_FORMATS is the default set of targets (output -# formats) that get built when you type "make" without any targets -# explicitly specified. To generate a different set of output -# formats, change the value of DOCBOOK_OUTPUT_FORMATS here or set -# it in your environment; for example: -# -# set DOCBOOK_OUTPUT_FORMATS="html pdf"; export DOCBOOK_OUTPUT_FORMATS -# -# Of course by explicitly specifying particular targets when you -# invoke "make", you can always override generation of the default -# set of targets; for example: -# -# make html txt -# -# That would generate just HTML (unchunked) and plain-text output. -# -DOCBOOK_OUTPUT_FORMATS ?= man chunk txt pdf - -# If you want XHTML output instead of HTML, set HTML_OR_XHTML to -# 'xhtml' or just specify 'xhtml" in DOCBOOK_OUTPUT_FORMATS. -ifeq ($(findstring xhtml,$(DOCBOOK_OUTPUT_FORMATS)),) -HTML_OR_XHTML ?= html -else -HTML_OR_XHTML ?= xhtml -endif - -# ----------------------------------------------------------------- -# *** TOOLS and other DEPENDENCIES *** -# ----------------------------------------------------------------- -# we use rmdir(1) to remove dirs we create for chunked HTML output -RMDIR = rmdir -# "-p" causes empty parent dirs to be deleted as well -RMDIR_FLAGS = --ignore-fail-on-non-empty -p - -# possible values for PDF_MAKER are: -# dblatex|fop|fop1|xep|xmlroff|passivetex -PDF_MAKER = fop1 - -# possible values for TXT_MAKER are: -# links|lynx|w3m|w3mmee -TXT_MAKER = w3m -TXT_MAKER_FLAGS = -dump - -# xsl -XSLT = xsltproc -XSLT_FLAGS = --xinclude - -# http://dblatex.sourceforge.net/ -DBLATEX = dblatex -DBLATEX_FLAGS = -b pdftex - -FOP = fop -FOP_FLAGS = - -XEP = xep -XEP_FLAGS = - -# http://xmlroff.sourceforge.net/ -XMLROFF = xmlroff -XMLROFF_FLAGS = - -PDFTEX = pdftex -PDFTEX_FLAGS = - -# used by PassiveTeX -PDFXMLTEX = pdfxmltex - -# http://docbook2x.sourceforge.net/ -DB2X_XSLTPROC = db2x_xsltproc -DB2X_XSLTPROC_FLAGS = -DB2X_TEXIXML = db2x_texixml -DB2X_TEXIXML_FLAGS = - -# we call the man(1) command to generate "foo.N.pdf" and -# "foo.N.txt" output (see "man-pdf" & "man-txt" targets) -MAN = man -MAN_FLAGS = - -# The "ps2pdf" command is part of GhostSript (gs) distro. -# It is just a wrapper script around gs that does this: -# -# gs -dCompatibilityLevel=1.2 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ -# "-sOutputFile=$outfile" -dCompatibilityLevel=1.2 -c .setpdfwrite -f "$infile" -# -# Where, for example: $outfile = foo.pdf and $infile = foo.1 -PS2PDF = ps2pdf -PS2PDF_FLAGS = - -# The "col" command is needed for stripping backspaces and -# underscores from man(1) output to get pure plain-text -COL = col -COL_FLAGS = - -# The "expand" command is needed for expanding tabs from files -# generated from "man foo.1 | col -b" output -# output to get pure plain-text -EXPAND = expand -EXPAND_FLAGS = - -# value of DOCBOOK_XSL should either be the canonical -# (docbook.sourceforge.net) URL for the DocBook Project XSL -# stylesheets OR it can be a local system path -DOCBOOK_XSL = docbook-xsl-1.71.1 - -# ----------------------------------------------------------------- -# names of some DIRECTORIES and FILES we need -# ----------------------------------------------------------------- -# We create a tmp directory once per make invocation; it's needed -# for holding a temporary copy of the custom DBLaTeX stylesheet -# (because dblatex currently can't read a stylesheet from stdin) -TMP ?= /tmp -TMPNUM := $(shell echo $$$$) -DOCBOOK_TMP := $(TMP)/docbook-make-$(TMPNUM) - -# MAN_MANIFEST_EXT is file extension added to individual manifest -# files -MAN_MANIFEST_EXT = manifest_man - -# HTML_MANIFEST_EXT is file extension added to HTML manifest files -HTML_MANIFEST_EXT = manifest_html - -# BASEDIR_SUFFIX is a what you need to set if you want a suffix -# added to the end of each "base.dir" we create while generating -# chunked HTML output -#BASEDIR_SUFFIX = -html -#BASEDIR_SUFFIX = _html -BASEDIR_SUFFIX = - -# ----------------------------------------------------------------- -# assorted OPTIONS -# ----------------------------------------------------------------- -# HTML_STYLESHEET -> $html.stylesheet stylesheet param -# http://docbook.sourceforge.net/snapshots/xsl/doc/html/html.stylesheet.html -HTML_STYLESHEET = style.css -# HTML_IMAGES -> $admon.graphics.path -# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.path.html -HTML_IMAGES = images/ -# HTML_IMAGES_EXT -> $admon.graphics.extension -# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.extension.html -HTML_IMAGES_EXT = .png - -# use these to set params on the command-line -# format is, e.g., HTML_PARAMS="--stringparam variablelist.as.table 1..." -FO_PARAMS = -HTML_PARAMS = -MAN_PARAMS = - -# DBX_PARAMS is for dblatex(1); format uses "-p": -# DBX_PARAMS="-p doc.publisher.show 1 -p term.breakline 1... -DBX_PARAMS= - -# What file extension do you use for DocBook source files? -DOCBOOK_FILE_EXTENSION = .xml - -# ----------------------------------------------------------------- -# make(1) functions for building file lists -# ----------------------------------------------------------------- -# -# the values of the following are used for determing what needs -# to be built and/or cleaned up - -SOURCE_FILES_DBK = $(wildcard *$(DOCBOOK_FILE_EXTENSION)) - -FILES_FO = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).fo) -FILES_TXT = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).txt) -FILES_PDF = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).pdf) -FILES_LOG = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).log) -FILES_OUT = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).out) -FILES_AUX = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).aux) -FILES_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).html) -FILES_INFO = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).info) -DIRS_CHUNK = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base)$(BASEDIR_SUFFIX)) -LISTS_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(HTML_MANIFEST_EXT)) -LISTS_MAN = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(MAN_MANIFEST_EXT)) -FILES_CHNK = $(shell for manifest in $(LISTS_HTML); do if [ -f "$$manifest" ]; then cat $$manifest; fi done) -FILES_MAN = $(shell for manifest in $(LISTS_MAN); do if [ -f "$$manifest" ]; then cat $$manifest; fi done) -FILES_MANP = $(foreach base,$(FILES_MAN),$(base).pdf) -FILES_MANT = $(foreach base,$(FILES_MAN),$(base).txt) -DIRS_MAN = $(shell for file in $(FILES_MAN); do dirname $$file; done | uniq) - -# ----------------------------------------------------------------- -# ** stylesheet for testing whether a file has a refentry -# ----------------------------------------------------------------- -REFENTRY_CHECK := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0" \ - xmlns:db="http://docbook.org/ns/docbook" \ - > \ -<xsl:output method="text"/> \ -<xsl:template match="/"> \ -<xsl:if test="//refentry|//db:refentry"> \ -<xsl:text>true</xsl:text> \ -</xsl:if> \ -</xsl:template> \ -</xsl:stylesheet> - -# ----------------------------------------------------------------- -# ** Stylesheet Customization Layers ** -# ----------------------------------------------------------------- -# -# for DBLaTeX -DBX_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ -<xsl:param name="co.linkends.show">0</xsl:param> \ -<xsl:param name="callout.markup.circled">1</xsl:param> \ -<xsl:param name="callout.linkends.hot">0</xsl:param> \ -<xsl:param name="doc.publisher.show">1</xsl:param> \ -<xsl:param name="term.breakline">1</xsl:param> \ -<xsl:param name="doc.alignment">left</xsl:param> \ -<xsl:param name="newtbl.use">1</xsl:param> \ -<xsl:param name="latex.hyperparam"/> \ -<xsl:param name="latex.style">docbook</xsl:param> \ -<xsl:param name="latex.biblio.output">all</xsl:param> \ -<xsl:param name="latex.bibfiles">""</xsl:param> \ -<xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \ -<xsl:param name="latex.output.revhistory">0</xsl:param> \ -<xsl:param name="latex.figure.position">[htbp]</xsl:param> \ -<xsl:param name="latex.figure.boxed">0</xsl:param> \ -<xsl:param name="latex.babel.use">1</xsl:param> \ -<xsl:param name="latex.babel.language"></xsl:param> \ -<xsl:param name="latex.class.options">twoside</xsl:param> \ -<xsl:param name="biblioentry.item.separator">, </xsl:param> \ -<xsl:param name="refentry.xref.manvolnum">1</xsl:param> \ -<xsl:param name="refsynopsis.title">Synopsis</xsl:param> \ -<xsl:param name="refnamediv.title"></xsl:param> \ -<xsl:param name="funcsynopsis.style">ansi</xsl:param> \ -<xsl:param name="funcsynopsis.decoration">1</xsl:param> \ -<xsl:param name="function.parens">0</xsl:param> \ -<xsl:param name="classsynopsis.default.language">java</xsl:param> \ -<xsl:param name="show.comments">0</xsl:param> \ -</xsl:stylesheet> - -# for FO output -FO_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - xmlns:fo="http://www.w3.org/1999/XSL/Format" \ - version="1.0"> \ -<xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \ -<xsl:include href="cust/titlepage.templates.xsl"/> \ -<xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \ -<xsl:param name="paper.type">A4</xsl:param> \ -<xsl:param name="callout.unicode">1</xsl:param> \ -<xsl:param name="callout.graphics">0</xsl:param> \ -<xsl:param name="admon.graphics">1</xsl:param> \ -<xsl:param name="admon.graphics.extension">.svg</xsl:param> \ - <xsl:param name="draft.watermark.image"></xsl:param> \ - <xsl:param name="hyphenation">false</xsl:param> \ - <xsl:param name="hyphenate.verbatim">0</xsl:param> \ - <xsl:param name="alignment">left</xsl:param> \ - <xsl:param name="refentry.generate.name">1</xsl:param> \ - <xsl:param name="refentry.generate.title">0</xsl:param> \ - <xsl:param name="refentry.pagebreak">1</xsl:param> \ - <xsl:param name="shade.verbatim">1</xsl:param> \ - <xsl:param name="variablelist.as.blocks">1</xsl:param> \ - <xsl:param name="ulink.show">1</xsl:param> \ - <xsl:param name="ulink.footnotes">1</xsl:param> \ - <xsl:param name="index.on.type">1</xsl:param> \ - <xsl:attribute-set name="xref.properties"> \ - <xsl:attribute name="color">blue</xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="shade.verbatim.style"> \ - <xsl:attribute name="background-color">\#E0E0E0</xsl:attribute> \ - <xsl:attribute name="padding-left">4pt</xsl:attribute> \ - <xsl:attribute name="padding-right">4pt</xsl:attribute> \ - <xsl:attribute name="padding-top">4pt</xsl:attribute> \ - <xsl:attribute name="padding-bottom">4pt</xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:param name="section.autolabel">1</xsl:param> \ - <xsl:attribute-set name="section.title.level1.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="section.title.level2.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.3"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="section.title.level3.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.1"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="section.title.level4.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="component.title.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="monospace.verbatim.properties"> \ - <xsl:attribute name="wrap-option">wrap</xsl:attribute> \ - <xsl:attribute name="hyphenation-character">\</xsl:attribute> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 0.8"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ -</xsl:stylesheet> - -# for single-file (X)HTML outpout -HTML_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/docbook.xsl"/> \ - <xsl:param name="gentext.custom">local.l10n.xml</xsl:param> \ - <xsl:param name="local.l10n.xml" select="document($$gentext.custom)"/> \ - <xsl:param name="refentry.generate.name">1</xsl:param> \ - <xsl:param name="refentry.generate.title">0</xsl:param> \ - <xsl:param name="root.filename"></xsl:param> \ - <xsl:param name="variablelist.as.table">0</xsl:param> \ - <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \ - <xsl:param name="admon.graphics">0</xsl:param> \ - <xsl:param name="index.on.type">1</xsl:param> \ -</xsl:stylesheet> - -# for chunked (X)HTML output -CHNK_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/chunk.xsl"/> \ - <xsl:param name="refentry.generate.name">0</xsl:param> \ - <xsl:param name="refentry.generate.title">1</xsl:param> \ - <xsl:param name="variablelist.as.table">0</xsl:param> \ - <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \ - <xsl:param name="admon.graphics">1</xsl:param> \ - <xsl:param name="admon.graphics.path">$(HTML_IMAGES)</xsl:param> \ - <xsl:param name="admon.graphics.extension">$(HTML_IMAGES_EXT)</xsl:param> \ - <xsl:param name="root.filename"></xsl:param> \ - <xsl:param name="generate.manifest">1</xsl:param> \ - <xsl:param name="use.id.as.filename">1</xsl:param> \ - <xsl:param name="chunker.output.indent">yes</xsl:param> \ - <xsl:param name="index.on.type">1</xsl:param> \ -</xsl:stylesheet> - -# for man-page output -MAN_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/manpages/docbook.xsl"/> \ - <xsl:param name="man.output.manifest.enabled" select="1"/> \ - <xsl:param name="man.output.in.separate.dir" select="1"/> \ - <xsl:param name="man.output.base.dir">man/</xsl:param> \ - <xsl:param name="man.output.subdirs.enabled" select="1"/> \ -</xsl:stylesheet> - -# ----------------------------------------------------------------- -# ** TARGETS START HERE ** -# ----------------------------------------------------------------- -# prevents make from deleting, e.g. foo.1, after making foo.1.pdf -# and foo.1.txt from it. -.PRECIOUS: %.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9 - -docbook: $(DOCBOOK_OUTPUT_FORMATS) - -man: $(LISTS_MAN) - -# we can generate PDFs from man pages -man-pdf: man - $(MAKE) $(FILES_MANP) - -# we can generate plain text from man pages -man-txt: man - $(MAKE) $(FILES_MANT) - -html: $(FILES_HTML) - -chunk: $(LISTS_HTML) - -txt: $(FILES_TXT) - -pdf: cust/titlepage.templates.xsl $(FILES_PDF) - -info: $(FILES_INFO) - -cust/titlepage.templates.xsl: cust/titlepage.templates.xml - xsltproc -output cust/titlepage.templates.xsl \ - $(DOCBOOK_XSL)/template/titlepage.xsl cust/titlepage.templates.xml - -# use the "debug" target to echo variables, etc., to -# test/troubleshoot changes you make to this makefile -debug: - @echo $(DIRS_MAN) - -# ----------------------------------------------------------------- -# pattern rule for making (X)HTML and plain-text output -# ----------------------------------------------------------------- -%.html: %$(DOCBOOK_FILE_EXTENSION) - @echo '$(HTML_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) - $< > $@ - -%.txt: %.html - $(TXT_MAKER) $(TXT_MAKER_FLAGS) ./$< \ - | sed "s/^\(\s\+[0-9]\+\. \)file:\/\/.\+$$/\\1(local)/g" \ - | egrep -v '^ file:///.+$$' \ - > $@ -# if DOCBOOK_OUTPUT_FORMATS does not contain "html", then we need -# to remove the "intermediate" HTML files we used for generating -# plain-text output -ifeq ($(findstring html,$(DOCBOOK_OUTPUT_FORMATS)),) - $(RM) $< -endif - -# ----------------------------------------------------------------- -# pattern rule for making chunked (X)HTML pages -# ----------------------------------------------------------------- -%.$(HTML_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION) - @echo '$(CHNK_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) \ - --stringparam manifest $@ \ - --stringparam base.dir $(basename $@)$(BASEDIR_SUFFIX)/ \ - - $< - -# ----------------------------------------------------------------- -# pattern rules for making FO and PDF stuff -# ----------------------------------------------------------------- -%.fo: %$(DOCBOOK_FILE_EXTENSION) - @echo '$(FO_CUSTOM)' \ - | $(XSLT) $(XSLT_FLAGS) $(FO_PARAMS) - $< > $@ - -ifeq ($(PDF_MAKER),dblatex) -%.pdf: %$(DOCBOOK_FILE_EXTENSION) - mkdir -p $(DOCBOOK_TMP) - echo '$(DBX_CUSTOM)' > $(DOCBOOK_TMP)/dblatex.xsl - -$(DBLATEX) $(DBLATEX_FLAGS)\ - -p $(DOCBOOK_TMP)/dblatex.xsl \ - -o $@ \ - $< - $(RM) -r $(DOCBOOK_TMP) -endif - -%.pdf: %.fo -ifeq ($(PDF_MAKER),) - $(error No PDF_MAKER specified. Cannot make pdf) -else -ifeq ($(PDF_MAKER),xep) - $(XEP) $(XEP_FLAGS) $< $@ -else -ifeq ($(PDF_MAKER),fop) - $(FOP) $(FOP_FLAGS) $< $@ -else -ifeq ($(PDF_MAKER),fop1) - $(FOP) $(FOP_FLAGS) $< $@ -else -ifeq ($(PDF_MAKER),xmlroff) - $(XMLROFF) $(XMLROFF_FLAGS) $< -o $@ -else -ifeq ($(PDF_MAKER),passivetex) - $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< - @if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \ - $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \ - fi - @if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \ - $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \ - fi - $(RM) $(basename $@).log - $(RM) $(basename $@).aux - $(RM) $(basename $@).out -else - $(error I do not know how to make a PDF using "$(PDF_MAKER)") -endif -endif -endif -endif -endif -endif - -# ----------------------------------------------------------------- -# pattern rules for making TeXinfo stuff -# ----------------------------------------------------------------- -%.txml: %$(DOCBOOK_FILE_EXTENSION) - $(DB2X_XSLTPROC) $(DB2X_XSLTPROC_FLAGS) -s texi -o $@ $< - -%.texi: %.txml - $(DB2X_TEXIXML) $(DB2X_TEXIXML_FLAGS) $< - -# the following is actually a built-in rule, but it's redefined -# here just for the sake of clarity -%.info: %.texi - $(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@ - -# ----------------------------------------------------------------- -# pattern rule for making man pages -# ----------------------------------------------------------------- -%.$(MAN_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION) - @if [ "$(strip $(shell echo '$(REFENTRY_CHECK)' | $(XSLT) $(XSLT_FLAGS) - $<))" != "true" ]; then \ - touch $@; \ - else \ - echo '$(MAN_CUSTOM)' \ - | $(XSLT) $(XSLT_FLAGS) $(MAN_PARAMS) \ - --stringparam man.output.manifest.filename $@ \ - - $<; \ - fi - -# ----------------------------------------------------------------- -# pattern rule for enabling direct "make foo.1" to work -# ----------------------------------------------------------------- - -%.1 %.2 %.3 %.4 %.5 %.6 %.7: %.xml - $(MAKE) $(basename $<).$(MAN_MANIFEST_EXT) - -# ----------------------------------------------------------------- -# pattern rules for making Postscript/PDF output from man pages -# ----------------------------------------------------------------- -%.1.ps: %.1 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.2.ps: %.2 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.3.ps: %.3 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.4.ps: %.4 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.5.ps: %.5 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.6.ps: %.6 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.7.ps: %.7 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.8.ps: %.8 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.9.ps: %.9 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -# ----------------------------------------------------------------- -# pattern rule for converting Postscript to PDF -# ----------------------------------------------------------------- -%.pdf: %.ps - $(PS2PDF) $(PS2PDF_FLAGS) $< - -# ----------------------------------------------------------------- -# pattern rules for making plain-text output from man pages -# ----------------------------------------------------------------- -%.1.txt: %.1 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.2.txt: %.2 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.3.txt: %.3 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.4.txt: %.4 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.5.txt: %.5 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.6.txt: %.6 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.7.txt: %.7 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.8.txt: %.8 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.9.txt: %.9 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -# ----------------------------------------------------------------- -# target(s) for cleaning up the mess -# ----------------------------------------------------------------- -clean: -ifneq ($(FILES_TXT),) - $(RM) $(FILES_TXT) -endif -ifneq ($(FILES_PDF),) - $(RM) $(FILES_PDF) -endif -ifneq ($(FILES_FO),) - $(RM) $(FILES_FO) -endif -ifneq ($(FILES_LOG),) - $(RM) $(FILES_LOG) -endif -ifneq ($(FILES_OUT),) - $(RM) $(FILES_OUT) -endif -ifneq ($(FILES_AUX),) - $(RM) $(FILES_AUX) -endif -ifneq ($(FILES_HTML),) - $(RM) $(FILES_HTML) -endif -ifneq ($(FILES_CHNK),) - $(RM) $(FILES_CHNK) -endif -ifneq ($(FILES_MAN),) - $(RM) $(FILES_MAN) -endif -ifneq ($(FILES_MANT),) - $(RM) $(FILES_MANT) -endif -ifneq ($(FILES_MANP),) - $(RM) $(FILES_MANP) -endif -ifneq ($(FILES_INFO),) - $(RM) $(FILES_INFO) -endif -ifneq ($(DIRS_CHUNK),) - for dir in $(DIRS_CHUNK); do \ - if [ -d "$$dir" ]; then \ - $(RMDIR) $(RMDIR_FLAGS) $$dir; \ - fi \ - done -endif -ifneq ($(DIRS_MAN),) -ifneq ($(DIRS_MAN),.) - for dir in $(DIRS_MAN); do \ - if [ -d "$$dir" ]; then \ - $(RMDIR) $(RMDIR_FLAGS) $$dir; \ - fi \ - done -endif -endif -ifneq ($(LISTS_MAN),) - $(RM) $(LISTS_MAN) -endif -ifneq ($(LISTS_HTML),) - $(RM) $(LISTS_HTML) -endif Deleted: amavisadmin/trunk/docs/architecture.sdr =================================================================== (Binary files differ) Deleted: amavisadmin/trunk/docs/images =================================================================== --- amavisadmin/trunk/docs/images 2007-01-28 16:57:16 UTC (rev 59) +++ amavisadmin/trunk/docs/images 2007-12-19 18:21:00 UTC (rev 60) @@ -1 +0,0 @@ -link docbook-xsl-1.71.1/images/ \ No newline at end of file Deleted: amavisadmin/trunk/docs/installationguide.xml =================================================================== --- amavisadmin/trunk/docs/installationguide.xml 2007-01-28 16:57:16 UTC (rev 59) +++ amavisadmin/trunk/docs/installationguide.xml 2007-12-19 18:21:00 UTC (rev 60) @@ -1,706 +0,0 @@ -<?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"> -<!ENTITY aa "AmavisAdmin"> -]> -<article> - <articleinfo> - <title>AmavisAdmin</title> - - <subtitle>Installation Guide</subtitle> - - <author> - <firstname>Stephen</firstname> - - <surname>Reindl</surname> - - <address><street>Langster Straße 28</street> -<postcode>40668</postcode> <city>Meerbusch</city> -<country>Germany</country></address> - - <email>sr...@sr...</email> - </author> - - <pubdate>February 2007</pubdate> - - <copyright> - <year>2006</year> - - <year>2007</year> - - <holder>Stephen Reindl</holder> - </copyright> - - <legalnotice> - <para>Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. You may - obtain a copy of the License at</para> - - <para><ulink - url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink></para> - - <para>Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an "AS IS" - BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied. See the License for the specific language governing permissions - and limitations under the License.</para> - </legalnotice> - - <revhistory> - <revision> - <revnumber>0.1</revnumber> - - <date>2007-01-20</date> - - <authorinitials>sr</authorinitials> - - <revdescription> - <para>Initial document</para> - </revdescription> - </revision> - </revhistory> - </articleinfo> - - <section id="preface"> - <title>Preface</title> - - <para>This document describes how to install and use the AmavisAdmin tool. - In addition the document describes which tools are necessary to build an - developement platform that is suitable to develop and maintain - AmavisAdmin.</para> - - <para>As AmavisAdmin is heavily based on Java and other open platform - tools, building a working production or development environment can be - done without creating any costs (except maybe for hardware, please see - below ...).</para> - </section> - - <section id="sec-system-requirements"> - <title>System Requirements</title> - - <para>The following requirements have to be met to run AmavisAdmin on a - Computer:</para> - - <itemizedlist> - <listitem> - <para>Java runtime Version 1.5.0 (Tested with 1.5.0-10) from Sun - (<ulink url="http://java.sun.com">http://java.sun.com</ulink>)</para> - </listitem> - - <listitem> - <para>An java application server. The software has been tested with - Apache Tomcat release <ulink - url="http://tomcat.apache.org/">5.5.</ulink></para> - </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 - used.</para> - - <para>The Amavisd-new package doesn't need to run on the same machine - but both the database Amavisd-new and a specific TCP port need to be - available to perform neccessary operations.</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 - url="http://jdbc.postgresql.org/">http://jdbc.postgresql.org/</ulink>.</para> - </listitem> - </itemizedlist> - </section> - - <section id="sec-downloading-and-installing"> - <title>Downloading and installing the components</title> - - <section id="sec-download-java-sdk"> - <title>Java JDK/JRE</title> - - <para>The java package can be installed usually by using standard - packages provided by you operating system vendor (e.g SuSE/OpenSuSE is - providing java packages as part of their distribution) or you can - download them as add-ons either by Sun or by other vendors (IBM, ...). - The following list gives some example of additional packages to be - installed. For further reference please contact your operating system - vendor:</para> - - <variablelist> - <varlistentry> - <term><trademark>Microsoft Windows</trademark></term> - - <listitem> - <para>On Windows you might use the standard packages downloadable - from <ulink url="http://java.sun.com">Sun's java - pages</ulink>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term>OpenSuSE</term> - - <listitem> - <para>On OpenSuSE the following package needs to be - installed:</para> - - <itemizedlist> - <listitem> - <para><filename>java-1_5_0-sun-1.5.0_update10-2.1</filename> - or a more recent version.</para> - </listitem> - </itemizedlist> - </listitem> - </varlistentry> - </variablelist> - </section> - - <section id="sec-postgresql-database"> - <title>PostgreSQL database</title> - - <para>This document does not describe how to setup the PostgreSQL - database. For most Microsoft <trademark - class="registered">Windows</trademark> and <trademark - class="registered">Linux</trademark>/<trademark - class="registered">Unix</trademark> distribitions there're binary - packages available (see <ulink - url="http://www.postgresql.org/ftp/binary/">http://www.postgresql.org/ftp/binary/<version></ulink> - for available systems and versions). They can be downloard If you want - (or need) to install PostgreSQL from scratch, the following section in - the PostgreSQL documentation might help: <ulink - url="http://www.postgresql.org/docs/8.1/interactive/installation.html">http://www.postgresql.org/docs/8.1/interactive/installation.html</ulink>.</para> - - <para>For development and testing PostgreSQL release 8.1 has been used. - Other versions might work also but no tests have been done to ensure - working on different releases of PostgreSQL.</para> - - <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 - security) to create a separate database that contains the data stored - by Amavisd-new and AmavisAdmin. The database should be accessable only - by superusers and a specific functional account for maximum security. - In addition PostgreSQL offers the possibility to move parts of the - data to other filesystems/paths by using tablespaces.</para> - - <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 - applications (amavisd-new and AmavisAdmin) to connect to the - database. This user created should be able to access the database - only from the IP-addresses used by the applications itself. This - gives some additional security. To create a user, two steps are - neccessary: First the user itself has to be created. Afterwards the - user has to be configured to connect to the database. The second - step depends on your local security, therfore please refer to <ulink - url="http://www.postgresql.org/docs/8.1/interactive/client-authentication.html">http://www.postgresql.org/docs/8.1/interactive/client-authentication.html</ulink> - for details. Creating a user can be done by using the command - <command>createuser</command> that is part of every PostgreSQL - distribution. The following example shows how to create the user - amavis that will be used for administrators and applications to - connect to the database (please replace - <replaceable>superuser</replaceable> with your superuser role - name):</para> - - <screen xml:space="preserve"><prompt>sreindl@linux-fest:~> </prompt><userinput>sudo -u postgres createuser \ -</userinput><prompt>> </prompt><userinput> --no-superuser --no-createrole --no-createdb \ -</userinput><prompt>> </prompt><userinput> --pwprompt --username=<replaceable>superuser</replaceable> --password amavis -</userinput><prompt>Enter password for new role: </prompt><userinput><replaceable><password></replaceable> -</userinput><prompt>Enter it again: </prompt><userinput><replaceable><password></replaceable> -</userinput><prompt>Password:</prompt> <userinput><replaceable><superuserpassword></replaceable> -</userinput><computeroutput>CREATE ROLE -</computeroutput><prompt>sreindl@linux-fest:~> </prompt></screen> - - <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 id="sec-creating-a-tablespace"> - <title>Creating a tablespace</title> - - <para>For maintainability I would suggest to create the database - used for Amavisd-new in a separate tablespace. Creating a tablespace - in PostgreSQL is done in two steps: At first you have to create a - directory in the file system which will contain the tablespace data. - With the Linux/Unix operating system the command might look like - this:</para> - - <programlisting><prompt>$ </prompt><userinput>mkdir -p <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput></programlisting> - - <para>where the path given might even reside on a different machine - (i.e. network file server). On other operating systems this command - might look different or you might even use a graphical user - interface to create the path. After creating the path you have to - change the permissions that only the database server has access to - the created path. This is basically done for security - reasons:</para> - - <programlisting><prompt>$ </prompt><userinput>chown <replaceable>postgres</replaceable> <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput> -<prompt>$ </prompt><userinput>chmod 0700 <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput></programlisting> - - <para>The first command assigns the user postgres (please provide - the user name which has been used to install the postgres database) - to the created path, i.e. change the owner of this path to the - database system. The second command changes the permissions of the - directory in a way that only the PostgreSQL system (and the system - administrator) can access the contents of the directory. Other - operating systems might need other commands to accomplish - this.</para> - - <para>The second step is to actually create the tablespace. This is - done by using database commands. The following example creates a - tablespace <database class="table">tb_admin</database> which points - to the directory created above:</para> - - <para><screen><prompt>sreindl@linux-fest:~></prompt> -<prompt>sreindl@linux-fest:~> </prompt><userinput>psql --username=<replaceable>superuser</replaceable> \</userinput> -<prompt>> </prompt> <userinput>--password postgres</userinput> -<computeroutput>Password for user <replaceable>superuser</replaceable>: -Welcome to psql 8.1.5, the PostgreSQL interactive terminal. - -Type: \copyright for distribution terms - \h for help with SQL commands - \? for help with psql commands - \g or terminate with semicolon to execute query - \q to quit - -</computeroutput><prompt>postgres=# </prompt><userinput>CREATE TABLESPACE <replaceable>tb_amavis</replaceable> </userinput> -<prompt>postgres-# </prompt><userinput> OWNER amavis </userinput> -<prompt>postgres-# </prompt><userinput> LOCATION '<replaceable>/srv/db/tablespaces/amavis</replaceable>';</userinput> -<computeroutput>CREATE TABLE</computeroutput> -<prompt>postgres=#</prompt></screen></para> - </section> - - <section id="sec-creating-the-database"> - <title>Creating the database</title> - - <para>After doing the preparation steps described in the sections - above, the final step is to create the actual database. This can be - done by using the command <command>createdb</command> or by using - SQL commands entered into the PostgreSQL frontent - <command>psql</command>. The database encoding can be of any type as - the mail text itself is stored as a binary field and therefore - there's no need to use binary encoding for the database. The - following command creates the database <database - class="name">amavis</database> for user <database - class="user">amavis</database> in tablespace <database - class="table">tb_amavis</database>:</para> - - <screen><prompt>sreindl@linux-fest:~> </prompt><userinput>createdb --tablespace=tb_admin \ -</userinput><prompt>> </prompt><userinput> --owner=amavis \ -</userinput><prompt>> </prompt><userinput> --echo \ -</userinput><prompt>> </prompt><userinput> --user=superuser \ -</userinput><prompt>> </prompt><userinput> --password -</userinput><prompt>Password:</prompt> <userinput><replaceable><password></replaceable></userinput> -<computeroutput>CREATE DATABASE</computeroutput> -<prompt>sreindl@linux-fest:~> </prompt> -</screen> - - <para>A similar command on the psql command line would be</para> - - <screen><prompt>postgres=# </prompt><userinput>CREATE DATABASE amavis OWNER amavis TABLESPACE tb_amavis;</userinput> -<computeroutput>CREATE DATABASE</computeroutput> -<prompt>postgres=#</prompt></screen> - </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 - that contains a sample data model. As this data model is mixed - together with MySQL comments, a clean version for PostgreSQL is - 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 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 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 - 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. For installation of amavisd-new and about how to setup SQL - storage and lookup, please refer to the following documentation - files:</para> - - <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) -... -$protocol='AM.PDP';<co id="pl-amavis-conf-protocol" /> -...</programlisting> - - <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-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> - </callout> - </calloutlist> - - <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> - - <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> - - <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> - - <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> - - <variablelist> - <varlistentry> - <term>$clean_quarantine_method</term> - - <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> - - <varlistentry> - <term>$virus_quarantine_method</term> - - <listitem> - <para>If this variable is set to sql, virus mail texts are stored - in the database.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term>$banned_files_quarantine_method</term> - - <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> - - <varlistentry> - <term>$spam_quarantine_method</term> - - <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> - - <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> - - <section id="sec-install-amavis-admin"> - <title>AmavisAdmin</title> - - <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 Deleted: amavisadmin/trunk/docs/user_guide.xml =================================================================== --- amavisadmin/trunk/docs/user_guide.xml 2007-01-28 16:57:16 UTC (rev 59) +++ amavisadmin/trunk/docs/user_guide.xml 2007-12-19 18:21:00 UTC (rev 60) @@ -1,183 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" -"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> -<book> - <bookinfo> - <title>AmavisAdmin</title> - - <subtitle>User Manual</subtitle> - - <author> - <firstname>Stephen</firstname> - - <surname>Reindl</surname> - - <address><street>Langster Str. 28</street> -<postcode>40668</postcode> <city>Meerbusch</city> -<country>Germany</country></address> - - <email>sr...@sr...</email> - </author> - - <pubdate>February 2007</pubdate> - - <copyright> - <year>2006</year> - - <year>2007</year> - - <holder>Stephen Reindl</holder> - </copyright> - - <legalnotice> - <para>Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. You may - obtain a copy of the License at</para> - - <para><ulink - url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink></para> - - <para>Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an "AS IS" - BASIS, WITHOUT WARRANTIES OR CON... [truncated message content] |
From: <str...@us...> - 2007-01-28 16:57:18
|
Revision: 59 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=59&view=rev Author: streindl Date: 2007-01-28 08:57:16 -0800 (Sun, 28 Jan 2007) Log Message: ----------- First valid parts of user guide Modified Paths: -------------- amavisadmin/branches/documentation_1_0/docs/user_guide.xml Added Paths: ----------- amavisadmin/branches/documentation_1_0/docs/architecture.png Added: amavisadmin/branches/documentation_1_0/docs/architecture.png =================================================================== (Binary files differ) Property changes on: amavisadmin/branches/documentation_1_0/docs/architecture.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: amavisadmin/branches/documentation_1_0/docs/user_guide.xml =================================================================== --- amavisadmin/branches/documentation_1_0/docs/user_guide.xml 2007-01-28 16:44:38 UTC (rev 58) +++ amavisadmin/branches/documentation_1_0/docs/user_guide.xml 2007-01-28 16:57:16 UTC (rev 59) @@ -111,20 +111,20 @@ only after an administrator has approved the request.</para> <figure id="fig-architecture"> - <title>Architecture of a system receiving mails and processing them - trough Amavisd-new</title> + <title>Architecture of a system receiving mails and processing them + trough Amavisd-new</title> - <mediaobject> - <imageobject> - <imagedata fileref="architecture.png" /> - </imageobject> - </mediaobject> + <mediaobject> + <imageobject> + <imagedata fileref="architecture.png" /> + </imageobject> + </mediaobject> </figure> - - <para>Figure xx gives an overview about the general architecture - and how AmavisAdmin fits into the figure. The flow for incoming mails - (either internet or intranet) is as follows:</para> + <para><xref linkend="fig-architecture" /> gives an overview about the + general architecture and how AmavisAdmin fits into the figure. The flow + for incoming mails (either internet or intranet) is as follows:</para> + <procedure> <step> <para>The postfix daemon accepts an incoming mail. First basic @@ -148,7 +148,7 @@ <para>After performing the checks, general mail informartion is stored in the quarantine database. If the mail is containing problematic contents (i.e. viruses, SPAM, banned attachments,) also - the mail content is stored in the database. </para> + the mail content is stored in the database.</para> </step> <step> @@ -168,14 +168,45 @@ read his mail or informational mail.</para> </step> </procedure> + + <para>Assume a customer complains about a problem in one of your + products and you can immediately fix the problem and for customer + statisfaction, you are going to deliver a hot fix to the customer via + e-mail. While sending the file, the Amavisd-new scanner will reject the + delivery of the file as it contains an executable which are rejected by + your companies security policies.</para> + + <para>You can now log in into AmavisAdmin and you will immediately see + this (and probably other) blocked e-mail and as in this case you have a + reason to let this mail pass through to the customer, you will ask for + releasing the mail. This request will then pass to an admin who will + then approve (or reject) the request. After approval the AmavisAdmin + daemon will pass the mail trough Amavisd-new as if the mail would have + never been blocked.</para> + + <para>AmavisAdmin does a couple of other things, for example keeping the + database reasonable small by removing old mails, informing users and + adminstrators about new mails to be handled or approved, ...</para> + + <para>The advantage of AmavisAdmin is that there's no need to change the + existing flow or policies of handling SPAM/virus mails in the company. + By doing minor modifications in the Amavisd-new configuration (if + there's a SQL server in the loop already) you can incorporate + AmavisAdmin immediately. For details please refer to the installation + manual and the administration part later in this document.</para> </chapter> <chapter> <title>Logging in</title> <section> - <title>Logging in the first time</title> + <title>Connecting to AmavisAdmin</title> + <para>AmavisAdmin (from the user's perspecive) is a web application + that can be used from everywhere by connecting to a specific web page. + This can be done using your favourite web-browser to connect to the + AmavisAdmin landing page:</para> + <para></para> </section> </chapter> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-28 16:44:41
|
Revision: 58 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=58&view=rev Author: streindl Date: 2007-01-28 08:44:38 -0800 (Sun, 28 Jan 2007) Log Message: ----------- Filter tokens in XML sources Modified Paths: -------------- amavisadmin/trunk/tools/build_script.pl Modified: amavisadmin/trunk/tools/build_script.pl =================================================================== --- amavisadmin/trunk/tools/build_script.pl 2007-01-28 12:24:03 UTC (rev 57) +++ amavisadmin/trunk/tools/build_script.pl 2007-01-28 16:44:38 UTC (rev 58) @@ -24,6 +24,7 @@ use File::stat; use File::Basename; use File::Find; +use File::MimeInfo qw(mimetype); use File::Copy; use Cwd; @@ -34,7 +35,7 @@ sub createTar(); sub copy_dir($); -sub replaceParams(); +sub replaceParams($); sub copy_file($$); sub copy_doc_dir(); sub create_file_list(); @@ -45,10 +46,12 @@ my $man=0; my $compressbzip2 = 0; my $compressgzip = 0; -my $createtar=undef; +my $do_createtar=1; +my $createtar; +my $buildtime = time; GetOptions("path|p=s" => \$distdir, - "tar|t:s" => \$createtar, + "tar|t!" => \$do_createtar, "clean|c!" => \$cleandir, "bzip2" => \$compressbzip2, "gzip" => \$compressgzip, @@ -87,13 +90,10 @@ $branch="$1"; } -replaceParams(); +$distdir = replaceParams($distdir); -if (defined $createtar) { - if ($createtar eq "") { - $createtar = $distdir . ".tar"; - } -} +$createtar = $distdir . ".tar"; + my $tempdir = "$distdir/temp"; @@ -111,7 +111,7 @@ print "Output to $distdir\n"; -if (defined $createtar) { +if ($do_createtar) { print "Creating tar file $createtar\n"; } @@ -197,7 +197,7 @@ close OUT; # step 6: Tar and compression -if (defined $createtar) { +if ($do_createtar) { createTar(); if ($compressbzip2) { @@ -246,6 +246,29 @@ find ({wanted => \&file_list_item, no_chdir => 1 }, $distdir); } +sub filter_copy($$) { + my ($from, $to) = @_; + + if ($from =~ /.xml$/) { + my $distfile = basename($distdir); + + open IN, "<$from" or die "Cannot open $from for reading ($!)"; + open OUT, ">$to" or die "Cannot open $to for writing ($!)"; + while (<IN>) { + my $line = $_; + $line =~ s/\@version\@/$version::AmavisVersion/g; + $line =~ s/\@distname\@/$distfile/g; + $line =~ s/\@distfile\@/$createtar/g; + print OUT $line; + } + close IN; + close OUT; + } else { + # fast copy + copy ($from, $to); + } +} + sub callback_doc_file() { my $name = $File::Find::name; return if ($name =~ /\.svn/); @@ -256,7 +279,7 @@ } elsif (-d $name) { mkdir "$tempdir/$name"; } else { - copy ($name, "$tempdir/$name"); + filter_copy ($name, "$tempdir/$name"); } } @@ -298,18 +321,22 @@ copy ($from, $to) or die "Copy failed ($!)"; } -sub replaceParams() { - $distdir =~ s/\%V/\%v-r\%r-\%T\%m/g; +sub replaceParams($) { + my $parm = shift; + + $parm =~ s/\%V/\%v-r\%r-\%T\%m/g; my $version = $version::AmavisVersion; - $distdir =~ s/\%v/$version/g; - $distdir =~ s/\%r/$revision/g; - my $datestamp=time2str("%Y-%m-%d", time()); - my $timestamp=time2str("%Y%m%d%I%M%S", time()); - $distdir =~ s/\%d/$datestamp/g; - $distdir =~ s/\%t/$timestamp/g; - $distdir =~ s/\%T/$branch/g; - $distdir =~ s/\%m/$modified/g; - $distdir =~ s/\%p/AmavisAdmin/g; + $parm =~ s/\%v/$version/g; + $parm =~ s/\%r/$revision/g; + my $datestamp=time2str("%Y-%m-%d", $buildtime); + my $timestamp=time2str("%Y%m%d%I%M%S", $buildtime); + $parm =~ s/\%d/$datestamp/g; + $parm =~ s/\%t/$timestamp/g; + $parm =~ s/\%T/$branch/g; + $parm =~ s/\%m/$modified/g; + $parm =~ s/\%p/AmavisAdmin/g; + + return $parm; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-28 12:24:11
|
Revision: 57 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=57&view=rev Author: streindl Date: 2007-01-28 04:24:03 -0800 (Sun, 28 Jan 2007) Log Message: ----------- Merge from Trunk Modified Paths: -------------- amavisadmin/branches/documentation_1_0/docs/Makefile amavisadmin/branches/documentation_1_0/tools/reposInfo.pl amavisadmin/branches/documentation_1_0/webapp/build.xml amavisadmin/branches/documentation_1_0/webapp/src/java/amavisadmin.properties.in amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java Added Paths: ----------- amavisadmin/branches/documentation_1_0/AUTHORS amavisadmin/branches/documentation_1_0/NOTES amavisadmin/branches/documentation_1_0/README amavisadmin/branches/documentation_1_0/TODO amavisadmin/branches/documentation_1_0/db/postgres/create_tables.sql amavisadmin/branches/documentation_1_0/db/postgres/initial_load.sql amavisadmin/branches/documentation_1_0/tools/build_script.pl amavisadmin/branches/documentation_1_0/tools/version.pm Property Changed: ---------------- amavisadmin/branches/documentation_1_0/ amavisadmin/branches/documentation_1_0/docs/ Property changes on: amavisadmin/branches/documentation_1_0 ___________________________________________________________________ Name: svn:ignore - dist build SESSIONS.ser + AmavisAdmin* dist build SESSIONS.ser Copied: amavisadmin/branches/documentation_1_0/AUTHORS (from rev 56, amavisadmin/trunk/AUTHORS) =================================================================== --- amavisadmin/branches/documentation_1_0/AUTHORS (rev 0) +++ amavisadmin/branches/documentation_1_0/AUTHORS 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1,2 @@ +Stephen Reindl <sr...@sr...> +Project Lead and Maintainer Copied: amavisadmin/branches/documentation_1_0/NOTES (from rev 56, amavisadmin/trunk/NOTES) =================================================================== --- amavisadmin/branches/documentation_1_0/NOTES (rev 0) +++ amavisadmin/branches/documentation_1_0/NOTES 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1 @@ +... please read the LICENSE and README files for details Copied: amavisadmin/branches/documentation_1_0/README (from rev 56, amavisadmin/trunk/README) =================================================================== --- amavisadmin/branches/documentation_1_0/README (rev 0) +++ amavisadmin/branches/documentation_1_0/README 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1,11 @@ +AmavisAdmin +=========== + +This tool helps administrating data stored by Amavisd-new in an Postgres SQL +database. + +... more to come + +for installation details, please refer to docs/txt/installationguide.txt. + + Copied: amavisadmin/branches/documentation_1_0/TODO (from rev 56, amavisadmin/trunk/TODO) =================================================================== --- amavisadmin/branches/documentation_1_0/TODO (rev 0) +++ amavisadmin/branches/documentation_1_0/TODO 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1,20 @@ +The following things are open -*- outline -*- + +* User Interface + The user interface might be overhauled or even replaced by something + different than now. Currently the user interface is build on Rave, an WebUI + based on JSF/JSP by Sun/Netbeans + +* Database +** Support for Black/Whitelisting +** Support for MySQL + +* Security +** Role based security settings +** JAAS enabled login (for enterprise integration) + +* Documentation +* User Guide + +* ... more to come + Copied: amavisadmin/branches/documentation_1_0/db/postgres/create_tables.sql (from rev 56, amavisadmin/trunk/db/postgres/create_tables.sql) =================================================================== --- amavisadmin/branches/documentation_1_0/db/postgres/create_tables.sql (rev 0) +++ amavisadmin/branches/documentation_1_0/db/postgres/create_tables.sql 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1,156 @@ +-- This file is part of AmavisAdmin +-- +-- Copyright (C) 2007 Stephen Reindl +-- +-- create initial data model +-- +-- Table: users +CREATE TABLE users +( + id serial NOT NULL, + priority int4 NOT NULL DEFAULT 7, + policy_id int4 NOT NULL DEFAULT 1, + email varchar(255) NOT NULL, + fullname varchar(255), + "local" char(1), + CONSTRAINT users_pkey PRIMARY KEY (id), + CONSTRAINT users_email_key UNIQUE (email) +); + +-- Table: wblist +CREATE TABLE wblist +( + rid int4 NOT NULL, + sid int4 NOT NULL, + wb varchar(10) NOT NULL, + CONSTRAINT wblist_pkey PRIMARY KEY (rid, sid) +); + +-- Table: maddr +CREATE TABLE maddr +( + id serial NOT NULL, + email varchar(255) NOT NULL, + "domain" varchar(255) NOT NULL, + CONSTRAINT maddr_pkey PRIMARY KEY (id), + CONSTRAINT maddr_email_ux UNIQUE (email) +); + +-- Table: mailaddr +CREATE TABLE mailaddr +( + id serial NOT NULL, + priority int4 NOT NULL DEFAULT 7, + email varchar(255) NOT NULL, + CONSTRAINT mailaddr_pkey PRIMARY KEY (id), + CONSTRAINT mailaddr_email_ux UNIQUE (email) +); + +-- Table: policy +CREATE TABLE policy +( + id serial NOT NULL, + policy_name varchar(32), + virus_lover char(1), + spam_lover char(1), + banned_files_lover char(1), + bad_header_lover char(1), + bypass_virus_checks char(1), + bypass_spam_checks char(1), + bypass_banned_checks char(1), + bypass_header_checks char(1), + spam_modifies_subj char(1), + virus_quarantine_to varchar(64), + spam_quarantine_to varchar(64), + banned_quarantine_to varchar(64), + bad_header_quarantine_to varchar(64), + clean_quarantine_to varchar(64), + other_quarantine_to varchar(64), + spam_tag_level float8, + spam_tag2_level float8, + spam_kill_level float8, + spam_dsn_cutoff_level float8, + spam_quarantine_cutoff_level float8, + addr_extension_virus varchar(64), + addr_extension_spam varchar(64), + addr_extension_banned varchar(64), + addr_extension_bad_header varchar(64), + warnvirusrecip char(1), + warnbannedrecip char(1), + warnbadhrecip char(1), + newvirus_admin varchar(64), + virus_admin varchar(64), + banned_admin varchar(64), + bad_header_admin varchar(64), + spam_admin varchar(64), + spam_subject_tag varchar(64), + spam_subject_tag2 varchar(64), + message_size_limit int4, + banned_rulenames varchar(64), + CONSTRAINT policy_pkey PRIMARY KEY (id) +); + +-- Table: msgs +CREATE TABLE msgs +( + mail_id varchar(12) NOT NULL, + secret_id varchar(12) DEFAULT '', + am_id varchar(20) NOT NULL, + time_num int4 NOT NULL, + time_iso timestamptz NOT NULL, + sid int4 NOT NULL, + policy varchar(255) DEFAULT '', + client_addr varchar(255) DEFAULT '', + size int4 NOT NULL, + content char(1), + quar_type char(1), + quar_loc varchar(255) DEFAULT ''; + dsn_sent char(1), + spam_level float8, + message_id varchar(255) DEFAULT '', + from_addr varchar(255) DEFAULT '', + subject varchar(255) DEFAULT '', + host varchar(255) NOT NULL, + CONSTRAINT msgs_pkey PRIMARY KEY (mail_id), + CONSTRAINT msgs_sid_fkey FOREIGN KEY (sid) + REFERENCES maddr (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE RESTRICT +); + +-- Index: msgs_idx_sid +CREATE INDEX msgs_idx_sid ON msgs USING btree (sid); + +-- Index: msgs_idx_time_iso +CREATE INDEX msgs_idx_time_iso ON msgs USING btree (time_iso); + +-- Table: quarantine +CREATE TABLE quarantine +( + mail_id varchar(12) NOT NULL, + chunk_ind int4 NOT NULL, + mail_text bytea NOT NULL, + CONSTRAINT quarantine_pkey PRIMARY KEY (mail_id, chunk_ind), + CONSTRAINT quarantine_mail_id_fkey FOREIGN KEY (mail_id) + REFERENCES msgs (mail_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE CASCADE +); + +-- Table: msgrcpt +CREATE TABLE msgrcpt +( + mail_id varchar(12) NOT NULL, + rid int4 NOT NULL, + ds char(1) NOT NULL, + rs char(1) NOT NULL, + bl char(1) DEFAULT ' '::bpchar, + wl char(1) DEFAULT ' '::bpchar, + bspam_level float8, + smtp_resp varchar(255) DEFAULT '', + CONSTRAINT msgrcpt_pkey PRIMARY KEY (mail_id, rid), + CONSTRAINT msgrcpt_mail_id_fkey FOREIGN KEY (mail_id) + REFERENCES msgs (mail_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE CASCADE, + CONSTRAINT msgrcpt_rid_fkey FOREIGN KEY (rid) + REFERENCES maddr (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE RESTRICT +); \ No newline at end of file Copied: amavisadmin/branches/documentation_1_0/db/postgres/initial_load.sql (from rev 56, amavisadmin/trunk/db/postgres/initial_load.sql) =================================================================== --- amavisadmin/branches/documentation_1_0/db/postgres/initial_load.sql (rev 0) +++ amavisadmin/branches/documentation_1_0/db/postgres/initial_load.sql 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1,80 @@ +-- This file is part of AmavisAdmin +-- +-- Copyright (C) 2007 Stephen Reindl +-- +-- Perform an intial load for an empty database + +-- insert standard policies. +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Non-paying', 'N','N','N','N', 'Y','Y','Y','N', 'Y', 3.0, 7, 10); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Uncensored', 'Y','Y','Y','Y', 'N','N','N','N', 'N', 3.0, 999, 999); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Wants all spam','N','Y','N','N', 'N','N','N','N', 'Y', 3.0, 999, 999); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Wants viruses', 'Y','N','Y','Y', 'N','N','N','N', 'Y', 3.0, 6.9, 6.9); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Normal', 'N','N','N','N', 'N','N','N','N', 'Y', 3.0, 6.9, 6.9); +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Trigger happy', 'N','N','N','N', 'N','N','N','N', 'Y', 3.0, 5, 5); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Permissive', 'N','N','N','Y', 'N','N','N','N', 'Y', 3.0, 10, 20); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('6.5/7.8', 'N','N','N','N', 'N','N','N','N', 'N', 3.0, 6.5, 7.8); + +-- insert a catchall user that will be used to +-- define the profile in case no other match +-- was done. +INSERT + INTO users + (priority, policy_id, email, local) + SELECT id, 5, '@.', 'N' + FROM policy + WHERE policy_name = 'Normal'; + Property changes on: amavisadmin/branches/documentation_1_0/docs ___________________________________________________________________ Name: svn:ignore - installationguide installationguide.txt installationguide.fo installationguide.manifest* installationguide.html installationguide.pdf + installationguide installationguide.txt installationguide.fo installationguide.manifest* installationguide.html installationguide.pdf user_guide user_guide.txt user_guide.fo user_guide.manifest* user_guide.html user_guide.pdf Modified: amavisadmin/branches/documentation_1_0/docs/Makefile =================================================================== --- amavisadmin/branches/documentation_1_0/docs/Makefile 2007-01-28 11:22:04 UTC (rev 56) +++ amavisadmin/branches/documentation_1_0/docs/Makefile 2007-01-28 12:24:03 UTC (rev 57) @@ -197,15 +197,15 @@ # ** stylesheet for testing whether a file has a refentry # ----------------------------------------------------------------- REFENTRY_CHECK := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0" \ - xmlns:db="http://docbook.org/ns/docbook" \ - > \ - <xsl:output method="text"/> \ - <xsl:template match="/"> \ - <xsl:if test="//refentry|//db:refentry"> \ - <xsl:text>true</xsl:text> \ - </xsl:if> \ - </xsl:template> \ + version="1.0" \ + xmlns:db="http://docbook.org/ns/docbook" \ + > \ +<xsl:output method="text"/> \ +<xsl:template match="/"> \ +<xsl:if test="//refentry|//db:refentry"> \ +<xsl:text>true</xsl:text> \ +</xsl:if> \ +</xsl:template> \ </xsl:stylesheet> # ----------------------------------------------------------------- @@ -214,44 +214,48 @@ # # for DBLaTeX DBX_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:param name="co.linkends.show">0</xsl:param> \ - <xsl:param name="callout.markup.circled">1</xsl:param> \ - <xsl:param name="callout.linkends.hot">0</xsl:param> \ - <xsl:param name="doc.publisher.show">1</xsl:param> \ - <xsl:param name="term.breakline">1</xsl:param> \ - <xsl:param name="doc.alignment">left</xsl:param> \ - <xsl:param name="newtbl.use">1</xsl:param> \ - <xsl:param name="latex.hyperparam"/> \ - <xsl:param name="latex.style">docbook</xsl:param> \ - <xsl:param name="latex.biblio.output">all</xsl:param> \ - <xsl:param name="latex.bibfiles">""</xsl:param> \ - <xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \ - <xsl:param name="latex.output.revhistory">0</xsl:param> \ - <xsl:param name="latex.figure.position">[htbp]</xsl:param> \ - <xsl:param name="latex.figure.boxed">0</xsl:param> \ - <xsl:param name="latex.babel.use">1</xsl:param> \ - <xsl:param name="latex.babel.language"></xsl:param> \ - <xsl:param name="latex.class.options">twoside</xsl:param> \ - <xsl:param name="biblioentry.item.separator">, </xsl:param> \ - <xsl:param name="refentry.xref.manvolnum">1</xsl:param> \ - <xsl:param name="refsynopsis.title">Synopsis</xsl:param> \ - <xsl:param name="refnamediv.title"></xsl:param> \ - <xsl:param name="funcsynopsis.style">ansi</xsl:param> \ - <xsl:param name="funcsynopsis.decoration">1</xsl:param> \ - <xsl:param name="function.parens">0</xsl:param> \ - <xsl:param name="classsynopsis.default.language">java</xsl:param> \ - <xsl:param name="show.comments">0</xsl:param> \ + version="1.0"> \ +<xsl:param name="co.linkends.show">0</xsl:param> \ +<xsl:param name="callout.markup.circled">1</xsl:param> \ +<xsl:param name="callout.linkends.hot">0</xsl:param> \ +<xsl:param name="doc.publisher.show">1</xsl:param> \ +<xsl:param name="term.breakline">1</xsl:param> \ +<xsl:param name="doc.alignment">left</xsl:param> \ +<xsl:param name="newtbl.use">1</xsl:param> \ +<xsl:param name="latex.hyperparam"/> \ +<xsl:param name="latex.style">docbook</xsl:param> \ +<xsl:param name="latex.biblio.output">all</xsl:param> \ +<xsl:param name="latex.bibfiles">""</xsl:param> \ +<xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \ +<xsl:param name="latex.output.revhistory">0</xsl:param> \ +<xsl:param name="latex.figure.position">[htbp]</xsl:param> \ +<xsl:param name="latex.figure.boxed">0</xsl:param> \ +<xsl:param name="latex.babel.use">1</xsl:param> \ +<xsl:param name="latex.babel.language"></xsl:param> \ +<xsl:param name="latex.class.options">twoside</xsl:param> \ +<xsl:param name="biblioentry.item.separator">, </xsl:param> \ +<xsl:param name="refentry.xref.manvolnum">1</xsl:param> \ +<xsl:param name="refsynopsis.title">Synopsis</xsl:param> \ +<xsl:param name="refnamediv.title"></xsl:param> \ +<xsl:param name="funcsynopsis.style">ansi</xsl:param> \ +<xsl:param name="funcsynopsis.decoration">1</xsl:param> \ +<xsl:param name="function.parens">0</xsl:param> \ +<xsl:param name="classsynopsis.default.language">java</xsl:param> \ +<xsl:param name="show.comments">0</xsl:param> \ </xsl:stylesheet> # for FO output FO_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - xmlns:fo="http://www.w3.org/1999/XSL/Format" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \ - <xsl:include href="cust/titlepage.templates.xsl"/> \ - <xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \ - <xsl:param name="paper.type">A4</xsl:param> \ + xmlns:fo="http://www.w3.org/1999/XSL/Format" \ + version="1.0"> \ +<xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \ +<xsl:include href="cust/titlepage.templates.xsl"/> \ +<xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \ +<xsl:param name="paper.type">A4</xsl:param> \ +<xsl:param name="callout.unicode">1</xsl:param> \ +<xsl:param name="callout.graphics">0</xsl:param> \ +<xsl:param name="admon.graphics">1</xsl:param> \ +<xsl:param name="admon.graphics.extension">.svg</xsl:param> \ <xsl:param name="draft.watermark.image"></xsl:param> \ <xsl:param name="hyphenation">false</xsl:param> \ <xsl:param name="hyphenate.verbatim">0</xsl:param> \ Copied: amavisadmin/branches/documentation_1_0/tools/build_script.pl (from rev 56, amavisadmin/trunk/tools/build_script.pl) =================================================================== --- amavisadmin/branches/documentation_1_0/tools/build_script.pl (rev 0) +++ amavisadmin/branches/documentation_1_0/tools/build_script.pl 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1,502 @@ +#!/usr/bin/perl -w + +# Script to create a target distribution +# + +# it creates a directory dist in the current directory and compiles a ready to +# use war file, database scripts and compiled documentation as well as API +# documentation into this folder. + +use strict; +use English; + +BEGIN { + push @INC, "tools"; # for the version stuff +} + +use version; + +use Getopt::Long; +use Pod::Usage; + +use Archive::Tar; +use File::Path; +use File::stat; +use File::Basename; +use File::Find; +use File::Copy; + +use Cwd; + +use Date::Format; + +use SVN::Client; + +sub createTar(); +sub copy_dir($); +sub replaceParams(); +sub copy_file($$); +sub copy_doc_dir(); +sub create_file_list(); + +my $distdir = "%p-v%V"; +my $cleandir = 0; +my $help=0; +my $man=0; +my $compressbzip2 = 0; +my $compressgzip = 0; +my $createtar=undef; + +GetOptions("path|p=s" => \$distdir, + "tar|t:s" => \$createtar, + "clean|c!" => \$cleandir, + "bzip2" => \$compressbzip2, + "gzip" => \$compressgzip, + "help|h" => \$help, + "man|m" => \$man) or pod2usage (2); +pod2usage(1) if ($help); +pod2usage(-exitstatus => 0, -verbose => 2) if ($man); + +my $_info; + +sub funcRev { + my( $path, $info, $pool ) = @_; + $_info = $info; +}; + +my $modified = ""; + +my $funcStatus = sub { + $modified = "-modified"; +}; + +my $ctx = SVN::Client->new(); + +my $cwd = getcwd(); +$ctx->info( $cwd, undef, undef, \&funcRev, 0 ); +$ctx->status( $cwd, undef, $funcStatus, 1, 0, 0, 0); +my $revision = $_info->rev; +my $branch="unknown"; + +my $url = $_info->URL; +if ($url =~ /trunk/) { + $branch="trunk"; +} elsif ($url =~ /branches\/([^\/]+)/) { + $branch="b-$1"; +} elsif ($url =~ /tags\/([^\/]+)/) { + $branch="$1"; +} + +replaceParams(); + +if (defined $createtar) { + if ($createtar eq "") { + $createtar = $distdir . ".tar"; + } +} +my $tempdir = "$distdir/temp"; + + +my %files = ("LICENSE" => "LICENSE", + "README" => "README", + "TODO" => "TODO", + "NOTES" => "NOTES", + "AUTHORS" => "AUTHORS", + "$tempdir/AmavisAdmin.war" => "AmavisAdmin.war", + "\@db" => "db", + "$tempdir/docs/installationguide.pdf" => "docs/pdf/installationguide.pdf", + "$tempdir/docs/installationguide.txt" => "docs/txt/installationguide.txt", + "\!$tempdir/docs/installationguide/" => 'docs/html/installationguide/', + ); + + +print "Output to $distdir\n"; +if (defined $createtar) { + print "Creating tar file $createtar\n"; +} + +if (-d "$distdir") { + if ($cleandir) { + my $stat = stat($distdir); + if ($stat->uid() != $UID) { + die "Cannot delete other user's file (security)"; + } + rmtree($distdir); + if (-d "$distdir") { + die "Cannot remove $distdir"; + } + } else { + die "$distdir does already exist"; + } +} + +mkpath ($distdir) or die "Cannot create directory $distdir"; + +# step 0 +# create intermediate directories which will be deleted afterwards +mkdir $tempdir; + +# step 1: run ant +my @antArgs=("-Dbuild.dir=" . getcwd() . "/$tempdir", + "-Ddist.dir=" . getcwd() . "/$tempdir", + "-buildfile", "webapp/build.xml", + "clean", + "dist"); + +system "ant", @antArgs; + +if ($? != 0) { + die "Build failed. Please check before continuing"; +} + +# step 2: documentation +copy_doc_dir (); +system "cd $tempdir/docs && touch *.xml && make clean && make"; + +if ($? != 0) { + die "Documentation build failed. Please check before continuing"; +} + +my $copydir_target = ""; +my $skip_dir = 0; + +# step 3: Copy/Move files +foreach my $file (keys %files) { + if ($file =~ /^@.*/) { + my $from_file = substr($file, 1); + copy_dir($from_file); + } elsif ($file =~ /^!.*/) { + # special dir + my $from_file = substr($file, 1); + $skip_dir = length ($from_file); + $copydir_target = $files{$file}; + copy_dir($from_file); + $copydir_target = ""; # reset dir target + } else { + copy_file($file, $files{$file}); + } +} + +# step 4: cleanup temp dir +rmtree ("$tempdir"); + + +# step 5: create CONTENTS file + +my @file_list = (); +create_file_list (); +open OUT, ">$distdir/CONTENTS" or die "Cannot create contents file ($!)"; +print OUT + "This file contains a list of all files included in this distribution.\n"; +print OUT + "Please read the file LICENSE!\n"; + +foreach my $line (@file_list) { + print OUT $line, "\n"; +} +close OUT; + +# step 6: Tar and compression +if (defined $createtar) { + createTar(); + + if ($compressbzip2) { + my $mod = "IO::Compress::Bzip2"; + unless (eval "require $mod") { + die "Bzip2 compression is required from here\n"; + } + use IO::Compress::Bzip2 qw (bzip2 $Bzip2Error); + bzip2 $createtar => $createtar . ".bz2" + or die "bzip2 failed: $Bzip2Error\n"; + unlink $createtar; # remove tar file + } elsif ($compressgzip) { + my $mod = "IO::Compress::Gzip"; + unless (eval "require $mod") { + die "Gzip compression is required from here\n"; + } + use IO::Compress::Gzip qw (gzip $GzipError); + gzip $createtar => $createtar . ".bz2" + or die "gzip failed: $GzipError\n"; + unlink $createtar; # remove tar file + } + # in case of tar output, remove the distribution directory. + rmtree "$distdir"; +} + + +exit 0; + +sub createTar() { + my $tar = Archive::Tar->new; + + $tar->add_files(@file_list); + + $tar->write($createtar) or die "Cannot create tar file ($!)"; +} + +sub file_list_item() { + my $file = $File::Find::name; + + if (-f "$file") { + push @file_list, $file; + } +} + +sub create_file_list() { + find ({wanted => \&file_list_item, no_chdir => 1 }, $distdir); +} + +sub callback_doc_file() { + my $name = $File::Find::name; + return if ($name =~ /\.svn/); + my $stat = lstat($name); + if (-l $name) { + my $link = readlink ($name); + symlink ($link, "$tempdir/$name"); + } elsif (-d $name) { + mkdir "$tempdir/$name"; + } else { + copy ($name, "$tempdir/$name"); + } +} + + +sub copy_doc_dir () { + find({wanted => \&callback_doc_file, no_chdir => 1 }, "docs"); +} + + +sub callback_single_file() { + my $name = $File::Find::name; + return if ($name =~ /\.svn/); + my $to = $name; + + if ($copydir_target ne "") { + $to = $copydir_target . substr ($name, $skip_dir); + } + + if (-d $name) { + mkpath "$distdir/$to" or die "Cannot create $distdir/$to ($!)"; + } else { + copy_file($name, $to); + } +} + +sub copy_dir($) { + my $path = shift; + find({wanted => \&callback_single_file, no_chdir => 1 }, $path); +} + +sub copy_file($$) { + my ($from, $to) = @_; + $to = "$distdir/$to"; + print "Copy $from -> $to\n"; + my $dir = dirname($to); + if (! -e "$dir") { + mkpath ($dir) or die "Cannot create $dir ($!)"; + } + copy ($from, $to) or die "Copy failed ($!)"; +} + +sub replaceParams() { + $distdir =~ s/\%V/\%v-r\%r-\%T\%m/g; + my $version = $version::AmavisVersion; + $distdir =~ s/\%v/$version/g; + $distdir =~ s/\%r/$revision/g; + my $datestamp=time2str("%Y-%m-%d", time()); + my $timestamp=time2str("%Y%m%d%I%M%S", time()); + $distdir =~ s/\%d/$datestamp/g; + $distdir =~ s/\%t/$timestamp/g; + $distdir =~ s/\%T/$branch/g; + $distdir =~ s/\%m/$modified/g; + $distdir =~ s/\%p/AmavisAdmin/g; +} + + +__END__ + +=head1 NAME + +build_script.pl - Create distribution for AmavisAdmin + +=head1 SYNOPSIS + +build_script.pl [options...] + + Options: + -path=path Destination directory + -clean Clean destination directory if exist + -tar=[file] Create tar output file + -bzip2 Compress output file as bzip2 + -gzip Compress output file as gzip + -help brief help message + -man full documentation + +=head1 OPTIONS + +=over 8 + +=item B<-path> + +You can specify a different output directory for the destination where +the build script will put it's output. For example the command + + B<tools/build_script.pl> -path=I</tmp/dist> + +will build the output into the directory F</tmp/dist>. + +If the target directory does already exist, the script will die with an +error. This can be prevented by using the L</-clean> option. + +The target directory might contain several special tokens which will be +replaced before creating the actual directory. The following tokens are +defined: + +=over 8 + +=item B<%p> + +This token will be replaced by the application name (e.g. B<AmavisAdmin>). + +=item B<%v> + +This token will be replaced by the version (taken from +F<tools/version.pm>). The version will be in the form +C<major.minor>, e.g. B<1.0>. + +=item B<%V> + +The token will be replaced by the full version number including SVN revision +and branch type together with the information, if the build is based on +modified sources. As this is used in filenames, the version string will +not contain any spaces. An example for B<%V> might look like this: + + 1.0-r123-alpha2-modified + +where C<1.0> is the same as given by B<%v>, the string C<r123> gives the +current SVN revision, C<alpha2> denotes the current tag (see the description +for B<%T> for details).In case the build is based on uncommitted changes to +the repository, the term C<-modified> will be added to the version. This token +is actually a shortcut for + + %v-r%r-%T%m + +=item B<%r> + +This token will be replaced by the subversion revision number (e.g. C<123>). + +=item B<%T> + +This token will be replaced by the branch that is going to be build. In case +of building the trunk you will see the string C<trunk> here, for working in +branches you will see C<branch-> followed by the branch-name +(e.g. C<branch-V1_X>). If you build a tagged version (located under the +F<tags> folder in the subversion repository), only the tag-name itself is +returned (e.g. C<V_1_3_1>). + +=item B<%m> + +This token will be replaced with the string C<-modified> in case the current +working directory has been modified (i.e. the command C<svn status> returns +any output). + +=item B<%d> + +This token will be replaced by the date in the form C<YYYY-MM-DD>. + +=item B<%t> + +This token will be replaced by the current timestamp in the form +C<YYYYMMDDhhmmss>. + +=back + +=item B<-clean> + +If the target directory does already exist, delete the contents before +continuing. This option does nothing if the target directory does not +exist. + +=item B<-tar> + +If set, create a tar file with the contents of the directory just being build. +If the argument is passed without a parameter, the filename will be the name +of the B<-path> parameter followed by C<.tar>. In case no path is given on the +command line, the name will be C<dist.tar>. Please look also for B<-bzip2> and +B<-gzip> for compression. + +The filename can contain the same tokens as defined in the B<-path> option. + +=item B<-bzip2> + +If B<-tar> was given the output tar file will be compressed by using the +L<bzip2> tool. The output file type will be renamed to C<.tar.bzip2>. + +=item B<-bzip2> + +If B<-tar> was given the output tar file will be compressed by using the +L<gzip> tool. The output file type will be renamed to C<.tar.gz>. + +=item B<-help> + +Print a brief help message and exits. + +=item B<-man> + +Prints the manual page and exits. + +=back + +=head1 DESCRIPTION + +This script is used to create a distribution directory and (optionally) a tar +file containing the distribution. + +The script is compiling the web application and creating out of the generated +.war file and other files a directory which follows the following structure: + + path + +---+-LICENSE + +-README + +-NOTES + +-TODO + +-CONTENTS (list of files in directory) + +-AmavisAdmin.war + +-db (contents of the db sub directory) + +-docs + +----+pdf (generated PDF documentation) + +html(generated HTML documentation) + +txt (generated TXT documentation) + +=head2 File copying + +Files are copied according to the hash %files. This hash maps a source file +related to the project base directory to the target folder. To copy files created during the process, use the C<$tempdir> variable for reference. For example, the mapping + + "$tempdir/AmavisAdmin.war" => "AmavisAdmin.war" + +copies the generated war file from it's temporary location to the target +location. + +=head3 Special copy commands + +There's the option to copy complete trees out of the source tree to the target tree. This can be done by prefixing the source tree key by an B<@> sign. The following line copies the complete C<db> folder: + + "\@db" => "db" + +The mapping result is not used in this case. If you want to copy a directory +from another location (e.g. the C<$tempdir>) path, you should use the special +indicator B<!>. The following example copies all files from the location +B<$tempdir/docs/installationguide/> to the location +B<docs/html/installationguide/>. + + "\!$tempdir/docs/installationguide/" => 'docs/html/installationguide/' + + +=head1 AUTHOR + +Stephen Reindl <sr...@sr...> + +=head1 BUGS + +Probably many as this tool is used for development purposes only. Modified: amavisadmin/branches/documentation_1_0/tools/reposInfo.pl =================================================================== --- amavisadmin/branches/documentation_1_0/tools/reposInfo.pl 2007-01-28 11:22:04 UTC (rev 56) +++ amavisadmin/branches/documentation_1_0/tools/reposInfo.pl 2007-01-28 12:24:03 UTC (rev 57) @@ -13,12 +13,18 @@ # this is an development version. use strict; +BEGIN { + push @INC, "../tools"; # for ant + push @INC, "tools"; # for root dir +} + use SVN::Client; use SVK::Command::Info; use SVK; use SVK::XD; use Cwd; +use version; my $op = shift; @@ -40,13 +46,10 @@ my $cwd = getcwd(); $ctx->info( $cwd, undef, undef, \&funcRev, 0 ); $ctx->status( $cwd, undef, $funcStatus, 1, 0, 0, 0); +print "version=", $version::AmavisVersion, "\n"; +print "dbversion=", $version::DatabaseVersion, "\n"; print "revision=", $_info->rev, "\n"; print "clean_build=", $statusChanged ? "false" : "true", "\n"; -if ($cwd =~ /\/home\//) { - print "build_type=private\n"; -} else { - print "build_type=batch\n"; -} my $url = $_info->URL; if ($url =~ /trunk/) { Copied: amavisadmin/branches/documentation_1_0/tools/version.pm (from rev 56, amavisadmin/trunk/tools/version.pm) =================================================================== --- amavisadmin/branches/documentation_1_0/tools/version.pm (rev 0) +++ amavisadmin/branches/documentation_1_0/tools/version.pm 2007-01-28 12:24:03 UTC (rev 57) @@ -0,0 +1,37 @@ +# This file has only one purpose: In contains the version string used to build +# conficuration files and other topics where the version number is important. + +package version; + +use strict; +use warnings; + +BEGIN { + use Exporter(); + + our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); + + # Version of this module (not related to the AmavisAdmin version) + $VERSION = 1.00; + + @ISA=qw(Exporter); + + @EXPORT=(); + %EXPORT_TAGS=(); + @EXPORT_OK= qw ($AmavisVersion $DatabaseVersion); +} + +our @EXPORT_OK; + +our $AmavisVersion; +our $DatabaseVersion; + +# Here the version is set +#>>>>>>>>>>>>>>>>>>>>>>>> +$AmavisVersion = "1.0"; +$DatabaseVersion = "1"; +#<<<<<<<<<<<<<<<<<<<<<<<< + +END { } + +1; Modified: amavisadmin/branches/documentation_1_0/webapp/build.xml =================================================================== --- amavisadmin/branches/documentation_1_0/webapp/build.xml 2007-01-28 11:22:04 UTC (rev 56) +++ amavisadmin/branches/documentation_1_0/webapp/build.xml 2007-01-28 12:24:03 UTC (rev 57) @@ -84,8 +84,8 @@ <format property="build.timestamp" pattern="yyyyMMdd'T'HHmmssZ" locale="en"/> </tstamp> - <exec executable="/usr/bin/perl"> - <arg value="tools/reposInfo.pl" /> + <exec executable="/usr/bin/perl" failonerror="true"> + <arg value="../tools/reposInfo.pl" /> <redirector output="reposinfo.properties" /> </exec> <copy file="${src.dir}/amavisadmin.properties.in" @@ -100,7 +100,7 @@ </target> <target name="-pre-dist"> - <copy file="LICENSE" + <copy file="../LICENSE" tofile="${build.web.dir}/LICENSE" filtering="false" overwrite="true"> </copy> Modified: amavisadmin/branches/documentation_1_0/webapp/src/java/amavisadmin.properties.in =================================================================== --- amavisadmin/branches/documentation_1_0/webapp/src/java/amavisadmin.properties.in 2007-01-28 11:22:04 UTC (rev 56) +++ amavisadmin/branches/documentation_1_0/webapp/src/java/amavisadmin.properties.in 2007-01-28 12:24:03 UTC (rev 57) @@ -1,35 +1,31 @@ -##/* -## * Copyright (C) 2006,2007 Stephen Reindl. -## * -## * Licensed under the Apache License, Version 2.0 (the "License"); -## * you may not use this file except in compliance with the License. -## * You may obtain a copy of the License at -## * -## * http://www.apache.org/licenses/LICENSE-2.0 -## * -## * Unless required by applicable law or agreed to in writing, software -## * distributed under the License is distributed on an "AS IS" BASIS, -## * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## * See the License for the specific language governing permissions and -## * limitations under the License. -## */ - - -# AmavisAdmin properties file -# This file contains basic settings - -amavisadmin.major = 0 -amavisadmin.minor = 1 - -# those fields are translated automatically -amavisadmin.branch = @branch@ -amavisadmin.build = @revision@ -amavisadmin.build_type = @build_type@ -amavisadmin.clean_build = @clean_build@ - -# If you ever change the datamodel, please increase this value -# and provide an upgrade script in the db topic -amavisadmin.db_version = 1 - -# Build time -amavisadmin.buildtime = @TSTAMP@ +##/* +## * Copyright (C) 2006,2007 Stephen Reindl. +## * +## * Licensed under the Apache License, Version 2.0 (the "License"); +## * you may not use this file except in compliance with the License. +## * You may obtain a copy of the License at +## * +## * http://www.apache.org/licenses/LICENSE-2.0 +## * +## * Unless required by applicable law or agreed to in writing, software +## * distributed under the License is distributed on an "AS IS" BASIS, +## * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## * See the License for the specific language governing permissions and +## * limitations under the License. +## */ + + +# AmavisAdmin properties file +# This file contains basic settings + +amavisadmin.version = @version@ + +# those fields are translated automatically +amavisadmin.branch = @branch@ +amavisadmin.build = @revision@ +amavisadmin.clean_build = @clean_build@ + +amavisadmin.db_version = @dbversion@ + +# Build time +amavisadmin.buildtime = @TSTAMP@ Modified: amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java =================================================================== --- amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java 2007-01-28 11:22:04 UTC (rev 56) +++ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java 2007-01-28 12:24:03 UTC (rev 57) @@ -85,14 +85,8 @@ if (_localVersion == null) { initProps(); StringBuffer str = new StringBuffer(20); - str.append(props.getProperty("amavisadmin.major", "Unknown")); - str.append('.'); - str.append(props.getProperty("amavisadmin.minor", "unknown")); + str.append(props.getProperty("amavisadmin.version", "Unknown")); - String buildType = props.getProperty("amavisadmin.build_type"); - if (buildType.equals("local")) { - str.append (" local"); - } str.append (" build "); str.append (props.getProperty("amavisadmin.build")); str.append (" ("); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-28 11:22:11
|
Revision: 56 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=56&view=rev Author: streindl Date: 2007-01-28 03:22:04 -0800 (Sun, 28 Jan 2007) Log Message: ----------- Merge from documentation branch Modified Paths: -------------- amavisadmin/trunk/docs/user_guide.xml Added Paths: ----------- amavisadmin/trunk/docs/architecture.sdr Copied: amavisadmin/trunk/docs/architecture.sdr (from rev 55, amavisadmin/branches/documentation_1_0/docs/architecture.sdr) =================================================================== (Binary files differ) Modified: amavisadmin/trunk/docs/user_guide.xml =================================================================== --- amavisadmin/trunk/docs/user_guide.xml 2007-01-28 11:19:34 UTC (rev 55) +++ amavisadmin/trunk/docs/user_guide.xml 2007-01-28 11:22:04 UTC (rev 56) @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> -<article> - <articleinfo> +<book> + <bookinfo> <title>AmavisAdmin</title> <subtitle>User Manual</subtitle> @@ -48,7 +48,7 @@ <revision> <revnumber>0.1</revnumber> - <date>2007-01-22</date> + <date>2007-01-28</date> <authorinitials>sr</authorinitials> @@ -57,9 +57,9 @@ </revdescription> </revision> </revhistory> - </articleinfo> + </bookinfo> - <section> + <preface> <title>Preface</title> <para>This document describes how to use AmavisAdmin from a user's @@ -69,18 +69,115 @@ found in the <citetitle id="ref-installation-manual">installation manual</citetitle>.</para> - <section> - <title>Bibliography</title> + <para>The manual is splitted into two major parts:</para> - <bibliography> - <biblioentry id="maler96"> - <title>From Text to Model to Markup</title> + <orderedlist> + <listitem> + <para>The first part describes how to use and work with + AmavisAdmin</para> + </listitem> - <subtitle></subtitle> - </biblioentry> - </bibliography> + <listitem> + <para>The second part describes how to adminstrate AmavisAdmin</para> + </listitem> + </orderedlist> + </preface> - <para></para> - </section> - </section> -</article> \ No newline at end of file + <part id="part-how-to-use"> + <title>How to use AmavisAdmin</title> + + <partintro> + <para>This part shows how to use AmavisAdmin as a regular user. It + describes all the standard use cases and helps to understand how + AmavisAdmin is working.</para> + + <para>In addition, <xref linkend="chp-what-is-amavisadmin" /> describes + how AmavisAdmin is working and how it interacts with the current + system.</para> + </partintro> + + <chapter id="chp-what-is-amavisadmin"> + <title>What is AmavisAdmin</title> + + <para>AmavisAdmin is a tool desiged to support you in handling SPAM, + virus or mails with banned attachments. Basically Amavisd-new (the SPAM + and virus filter that is used in your network to prevent you from + reciving malcious mails) is storing all mails that are not delivered to + a user in a database. It is now up to the user to decide if the mails + that have been blocked are going to be release (i.e. sent anyhow) or if + they can be deleted from the system. For security reasons mails are not + delivered automatically in case the user has requested to release the + mail. They are marked with a special status and are going to be released + only after an administrator has approved the request.</para> + + <figure id="fig-architecture"> + <title>Architecture of a system receiving mails and processing them + trough Amavisd-new</title> + + <mediaobject> + <imageobject> + <imagedata fileref="architecture.png" /> + </imageobject> + </mediaobject> + </figure> + + <para>Figure xx gives an overview about the general architecture + and how AmavisAdmin fits into the figure. The flow for incoming mails + (either internet or intranet) is as follows:</para> + + <procedure> + <step> + <para>The postfix daemon accepts an incoming mail. First basic + checks are done like correct mail header, relay checks, ...</para> + </step> + + <step> + <para>Postfix sends the mail towards amavis for further checks. + Amavis does several checks now to analyse the mail (e.g. checking + for banned attachments, does the mail contain virus).</para> + + <substeps> + <step> + <para>The Virus-Scanner checks in parallel if the mail contains + any known virus.</para> + </step> + </substeps> + </step> + + <step> + <para>After performing the checks, general mail informartion is + stored in the quarantine database. If the mail is containing + problematic contents (i.e. viruses, SPAM, banned attachments,) also + the mail content is stored in the database. </para> + </step> + + <step> + <para>Amavis now is either sending the mail contents back to Postfix + to deliver the mail to the user or in case the mail has been + rejected (i.e. a virus mail or banned content,) the user gets an + information about what happened to his mail.</para> + </step> + + <step> + <para>Postfix is delivering the mail now to the IMAP-Server that is + responsible for sending the mail to the user's mail box.</para> + </step> + + <step> + <para>After the mail is stored in the user's mail box, the user can + read his mail or informational mail.</para> + </step> + </procedure> + </chapter> + + <chapter> + <title>Logging in</title> + + <section> + <title>Logging in the first time</title> + + <para></para> + </section> + </chapter> + </part> +</book> \ 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-28 11:19:34
|
Revision: 55 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=55&view=rev Author: streindl Date: 2007-01-28 03:19:34 -0800 (Sun, 28 Jan 2007) Log Message: ----------- Further documentation changes Modified Paths: -------------- amavisadmin/branches/documentation_1_0/docs/user_guide.xml Added Paths: ----------- amavisadmin/branches/documentation_1_0/docs/architecture.sdr Added: amavisadmin/branches/documentation_1_0/docs/architecture.sdr =================================================================== (Binary files differ) Property changes on: amavisadmin/branches/documentation_1_0/docs/architecture.sdr ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: amavisadmin/branches/documentation_1_0/docs/user_guide.xml =================================================================== --- amavisadmin/branches/documentation_1_0/docs/user_guide.xml 2007-01-27 12:17:28 UTC (rev 54) +++ amavisadmin/branches/documentation_1_0/docs/user_guide.xml 2007-01-28 11:19:34 UTC (rev 55) @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> -<article> - <articleinfo> +<book> + <bookinfo> <title>AmavisAdmin</title> <subtitle>User Manual</subtitle> @@ -48,7 +48,7 @@ <revision> <revnumber>0.1</revnumber> - <date>2007-01-22</date> + <date>2007-01-28</date> <authorinitials>sr</authorinitials> @@ -57,9 +57,9 @@ </revdescription> </revision> </revhistory> - </articleinfo> + </bookinfo> - <section> + <preface> <title>Preface</title> <para>This document describes how to use AmavisAdmin from a user's @@ -69,18 +69,115 @@ found in the <citetitle id="ref-installation-manual">installation manual</citetitle>.</para> - <section> - <title>Bibliography</title> + <para>The manual is splitted into two major parts:</para> - <bibliography> - <biblioentry id="maler96"> - <title>From Text to Model to Markup</title> + <orderedlist> + <listitem> + <para>The first part describes how to use and work with + AmavisAdmin</para> + </listitem> - <subtitle></subtitle> - </biblioentry> - </bibliography> + <listitem> + <para>The second part describes how to adminstrate AmavisAdmin</para> + </listitem> + </orderedlist> + </preface> - <para></para> - </section> - </section> -</article> \ No newline at end of file + <part id="part-how-to-use"> + <title>How to use AmavisAdmin</title> + + <partintro> + <para>This part shows how to use AmavisAdmin as a regular user. It + describes all the standard use cases and helps to understand how + AmavisAdmin is working.</para> + + <para>In addition, <xref linkend="chp-what-is-amavisadmin" /> describes + how AmavisAdmin is working and how it interacts with the current + system.</para> + </partintro> + + <chapter id="chp-what-is-amavisadmin"> + <title>What is AmavisAdmin</title> + + <para>AmavisAdmin is a tool desiged to support you in handling SPAM, + virus or mails with banned attachments. Basically Amavisd-new (the SPAM + and virus filter that is used in your network to prevent you from + reciving malcious mails) is storing all mails that are not delivered to + a user in a database. It is now up to the user to decide if the mails + that have been blocked are going to be release (i.e. sent anyhow) or if + they can be deleted from the system. For security reasons mails are not + delivered automatically in case the user has requested to release the + mail. They are marked with a special status and are going to be released + only after an administrator has approved the request.</para> + + <figure id="fig-architecture"> + <title>Architecture of a system receiving mails and processing them + trough Amavisd-new</title> + + <mediaobject> + <imageobject> + <imagedata fileref="architecture.png" /> + </imageobject> + </mediaobject> + </figure> + + <para>Figure xx gives an overview about the general architecture + and how AmavisAdmin fits into the figure. The flow for incoming mails + (either internet or intranet) is as follows:</para> + + <procedure> + <step> + <para>The postfix daemon accepts an incoming mail. First basic + checks are done like correct mail header, relay checks, ...</para> + </step> + + <step> + <para>Postfix sends the mail towards amavis for further checks. + Amavis does several checks now to analyse the mail (e.g. checking + for banned attachments, does the mail contain virus).</para> + + <substeps> + <step> + <para>The Virus-Scanner checks in parallel if the mail contains + any known virus.</para> + </step> + </substeps> + </step> + + <step> + <para>After performing the checks, general mail informartion is + stored in the quarantine database. If the mail is containing + problematic contents (i.e. viruses, SPAM, banned attachments,) also + the mail content is stored in the database. </para> + </step> + + <step> + <para>Amavis now is either sending the mail contents back to Postfix + to deliver the mail to the user or in case the mail has been + rejected (i.e. a virus mail or banned content,) the user gets an + information about what happened to his mail.</para> + </step> + + <step> + <para>Postfix is delivering the mail now to the IMAP-Server that is + responsible for sending the mail to the user's mail box.</para> + </step> + + <step> + <para>After the mail is stored in the user's mail box, the user can + read his mail or informational mail.</para> + </step> + </procedure> + </chapter> + + <chapter> + <title>Logging in</title> + + <section> + <title>Logging in the first time</title> + + <para></para> + </section> + </chapter> + </part> +</book> \ 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:17:30
|
Revision: 54 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=54&view=rev Author: streindl Date: 2007-01-27 04:17:28 -0800 (Sat, 27 Jan 2007) Log Message: ----------- Merged documentation and perform some ignore cleanups Modified Paths: -------------- amavisadmin/trunk/docs/Makefile amavisadmin/trunk/docs/installationguide.xml Property Changed: ---------------- amavisadmin/trunk/ amavisadmin/trunk/docs/ Property changes on: amavisadmin/trunk ___________________________________________________________________ Name: svn:ignore - dist build SESSIONS.ser + AmavisAdmin* dist build SESSIONS.ser Property changes on: amavisadmin/trunk/docs ___________________________________________________________________ Name: svn:ignore - installationguide installationguide.txt installationguide.fo installationguide.manifest* installationguide.html installationguide.pdf + installationguide installationguide.txt installationguide.fo installationguide.manifest* installationguide.html installationguide.pdf user_guide user_guide.txt user_guide.fo user_guide.manifest* user_guide.html user_guide.pdf Modified: amavisadmin/trunk/docs/Makefile =================================================================== --- amavisadmin/trunk/docs/Makefile 2007-01-27 12:02:15 UTC (rev 53) +++ amavisadmin/trunk/docs/Makefile 2007-01-27 12:17:28 UTC (rev 54) @@ -197,15 +197,15 @@ # ** stylesheet for testing whether a file has a refentry # ----------------------------------------------------------------- REFENTRY_CHECK := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0" \ - xmlns:db="http://docbook.org/ns/docbook" \ - > \ - <xsl:output method="text"/> \ - <xsl:template match="/"> \ - <xsl:if test="//refentry|//db:refentry"> \ - <xsl:text>true</xsl:text> \ - </xsl:if> \ - </xsl:template> \ + version="1.0" \ + xmlns:db="http://docbook.org/ns/docbook" \ + > \ +<xsl:output method="text"/> \ +<xsl:template match="/"> \ +<xsl:if test="//refentry|//db:refentry"> \ +<xsl:text>true</xsl:text> \ +</xsl:if> \ +</xsl:template> \ </xsl:stylesheet> # ----------------------------------------------------------------- @@ -214,44 +214,48 @@ # # for DBLaTeX DBX_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:param name="co.linkends.show">0</xsl:param> \ - <xsl:param name="callout.markup.circled">1</xsl:param> \ - <xsl:param name="callout.linkends.hot">0</xsl:param> \ - <xsl:param name="doc.publisher.show">1</xsl:param> \ - <xsl:param name="term.breakline">1</xsl:param> \ - <xsl:param name="doc.alignment">left</xsl:param> \ - <xsl:param name="newtbl.use">1</xsl:param> \ - <xsl:param name="latex.hyperparam"/> \ - <xsl:param name="latex.style">docbook</xsl:param> \ - <xsl:param name="latex.biblio.output">all</xsl:param> \ - <xsl:param name="latex.bibfiles">""</xsl:param> \ - <xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \ - <xsl:param name="latex.output.revhistory">0</xsl:param> \ - <xsl:param name="latex.figure.position">[htbp]</xsl:param> \ - <xsl:param name="latex.figure.boxed">0</xsl:param> \ - <xsl:param name="latex.babel.use">1</xsl:param> \ - <xsl:param name="latex.babel.language"></xsl:param> \ - <xsl:param name="latex.class.options">twoside</xsl:param> \ - <xsl:param name="biblioentry.item.separator">, </xsl:param> \ - <xsl:param name="refentry.xref.manvolnum">1</xsl:param> \ - <xsl:param name="refsynopsis.title">Synopsis</xsl:param> \ - <xsl:param name="refnamediv.title"></xsl:param> \ - <xsl:param name="funcsynopsis.style">ansi</xsl:param> \ - <xsl:param name="funcsynopsis.decoration">1</xsl:param> \ - <xsl:param name="function.parens">0</xsl:param> \ - <xsl:param name="classsynopsis.default.language">java</xsl:param> \ - <xsl:param name="show.comments">0</xsl:param> \ + version="1.0"> \ +<xsl:param name="co.linkends.show">0</xsl:param> \ +<xsl:param name="callout.markup.circled">1</xsl:param> \ +<xsl:param name="callout.linkends.hot">0</xsl:param> \ +<xsl:param name="doc.publisher.show">1</xsl:param> \ +<xsl:param name="term.breakline">1</xsl:param> \ +<xsl:param name="doc.alignment">left</xsl:param> \ +<xsl:param name="newtbl.use">1</xsl:param> \ +<xsl:param name="latex.hyperparam"/> \ +<xsl:param name="latex.style">docbook</xsl:param> \ +<xsl:param name="latex.biblio.output">all</xsl:param> \ +<xsl:param name="latex.bibfiles">""</xsl:param> \ +<xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \ +<xsl:param name="latex.output.revhistory">0</xsl:param> \ +<xsl:param name="latex.figure.position">[htbp]</xsl:param> \ +<xsl:param name="latex.figure.boxed">0</xsl:param> \ +<xsl:param name="latex.babel.use">1</xsl:param> \ +<xsl:param name="latex.babel.language"></xsl:param> \ +<xsl:param name="latex.class.options">twoside</xsl:param> \ +<xsl:param name="biblioentry.item.separator">, </xsl:param> \ +<xsl:param name="refentry.xref.manvolnum">1</xsl:param> \ +<xsl:param name="refsynopsis.title">Synopsis</xsl:param> \ +<xsl:param name="refnamediv.title"></xsl:param> \ +<xsl:param name="funcsynopsis.style">ansi</xsl:param> \ +<xsl:param name="funcsynopsis.decoration">1</xsl:param> \ +<xsl:param name="function.parens">0</xsl:param> \ +<xsl:param name="classsynopsis.default.language">java</xsl:param> \ +<xsl:param name="show.comments">0</xsl:param> \ </xsl:stylesheet> # for FO output FO_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - xmlns:fo="http://www.w3.org/1999/XSL/Format" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \ - <xsl:include href="cust/titlepage.templates.xsl"/> \ - <xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \ - <xsl:param name="paper.type">A4</xsl:param> \ + xmlns:fo="http://www.w3.org/1999/XSL/Format" \ + version="1.0"> \ +<xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \ +<xsl:include href="cust/titlepage.templates.xsl"/> \ +<xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \ +<xsl:param name="paper.type">A4</xsl:param> \ +<xsl:param name="callout.unicode">1</xsl:param> \ +<xsl:param name="callout.graphics">0</xsl:param> \ +<xsl:param name="admon.graphics">1</xsl:param> \ +<xsl:param name="admon.graphics.extension">.svg</xsl:param> \ <xsl:param name="draft.watermark.image"></xsl:param> \ <xsl:param name="hyphenation">false</xsl:param> \ <xsl:param name="hyphenate.verbatim">0</xsl:param> \ Modified: amavisadmin/trunk/docs/installationguide.xml =================================================================== --- amavisadmin/trunk/docs/installationguide.xml 2007-01-27 12:02:15 UTC (rev 53) +++ amavisadmin/trunk/docs/installationguide.xml 2007-01-27 12:17:28 UTC (rev 54) @@ -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. |
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. |
From: <str...@us...> - 2007-01-25 20:39:11
|
Revision: 52 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=52&view=rev Author: streindl Date: 2007-01-25 12:39:12 -0800 (Thu, 25 Jan 2007) Log Message: ----------- Merge from documentation Modified Paths: -------------- amavisadmin/trunk/docs/installationguide.xml Added Paths: ----------- amavisadmin/trunk/docs/user_guide.xml Modified: amavisadmin/trunk/docs/installationguide.xml =================================================================== --- amavisadmin/trunk/docs/installationguide.xml 2007-01-25 20:27:15 UTC (rev 51) +++ amavisadmin/trunk/docs/installationguide.xml 2007-01-25 20:39:12 UTC (rev 52) @@ -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,9 +15,9 @@ <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> +<country>Germany</country></address> <email>sr...@sr...</email> </author> @@ -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> @@ -85,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 @@ -96,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 @@ -187,36 +197,337 @@ </section> <section> + <title>PostgreSQL database</title> + + <para>This document does not describe how to setup the PostgreSQL + database. For most Microsoft <trademark + class="registered">Windows</trademark> and <trademark + class="registered">Linux</trademark>/<trademark + class="registered">Unix</trademark> distribitions there're binary + packages available (see <ulink + url="http://www.postgresql.org/ftp/binary/">http://www.postgresql.org/ftp/binary/<version></ulink> + for available systems and versions). They can be downloard If you want + (or need) to install PostgreSQL from scratch, the following section in + the PostgreSQL documentation might help: <ulink + url="http://www.postgresql.org/docs/8.1/interactive/installation.html">http://www.postgresql.org/docs/8.1/interactive/installation.html</ulink>.</para> + + <para>For development and testing PostgreSQL release 8.1 has been used. + Other versions might work also but no tests have been done to ensure + working on different releases of PostgreSQL.</para> + + <section> + <title>Creating the database for storing Amavisd-new data</title> + + <para>It makes sense (from performance, sizing and other aspects like + security) to create a separate database that contains the data stored + by Amavisd-new and AmavisAdmin. The database should be accessable only + by superusers and a specific functional account for maximum security. + In addition PostgreSQL offers the possibility to move parts of the + data to other filesystems/paths by using tablespaces.</para> + + <section> + <title>Creating a functional database user</title> + + <para>It makes sense to create a functional user that is used by the + applications (amavisd-new and AmavisAdmin) to connect to the + database. This user created should be able to access the database + only from the IP-addresses used by the applications itself. This + gives some additional security. To create a user, two steps are + neccessary: First the user itself has to be created. Afterwards the + user has to be configured to connect to the database. The second + step depends on your local security, therfore please refer to <ulink + url="http://www.postgresql.org/docs/8.1/interactive/client-authentication.html">http://www.postgresql.org/docs/8.1/interactive/client-authentication.html</ulink> + for details. Creating a user can be done by using the command + <command>createuser</command> that is part of every PostgreSQL + distribution. The following example shows how to create the user + amavis that will be used for administrators and applications to + connect to the database (please replace + <replaceable>superuser</replaceable> with your superuser role + name):</para> + + <screen xml:space="preserve"><prompt>sreindl@linux-fest:~> </prompt><userinput>sudo -u postgres createuser \ +</userinput><prompt>> </prompt><userinput> --no-superuser --no-createrole --no-createdb \ +</userinput><prompt>> </prompt><userinput> --pwprompt --username=<replaceable>superuser</replaceable> --password amavis +</userinput><prompt>Enter password for new role: </prompt><userinput><replaceable><password></replaceable> +</userinput><prompt>Enter it again: </prompt><userinput><replaceable><password></replaceable> +</userinput><prompt>Password:</prompt> <userinput><replaceable><superuserpassword></replaceable> +</userinput><computeroutput>CREATE ROLE +</computeroutput><prompt>sreindl@linux-fest:~> </prompt></screen> + + <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> + <title>Creating a tablespace</title> + + <para>For maintainability I would suggest to create the database + used for Amavisd-new in a separate tablespace. Creating a tablespace + in PostgreSQL is done in two steps: At first you have to create a + directory in the file system which will contain the tablespace data. + With the Linux/Unix operating system the command might look like + this:</para> + + <programlisting><prompt>$ </prompt><userinput>mkdir -p <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput></programlisting> + + <para>where the path given might even reside on a different machine + (i.e. network file server). On other operating systems this command + might look different or you might even use a graphical user + interface to create the path. After creating the path you have to + change the permissions that only the database server has access to + the created path. This is basically done for security + reasons:</para> + + <programlisting><prompt>$ </prompt><userinput>chown <replaceable>postgres</replaceable> <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput> +<prompt>$ </prompt><userinput>chmod 0700 <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput></programlisting> + + <para>The first command assigns the user postgres (please provide + the user name which has been used to install the postgres database) + to the created path, i.e. change the owner of this path to the + database system. The second command changes the permissions of the + directory in a way that only the PostgreSQL system (and the system + administrator) can access the contents of the directory. Other + operating systems might need other commands to accomplish + this.</para> + + <para>The second step is to actually create the tablespace. This is + done by using database commands. The following example creates a + tablespace <database class="table">tb_admin</database> which points + to the directory created above:</para> + + <para><screen><prompt>sreindl@linux-fest:~></prompt> +<prompt>sreindl@linux-fest:~> </prompt><userinput>psql --username=<replaceable>superuser</replaceable> \</userinput> +<prompt>> </prompt> <userinput>--password postgres</userinput> +<computeroutput>Password for user <replaceable>superuser</replaceable>: +Welcome to psql 8.1.5, the PostgreSQL interactive terminal. + +Type: \copyright for distribution terms + \h for help with SQL commands + \? for help with psql commands + \g or terminate with semicolon to execute query + \q to quit + +</computeroutput><prompt>postgres=# </prompt><userinput>CREATE TABLESPACE <replaceable>tb_amavis</replaceable> </userinput> +<prompt>postgres-# </prompt><userinput> OWNER amavis </userinput> +<prompt>postgres-# </prompt><userinput> LOCATION '<replaceable>/srv/db/tablespaces/amavis</replaceable>';</userinput> +<computeroutput>CREATE TABLE</computeroutput> +<prompt>postgres=#</prompt></screen></para> + </section> + + <section> + <title>Creating the database</title> + + <para>After doing the preparation steps described in the sections + above, the final step is to create the actual database. This can be + done by using the command <command>createdb</command> or by using + SQL commands entered into the PostgreSQL frontent + <command>psql</command>. The database encoding can be of any type as + the mail text itself is stored as a binary field and therefore + there's no need to use binary encoding for the database. The + following command creates the database <database + class="name">amavis</database> for user <database + class="user">amavis</database> in tablespace <database + class="table">tb_amavis</database>:</para> + + <screen><prompt>sreindl@linux-fest:~> </prompt><userinput>createdb --tablespace=tb_admin \ +</userinput><prompt>> </prompt><userinput> --owner=amavis \ +</userinput><prompt>> </prompt><userinput> --echo \ +</userinput><prompt>> </prompt><userinput> --user=superuser \ +</userinput><prompt>> </prompt><userinput> --password +</userinput><prompt>Password:</prompt> <userinput><replaceable><password></replaceable></userinput> +<computeroutput>CREATE DATABASE</computeroutput> +<prompt>sreindl@linux-fest:~> </prompt> +</screen> + + <para>A similar command on the psql command line would be</para> + + <screen><prompt>postgres=# </prompt><userinput>CREATE DATABASE amavis OWNER amavis TABLESPACE tb_amavis;</userinput> +<computeroutput>CREATE DATABASE</computeroutput> +<prompt>postgres=#</prompt></screen> + </section> + </section> + + <section> + <title>Create SQL data model</title> + + <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 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> + + <section> <title>Amavisd-new</title> <para>The Amavisd-new application can be downloaded from the <ulink 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> + + <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> + + <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> + + <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> + + <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> + + <variablelist> + <varlistentry> + <term>$clean_quarantine_method</term> + + <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> + + <varlistentry> + <term>$virus_quarantine_method</term> + + <listitem> + <para>If this variable is set to sql, virus mail texts are stored + in the database. </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>$banned_files_quarantine_method</term> + + <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> + + <varlistentry> + <term>$spam_quarantine_method</term> + + <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> + + <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> + + <section> + <title>AmavisAdmin</title> + + <para>To install AmavisAdmin, you can download the distribtion file from + <?target aSAsAS?></para> + </section> </section> </article> \ No newline at end of file Copied: amavisadmin/trunk/docs/user_guide.xml (from rev 51, amavisadmin/branches/documentation_1_0/docs/user_guide.xml) =================================================================== --- amavisadmin/trunk/docs/user_guide.xml (rev 0) +++ amavisadmin/trunk/docs/user_guide.xml 2007-01-25 20:39:12 UTC (rev 52) @@ -0,0 +1,86 @@ +<?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"> +<article> + <articleinfo> + <title>AmavisAdmin</title> + + <subtitle>User Manual</subtitle> + + <author> + <firstname>Stephen</firstname> + + <surname>Reindl</surname> + + <address><street>Langster Str. 28</street> +<postcode>40668</postcode> <city>Meerbusch</city> +<country>Germany</country></address> + + <email>sr...@sr...</email> + </author> + + <pubdate>February 2007</pubdate> + + <copyright> + <year>2006</year> + + <year>2007</year> + + <holder>Stephen Reindl</holder> + </copyright> + + <legalnotice> + <para>Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. You may + obtain a copy of the License at</para> + + <para><ulink + url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink></para> + + <para>Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing permissions + and limitations under the License.</para> + </legalnotice> + + <revhistory> + <revision> + <revnumber>0.1</revnumber> + + <date>2007-01-22</date> + + <authorinitials>sr</authorinitials> + + <revdescription> + <para>Initial document</para> + </revdescription> + </revision> + </revhistory> + </articleinfo> + + <section> + <title>Preface</title> + + <para>This document describes how to use AmavisAdmin from a user's + perspective. As the AmavisAdmin can be used by both, regular users and + adminstrators, there's no specific document for administration of + AmavisAdmin. Specific details about configuration and scheduling can be + found in the <citetitle id="ref-installation-manual">installation + manual</citetitle>.</para> + + <section> + <title>Bibliography</title> + + <bibliography> + <biblioentry id="maler96"> + <title>From Text to Model to Markup</title> + + <subtitle></subtitle> + </biblioentry> + </bibliography> + + <para></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-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-25 20:25:59
|
Revision: 50 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=50&view=rev Author: streindl Date: 2007-01-25 12:25:43 -0800 (Thu, 25 Jan 2007) Log Message: ----------- Initial build script process ready Modified Paths: -------------- amavisadmin/trunk/tools/build_script.pl amavisadmin/trunk/tools/reposInfo.pl amavisadmin/trunk/webapp/build.xml amavisadmin/trunk/webapp/src/java/amavisadmin.properties.in amavisadmin/trunk/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java Added Paths: ----------- amavisadmin/trunk/AUTHORS amavisadmin/trunk/NOTES amavisadmin/trunk/README amavisadmin/trunk/TODO amavisadmin/trunk/tools/version.pm Added: amavisadmin/trunk/AUTHORS =================================================================== --- amavisadmin/trunk/AUTHORS (rev 0) +++ amavisadmin/trunk/AUTHORS 2007-01-25 20:25:43 UTC (rev 50) @@ -0,0 +1,2 @@ +Stephen Reindl <sr...@sr...> +Project Lead and Maintainer Added: amavisadmin/trunk/NOTES =================================================================== --- amavisadmin/trunk/NOTES (rev 0) +++ amavisadmin/trunk/NOTES 2007-01-25 20:25:43 UTC (rev 50) @@ -0,0 +1 @@ +... please read the LICENSE and README files for details Added: amavisadmin/trunk/README =================================================================== --- amavisadmin/trunk/README (rev 0) +++ amavisadmin/trunk/README 2007-01-25 20:25:43 UTC (rev 50) @@ -0,0 +1,11 @@ +AmavisAdmin +=========== + +This tool helps administrating data stored by Amavisd-new in an Postgres SQL +database. + +... more to come + +for installation details, please refer to docs/txt/installationguide.txt. + + Added: amavisadmin/trunk/TODO =================================================================== --- amavisadmin/trunk/TODO (rev 0) +++ amavisadmin/trunk/TODO 2007-01-25 20:25:43 UTC (rev 50) @@ -0,0 +1,20 @@ +The following things are open -*- outline -*- + +* User Interface + The user interface might be overhauled or even replaced by something + different than now. Currently the user interface is build on Rave, an WebUI + based on JSF/JSP by Sun/Netbeans + +* Database +** Support for Black/Whitelisting +** Support for MySQL + +* Security +** Role based security settings +** JAAS enabled login (for enterprise integration) + +* Documentation +* User Guide + +* ... more to come + Modified: amavisadmin/trunk/tools/build_script.pl =================================================================== --- amavisadmin/trunk/tools/build_script.pl 2007-01-24 22:06:31 UTC (rev 49) +++ amavisadmin/trunk/tools/build_script.pl 2007-01-25 20:25:43 UTC (rev 50) @@ -1,31 +1,57 @@ #!/usr/bin/perl -w -# Script to create a target distribution +# Script to create a target distribution # -# it creates a directory dist in the current directory and compiles a ready to use -# war file, database scripts and compiled documentation as well as API + +# it creates a directory dist in the current directory and compiles a ready to +# use war file, database scripts and compiled documentation as well as API # documentation into this folder. use strict; use English; + +BEGIN { + push @INC, "tools"; # for the version stuff +} + +use version; + use Getopt::Long; use Pod::Usage; + +use Archive::Tar; use File::Path; use File::stat; +use File::Basename; +use File::Find; +use File::Copy; + use Cwd; + +use Date::Format; + use SVN::Client; +sub createTar(); +sub copy_dir($); sub replaceParams(); +sub copy_file($$); +sub copy_doc_dir(); +sub create_file_list(); -my $distdir = "dist"; +my $distdir = "%p-v%V"; my $cleandir = 0; my $help=0; my $man=0; +my $compressbzip2 = 0; +my $compressgzip = 0; my $createtar=undef; GetOptions("path|p=s" => \$distdir, "tar|t:s" => \$createtar, "clean|c!" => \$cleandir, + "bzip2" => \$compressbzip2, + "gzip" => \$compressgzip, "help|h" => \$help, "man|m" => \$man) or pod2usage (2); pod2usage(1) if ($help); @@ -38,7 +64,7 @@ $_info = $info; }; -my $modified = 0; +my $modified = ""; my $funcStatus = sub { $modified = "-modified"; @@ -63,10 +89,32 @@ replaceParams(); -print $distdir, "\n"; +if (defined $createtar) { + if ($createtar eq "") { + $createtar = $distdir . ".tar"; + } +} +my $tempdir = "$distdir/temp"; -exit 0; +my %files = ("LICENSE" => "LICENSE", + "README" => "README", + "TODO" => "TODO", + "NOTES" => "NOTES", + "AUTHORS" => "AUTHORS", + "$tempdir/AmavisAdmin.war" => "AmavisAdmin.war", + "\@db" => "db", + "$tempdir/docs/installationguide.pdf" => "docs/pdf/installationguide.pdf", + "$tempdir/docs/installationguide.txt" => "docs/txt/installationguide.txt", + "\!$tempdir/docs/installationguide/" => 'docs/html/installationguide/', + ); + + +print "Output to $distdir\n"; +if (defined $createtar) { + print "Creating tar file $createtar\n"; +} + if (-d "$distdir") { if ($cleandir) { my $stat = stat($distdir); @@ -84,12 +132,181 @@ mkpath ($distdir) or die "Cannot create directory $distdir"; +# step 0 +# create intermediate directories which will be deleted afterwards +mkdir $tempdir; + +# step 1: run ant +my @antArgs=("-Dbuild.dir=" . getcwd() . "/$tempdir", + "-Ddist.dir=" . getcwd() . "/$tempdir", + "-buildfile", "webapp/build.xml", + "clean", + "dist"); + +system "ant", @antArgs; + +if ($? != 0) { + die "Build failed. Please check before continuing"; +} + +# step 2: documentation +copy_doc_dir (); +system "cd $tempdir/docs && touch *.xml && make clean && make"; + +if ($? != 0) { + die "Documentation build failed. Please check before continuing"; +} + +my $copydir_target = ""; +my $skip_dir = 0; + +# step 3: Copy/Move files +foreach my $file (keys %files) { + if ($file =~ /^@.*/) { + my $from_file = substr($file, 1); + copy_dir($from_file); + } elsif ($file =~ /^!.*/) { + # special dir + my $from_file = substr($file, 1); + $skip_dir = length ($from_file); + $copydir_target = $files{$file}; + copy_dir($from_file); + $copydir_target = ""; # reset dir target + } else { + copy_file($file, $files{$file}); + } +} + +# step 4: cleanup temp dir +rmtree ("$tempdir"); + + +# step 5: create CONTENTS file + +my @file_list = (); +create_file_list (); +open OUT, ">$distdir/CONTENTS" or die "Cannot create contents file ($!)"; +print OUT + "This file contains a list of all files included in this distribution.\n"; +print OUT + "Please read the file LICENSE!\n"; + +foreach my $line (@file_list) { + print OUT $line, "\n"; +} +close OUT; + +# step 6: Tar and compression +if (defined $createtar) { + createTar(); + + if ($compressbzip2) { + my $mod = "IO::Compress::Bzip2"; + unless (eval "require $mod") { + die "Bzip2 compression is required from here\n"; + } + use IO::Compress::Bzip2 qw (bzip2 $Bzip2Error); + bzip2 $createtar => $createtar . ".bz2" + or die "bzip2 failed: $Bzip2Error\n"; + unlink $createtar; # remove tar file + } elsif ($compressgzip) { + my $mod = "IO::Compress::Gzip"; + unless (eval "require $mod") { + die "Gzip compression is required from here\n"; + } + use IO::Compress::Gzip qw (gzip $GzipError); + gzip $createtar => $createtar . ".bz2" + or die "gzip failed: $GzipError\n"; + unlink $createtar; # remove tar file + } + # in case of tar output, remove the distribution directory. + rmtree "$distdir"; +} + + +exit 0; + +sub createTar() { + my $tar = Archive::Tar->new; + + $tar->add_files(@file_list); + + $tar->write($createtar) or die "Cannot create tar file ($!)"; +} + +sub file_list_item() { + my $file = $File::Find::name; + + if (-f "$file") { + push @file_list, $file; + } +} + +sub create_file_list() { + find ({wanted => \&file_list_item, no_chdir => 1 }, $distdir); +} + +sub callback_doc_file() { + my $name = $File::Find::name; + return if ($name =~ /\.svn/); + my $stat = lstat($name); + if (-l $name) { + my $link = readlink ($name); + symlink ($link, "$tempdir/$name"); + } elsif (-d $name) { + mkdir "$tempdir/$name"; + } else { + copy ($name, "$tempdir/$name"); + } +} + + +sub copy_doc_dir () { + find({wanted => \&callback_doc_file, no_chdir => 1 }, "docs"); +} + + +sub callback_single_file() { + my $name = $File::Find::name; + return if ($name =~ /\.svn/); + my $to = $name; + + if ($copydir_target ne "") { + $to = $copydir_target . substr ($name, $skip_dir); + } + + if (-d $name) { + mkpath "$distdir/$to" or die "Cannot create $distdir/$to ($!)"; + } else { + copy_file($name, $to); + } +} + +sub copy_dir($) { + my $path = shift; + find({wanted => \&callback_single_file, no_chdir => 1 }, $path); +} + +sub copy_file($$) { + my ($from, $to) = @_; + $to = "$distdir/$to"; + print "Copy $from -> $to\n"; + my $dir = dirname($to); + if (! -e "$dir") { + mkpath ($dir) or die "Cannot create $dir ($!)"; + } + copy ($from, $to) or die "Copy failed ($!)"; +} + sub replaceParams() { $distdir =~ s/\%V/\%v-r\%r-\%T\%m/g; - $distdir =~ s/\%v/1.0/g; + my $version = $version::AmavisVersion; + $distdir =~ s/\%v/$version/g; $distdir =~ s/\%r/$revision/g; - $distdir =~ s/\%d/YYYY-MM-DD/g; - $distdir =~ s/\%t/YYYYMMDDhhmmss/g; + my $datestamp=time2str("%Y-%m-%d", time()); + my $timestamp=time2str("%Y%m%d%I%M%S", time()); + $distdir =~ s/\%d/$datestamp/g; + $distdir =~ s/\%t/$timestamp/g; $distdir =~ s/\%T/$branch/g; $distdir =~ s/\%m/$modified/g; $distdir =~ s/\%p/AmavisAdmin/g; @@ -143,8 +360,9 @@ =item B<%v> -This token will be replaced by the version (taken from F<conf/version.data>). -The version will be in the form C<major.minor>, e.g. B<1.0>. +This token will be replaced by the version (taken from +F<tools/version.pm>). The version will be in the form +C<major.minor>, e.g. B<1.0>. =item B<%V> @@ -242,6 +460,7 @@ +-README +-NOTES +-TODO + +-CONTENTS (list of files in directory) +-AmavisAdmin.war +-db (contents of the db sub directory) +-docs @@ -249,6 +468,31 @@ +html(generated HTML documentation) +txt (generated TXT documentation) +=head2 File copying + +Files are copied according to the hash %files. This hash maps a source file +related to the project base directory to the target folder. To copy files created during the process, use the C<$tempdir> variable for reference. For example, the mapping + + "$tempdir/AmavisAdmin.war" => "AmavisAdmin.war" + +copies the generated war file from it's temporary location to the target +location. + +=head3 Special copy commands + +There's the option to copy complete trees out of the source tree to the target tree. This can be done by prefixing the source tree key by an B<@> sign. The following line copies the complete C<db> folder: + + "\@db" => "db" + +The mapping result is not used in this case. If you want to copy a directory +from another location (e.g. the C<$tempdir>) path, you should use the special +indicator B<!>. The following example copies all files from the location +B<$tempdir/docs/installationguide/> to the location +B<docs/html/installationguide/>. + + "\!$tempdir/docs/installationguide/" => 'docs/html/installationguide/' + + =head1 AUTHOR Stephen Reindl <sr...@sr...> Modified: amavisadmin/trunk/tools/reposInfo.pl =================================================================== --- amavisadmin/trunk/tools/reposInfo.pl 2007-01-24 22:06:31 UTC (rev 49) +++ amavisadmin/trunk/tools/reposInfo.pl 2007-01-25 20:25:43 UTC (rev 50) @@ -13,12 +13,18 @@ # this is an development version. use strict; +BEGIN { + push @INC, "../tools"; # for ant + push @INC, "tools"; # for root dir +} + use SVN::Client; use SVK::Command::Info; use SVK; use SVK::XD; use Cwd; +use version; my $op = shift; @@ -40,13 +46,10 @@ my $cwd = getcwd(); $ctx->info( $cwd, undef, undef, \&funcRev, 0 ); $ctx->status( $cwd, undef, $funcStatus, 1, 0, 0, 0); +print "version=", $version::AmavisVersion, "\n"; +print "dbversion=", $version::DatabaseVersion, "\n"; print "revision=", $_info->rev, "\n"; print "clean_build=", $statusChanged ? "false" : "true", "\n"; -if ($cwd =~ /\/home\//) { - print "build_type=private\n"; -} else { - print "build_type=batch\n"; -} my $url = $_info->URL; if ($url =~ /trunk/) { Added: amavisadmin/trunk/tools/version.pm =================================================================== --- amavisadmin/trunk/tools/version.pm (rev 0) +++ amavisadmin/trunk/tools/version.pm 2007-01-25 20:25:43 UTC (rev 50) @@ -0,0 +1,37 @@ +# This file has only one purpose: In contains the version string used to build +# conficuration files and other topics where the version number is important. + +package version; + +use strict; +use warnings; + +BEGIN { + use Exporter(); + + our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); + + # Version of this module (not related to the AmavisAdmin version) + $VERSION = 1.00; + + @ISA=qw(Exporter); + + @EXPORT=(); + %EXPORT_TAGS=(); + @EXPORT_OK= qw ($AmavisVersion $DatabaseVersion); +} + +our @EXPORT_OK; + +our $AmavisVersion; +our $DatabaseVersion; + +# Here the version is set +#>>>>>>>>>>>>>>>>>>>>>>>> +$AmavisVersion = "1.0"; +$DatabaseVersion = "1"; +#<<<<<<<<<<<<<<<<<<<<<<<< + +END { } + +1; Modified: amavisadmin/trunk/webapp/build.xml =================================================================== --- amavisadmin/trunk/webapp/build.xml 2007-01-24 22:06:31 UTC (rev 49) +++ amavisadmin/trunk/webapp/build.xml 2007-01-25 20:25:43 UTC (rev 50) @@ -84,8 +84,8 @@ <format property="build.timestamp" pattern="yyyyMMdd'T'HHmmssZ" locale="en"/> </tstamp> - <exec executable="/usr/bin/perl"> - <arg value="tools/reposInfo.pl" /> + <exec executable="/usr/bin/perl" failonerror="true"> + <arg value="../tools/reposInfo.pl" /> <redirector output="reposinfo.properties" /> </exec> <copy file="${src.dir}/amavisadmin.properties.in" Modified: amavisadmin/trunk/webapp/src/java/amavisadmin.properties.in =================================================================== --- amavisadmin/trunk/webapp/src/java/amavisadmin.properties.in 2007-01-24 22:06:31 UTC (rev 49) +++ amavisadmin/trunk/webapp/src/java/amavisadmin.properties.in 2007-01-25 20:25:43 UTC (rev 50) @@ -1,35 +1,31 @@ -##/* -## * Copyright (C) 2006,2007 Stephen Reindl. -## * -## * Licensed under the Apache License, Version 2.0 (the "License"); -## * you may not use this file except in compliance with the License. -## * You may obtain a copy of the License at -## * -## * http://www.apache.org/licenses/LICENSE-2.0 -## * -## * Unless required by applicable law or agreed to in writing, software -## * distributed under the License is distributed on an "AS IS" BASIS, -## * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## * See the License for the specific language governing permissions and -## * limitations under the License. -## */ - - -# AmavisAdmin properties file -# This file contains basic settings - -amavisadmin.major = 0 -amavisadmin.minor = 1 - -# those fields are translated automatically -amavisadmin.branch = @branch@ -amavisadmin.build = @revision@ -amavisadmin.build_type = @build_type@ -amavisadmin.clean_build = @clean_build@ - -# If you ever change the datamodel, please increase this value -# and provide an upgrade script in the db topic -amavisadmin.db_version = 1 - -# Build time -amavisadmin.buildtime = @TSTAMP@ +##/* +## * Copyright (C) 2006,2007 Stephen Reindl. +## * +## * Licensed under the Apache License, Version 2.0 (the "License"); +## * you may not use this file except in compliance with the License. +## * You may obtain a copy of the License at +## * +## * http://www.apache.org/licenses/LICENSE-2.0 +## * +## * Unless required by applicable law or agreed to in writing, software +## * distributed under the License is distributed on an "AS IS" BASIS, +## * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## * See the License for the specific language governing permissions and +## * limitations under the License. +## */ + + +# AmavisAdmin properties file +# This file contains basic settings + +amavisadmin.version = @version@ + +# those fields are translated automatically +amavisadmin.branch = @branch@ +amavisadmin.build = @revision@ +amavisadmin.clean_build = @clean_build@ + +amavisadmin.db_version = @dbversion@ + +# Build time +amavisadmin.buildtime = @TSTAMP@ Modified: amavisadmin/trunk/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java =================================================================== --- amavisadmin/trunk/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java 2007-01-24 22:06:31 UTC (rev 49) +++ amavisadmin/trunk/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java 2007-01-25 20:25:43 UTC (rev 50) @@ -85,14 +85,8 @@ if (_localVersion == null) { initProps(); StringBuffer str = new StringBuffer(20); - str.append(props.getProperty("amavisadmin.major", "Unknown")); - str.append('.'); - str.append(props.getProperty("amavisadmin.minor", "unknown")); + str.append(props.getProperty("amavisadmin.version", "Unknown")); - String buildType = props.getProperty("amavisadmin.build_type"); - if (buildType.equals("local")) { - str.append (" local"); - } str.append (" build "); str.append (props.getProperty("amavisadmin.build")); str.append (" ("); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-24 22:06:31
|
Revision: 49 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=49&view=rev Author: streindl Date: 2007-01-24 14:06:31 -0800 (Wed, 24 Jan 2007) Log Message: ----------- Use correct path for license file Modified Paths: -------------- amavisadmin/trunk/webapp/build.xml Modified: amavisadmin/trunk/webapp/build.xml =================================================================== --- amavisadmin/trunk/webapp/build.xml 2007-01-24 21:32:40 UTC (rev 48) +++ amavisadmin/trunk/webapp/build.xml 2007-01-24 22:06:31 UTC (rev 49) @@ -100,7 +100,7 @@ </target> <target name="-pre-dist"> - <copy file="LICENSE" + <copy file="../LICENSE" tofile="${build.web.dir}/LICENSE" filtering="false" overwrite="true"> </copy> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-24 21:32:39
|
Revision: 48 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=48&view=rev Author: streindl Date: 2007-01-24 13:32:40 -0800 (Wed, 24 Jan 2007) Log Message: ----------- More changes to build script Modified Paths: -------------- amavisadmin/trunk/tools/build_script.pl Modified: amavisadmin/trunk/tools/build_script.pl =================================================================== --- amavisadmin/trunk/tools/build_script.pl 2007-01-24 21:32:13 UTC (rev 47) +++ amavisadmin/trunk/tools/build_script.pl 2007-01-24 21:32:40 UTC (rev 48) @@ -12,7 +12,10 @@ use Pod::Usage; use File::Path; use File::stat; +use Cwd; +use SVN::Client; +sub replaceParams(); my $distdir = "dist"; my $cleandir = 0; @@ -28,6 +31,42 @@ pod2usage(1) if ($help); pod2usage(-exitstatus => 0, -verbose => 2) if ($man); +my $_info; + +sub funcRev { + my( $path, $info, $pool ) = @_; + $_info = $info; +}; + +my $modified = 0; + +my $funcStatus = sub { + $modified = "-modified"; +}; + +my $ctx = SVN::Client->new(); + +my $cwd = getcwd(); +$ctx->info( $cwd, undef, undef, \&funcRev, 0 ); +$ctx->status( $cwd, undef, $funcStatus, 1, 0, 0, 0); +my $revision = $_info->rev; +my $branch="unknown"; + +my $url = $_info->URL; +if ($url =~ /trunk/) { + $branch="trunk"; +} elsif ($url =~ /branches\/([^\/]+)/) { + $branch="b-$1"; +} elsif ($url =~ /tags\/([^\/]+)/) { + $branch="$1"; +} + +replaceParams(); + +print $distdir, "\n"; + +exit 0; + if (-d "$distdir") { if ($cleandir) { my $stat = stat($distdir); @@ -43,8 +82,18 @@ } } -mkpath ($destdir) or die "Cannot create directory $destdir"; +mkpath ($distdir) or die "Cannot create directory $distdir"; +sub replaceParams() { + $distdir =~ s/\%V/\%v-r\%r-\%T\%m/g; + $distdir =~ s/\%v/1.0/g; + $distdir =~ s/\%r/$revision/g; + $distdir =~ s/\%d/YYYY-MM-DD/g; + $distdir =~ s/\%t/YYYYMMDDhhmmss/g; + $distdir =~ s/\%T/$branch/g; + $distdir =~ s/\%m/$modified/g; + $distdir =~ s/\%p/AmavisAdmin/g; +} __END__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-24 21:32:16
|
Revision: 47 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=47&view=rev Author: streindl Date: 2007-01-24 13:32:13 -0800 (Wed, 24 Jan 2007) Log Message: ----------- DB initial load scripts Added Paths: ----------- amavisadmin/trunk/db/postgres/create_tables.sql amavisadmin/trunk/db/postgres/initial_load.sql Added: amavisadmin/trunk/db/postgres/create_tables.sql =================================================================== --- amavisadmin/trunk/db/postgres/create_tables.sql (rev 0) +++ amavisadmin/trunk/db/postgres/create_tables.sql 2007-01-24 21:32:13 UTC (rev 47) @@ -0,0 +1,156 @@ +-- This file is part of AmavisAdmin +-- +-- Copyright (C) 2007 Stephen Reindl +-- +-- create initial data model +-- +-- Table: users +CREATE TABLE users +( + id serial NOT NULL, + priority int4 NOT NULL DEFAULT 7, + policy_id int4 NOT NULL DEFAULT 1, + email varchar(255) NOT NULL, + fullname varchar(255), + "local" char(1), + CONSTRAINT users_pkey PRIMARY KEY (id), + CONSTRAINT users_email_key UNIQUE (email) +); + +-- Table: wblist +CREATE TABLE wblist +( + rid int4 NOT NULL, + sid int4 NOT NULL, + wb varchar(10) NOT NULL, + CONSTRAINT wblist_pkey PRIMARY KEY (rid, sid) +); + +-- Table: maddr +CREATE TABLE maddr +( + id serial NOT NULL, + email varchar(255) NOT NULL, + "domain" varchar(255) NOT NULL, + CONSTRAINT maddr_pkey PRIMARY KEY (id), + CONSTRAINT maddr_email_ux UNIQUE (email) +); + +-- Table: mailaddr +CREATE TABLE mailaddr +( + id serial NOT NULL, + priority int4 NOT NULL DEFAULT 7, + email varchar(255) NOT NULL, + CONSTRAINT mailaddr_pkey PRIMARY KEY (id), + CONSTRAINT mailaddr_email_ux UNIQUE (email) +); + +-- Table: policy +CREATE TABLE policy +( + id serial NOT NULL, + policy_name varchar(32), + virus_lover char(1), + spam_lover char(1), + banned_files_lover char(1), + bad_header_lover char(1), + bypass_virus_checks char(1), + bypass_spam_checks char(1), + bypass_banned_checks char(1), + bypass_header_checks char(1), + spam_modifies_subj char(1), + virus_quarantine_to varchar(64), + spam_quarantine_to varchar(64), + banned_quarantine_to varchar(64), + bad_header_quarantine_to varchar(64), + clean_quarantine_to varchar(64), + other_quarantine_to varchar(64), + spam_tag_level float8, + spam_tag2_level float8, + spam_kill_level float8, + spam_dsn_cutoff_level float8, + spam_quarantine_cutoff_level float8, + addr_extension_virus varchar(64), + addr_extension_spam varchar(64), + addr_extension_banned varchar(64), + addr_extension_bad_header varchar(64), + warnvirusrecip char(1), + warnbannedrecip char(1), + warnbadhrecip char(1), + newvirus_admin varchar(64), + virus_admin varchar(64), + banned_admin varchar(64), + bad_header_admin varchar(64), + spam_admin varchar(64), + spam_subject_tag varchar(64), + spam_subject_tag2 varchar(64), + message_size_limit int4, + banned_rulenames varchar(64), + CONSTRAINT policy_pkey PRIMARY KEY (id) +); + +-- Table: msgs +CREATE TABLE msgs +( + mail_id varchar(12) NOT NULL, + secret_id varchar(12) DEFAULT '', + am_id varchar(20) NOT NULL, + time_num int4 NOT NULL, + time_iso timestamptz NOT NULL, + sid int4 NOT NULL, + policy varchar(255) DEFAULT '', + client_addr varchar(255) DEFAULT '', + size int4 NOT NULL, + content char(1), + quar_type char(1), + quar_loc varchar(255) DEFAULT ''; + dsn_sent char(1), + spam_level float8, + message_id varchar(255) DEFAULT '', + from_addr varchar(255) DEFAULT '', + subject varchar(255) DEFAULT '', + host varchar(255) NOT NULL, + CONSTRAINT msgs_pkey PRIMARY KEY (mail_id), + CONSTRAINT msgs_sid_fkey FOREIGN KEY (sid) + REFERENCES maddr (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE RESTRICT +); + +-- Index: msgs_idx_sid +CREATE INDEX msgs_idx_sid ON msgs USING btree (sid); + +-- Index: msgs_idx_time_iso +CREATE INDEX msgs_idx_time_iso ON msgs USING btree (time_iso); + +-- Table: quarantine +CREATE TABLE quarantine +( + mail_id varchar(12) NOT NULL, + chunk_ind int4 NOT NULL, + mail_text bytea NOT NULL, + CONSTRAINT quarantine_pkey PRIMARY KEY (mail_id, chunk_ind), + CONSTRAINT quarantine_mail_id_fkey FOREIGN KEY (mail_id) + REFERENCES msgs (mail_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE CASCADE +); + +-- Table: msgrcpt +CREATE TABLE msgrcpt +( + mail_id varchar(12) NOT NULL, + rid int4 NOT NULL, + ds char(1) NOT NULL, + rs char(1) NOT NULL, + bl char(1) DEFAULT ' '::bpchar, + wl char(1) DEFAULT ' '::bpchar, + bspam_level float8, + smtp_resp varchar(255) DEFAULT '', + CONSTRAINT msgrcpt_pkey PRIMARY KEY (mail_id, rid), + CONSTRAINT msgrcpt_mail_id_fkey FOREIGN KEY (mail_id) + REFERENCES msgs (mail_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE CASCADE, + CONSTRAINT msgrcpt_rid_fkey FOREIGN KEY (rid) + REFERENCES maddr (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE RESTRICT +); \ No newline at end of file Added: amavisadmin/trunk/db/postgres/initial_load.sql =================================================================== --- amavisadmin/trunk/db/postgres/initial_load.sql (rev 0) +++ amavisadmin/trunk/db/postgres/initial_load.sql 2007-01-24 21:32:13 UTC (rev 47) @@ -0,0 +1,80 @@ +-- This file is part of AmavisAdmin +-- +-- Copyright (C) 2007 Stephen Reindl +-- +-- Perform an intial load for an empty database + +-- insert standard policies. +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Non-paying', 'N','N','N','N', 'Y','Y','Y','N', 'Y', 3.0, 7, 10); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Uncensored', 'Y','Y','Y','Y', 'N','N','N','N', 'N', 3.0, 999, 999); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Wants all spam','N','Y','N','N', 'N','N','N','N', 'Y', 3.0, 999, 999); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Wants viruses', 'Y','N','Y','Y', 'N','N','N','N', 'Y', 3.0, 6.9, 6.9); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Normal', 'N','N','N','N', 'N','N','N','N', 'Y', 3.0, 6.9, 6.9); +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Trigger happy', 'N','N','N','N', 'N','N','N','N', 'Y', 3.0, 5, 5); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('Permissive', 'N','N','N','Y', 'N','N','N','N', 'Y', 3.0, 10, 20); + +INSERT + INTO policy + (policy_name, virus_lover, spam_lover, banned_files_lover, + bad_header_lover, bypass_virus_checks, bypass_spam_checks, + bypass_banned_checks, bypass_header_checks, spam_modifies_subj, + spam_tag_level, spam_tag2_level, spam_kill_level) +VALUES ('6.5/7.8', 'N','N','N','N', 'N','N','N','N', 'N', 3.0, 6.5, 7.8); + +-- insert a catchall user that will be used to +-- define the profile in case no other match +-- was done. +INSERT + INTO users + (priority, policy_id, email, local) + SELECT id, 5, '@.', 'N' + FROM policy + WHERE policy_name = 'Normal'; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-24 21:20:59
|
Revision: 46 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=46&view=rev Author: streindl Date: 2007-01-24 13:20:59 -0800 (Wed, 24 Jan 2007) Log Message: ----------- Initial build script Added Paths: ----------- amavisadmin/trunk/tools/build_script.pl Added: amavisadmin/trunk/tools/build_script.pl =================================================================== --- amavisadmin/trunk/tools/build_script.pl (rev 0) +++ amavisadmin/trunk/tools/build_script.pl 2007-01-24 21:20:59 UTC (rev 46) @@ -0,0 +1,209 @@ +#!/usr/bin/perl -w + +# Script to create a target distribution +# +# it creates a directory dist in the current directory and compiles a ready to use +# war file, database scripts and compiled documentation as well as API +# documentation into this folder. + +use strict; +use English; +use Getopt::Long; +use Pod::Usage; +use File::Path; +use File::stat; + + +my $distdir = "dist"; +my $cleandir = 0; +my $help=0; +my $man=0; +my $createtar=undef; + +GetOptions("path|p=s" => \$distdir, + "tar|t:s" => \$createtar, + "clean|c!" => \$cleandir, + "help|h" => \$help, + "man|m" => \$man) or pod2usage (2); +pod2usage(1) if ($help); +pod2usage(-exitstatus => 0, -verbose => 2) if ($man); + +if (-d "$distdir") { + if ($cleandir) { + my $stat = stat($distdir); + if ($stat->uid() != $UID) { + die "Cannot delete other user's file (security)"; + } + rmtree($distdir); + if (-d "$distdir") { + die "Cannot remove $distdir"; + } + } else { + die "$distdir does already exist"; + } +} + +mkpath ($destdir) or die "Cannot create directory $destdir"; + + + +__END__ + +=head1 NAME + +build_script.pl - Create distribution for AmavisAdmin + +=head1 SYNOPSIS + +build_script.pl [options...] + + Options: + -path=path Destination directory + -clean Clean destination directory if exist + -tar=[file] Create tar output file + -bzip2 Compress output file as bzip2 + -gzip Compress output file as gzip + -help brief help message + -man full documentation + +=head1 OPTIONS + +=over 8 + +=item B<-path> + +You can specify a different output directory for the destination where +the build script will put it's output. For example the command + + B<tools/build_script.pl> -path=I</tmp/dist> + +will build the output into the directory F</tmp/dist>. + +If the target directory does already exist, the script will die with an +error. This can be prevented by using the L</-clean> option. + +The target directory might contain several special tokens which will be +replaced before creating the actual directory. The following tokens are +defined: + +=over 8 + +=item B<%p> + +This token will be replaced by the application name (e.g. B<AmavisAdmin>). + +=item B<%v> + +This token will be replaced by the version (taken from F<conf/version.data>). +The version will be in the form C<major.minor>, e.g. B<1.0>. + +=item B<%V> + +The token will be replaced by the full version number including SVN revision +and branch type together with the information, if the build is based on +modified sources. As this is used in filenames, the version string will +not contain any spaces. An example for B<%V> might look like this: + + 1.0-r123-alpha2-modified + +where C<1.0> is the same as given by B<%v>, the string C<r123> gives the +current SVN revision, C<alpha2> denotes the current tag (see the description +for B<%T> for details).In case the build is based on uncommitted changes to +the repository, the term C<-modified> will be added to the version. This token +is actually a shortcut for + + %v-r%r-%T%m + +=item B<%r> + +This token will be replaced by the subversion revision number (e.g. C<123>). + +=item B<%T> + +This token will be replaced by the branch that is going to be build. In case +of building the trunk you will see the string C<trunk> here, for working in +branches you will see C<branch-> followed by the branch-name +(e.g. C<branch-V1_X>). If you build a tagged version (located under the +F<tags> folder in the subversion repository), only the tag-name itself is +returned (e.g. C<V_1_3_1>). + +=item B<%m> + +This token will be replaced with the string C<-modified> in case the current +working directory has been modified (i.e. the command C<svn status> returns +any output). + +=item B<%d> + +This token will be replaced by the date in the form C<YYYY-MM-DD>. + +=item B<%t> + +This token will be replaced by the current timestamp in the form +C<YYYYMMDDhhmmss>. + +=back + +=item B<-clean> + +If the target directory does already exist, delete the contents before +continuing. This option does nothing if the target directory does not +exist. + +=item B<-tar> + +If set, create a tar file with the contents of the directory just being build. +If the argument is passed without a parameter, the filename will be the name +of the B<-path> parameter followed by C<.tar>. In case no path is given on the +command line, the name will be C<dist.tar>. Please look also for B<-bzip2> and +B<-gzip> for compression. + +The filename can contain the same tokens as defined in the B<-path> option. + +=item B<-bzip2> + +If B<-tar> was given the output tar file will be compressed by using the +L<bzip2> tool. The output file type will be renamed to C<.tar.bzip2>. + +=item B<-bzip2> + +If B<-tar> was given the output tar file will be compressed by using the +L<gzip> tool. The output file type will be renamed to C<.tar.gz>. + +=item B<-help> + +Print a brief help message and exits. + +=item B<-man> + +Prints the manual page and exits. + +=back + +=head1 DESCRIPTION + +This script is used to create a distribution directory and (optionally) a tar +file containing the distribution. + +The script is compiling the web application and creating out of the generated +.war file and other files a directory which follows the following structure: + + path + +---+-LICENSE + +-README + +-NOTES + +-TODO + +-AmavisAdmin.war + +-db (contents of the db sub directory) + +-docs + +----+pdf (generated PDF documentation) + +html(generated HTML documentation) + +txt (generated TXT documentation) + +=head1 AUTHOR + +Stephen Reindl <sr...@sr...> + +=head1 BUGS + +Probably many as this tool is used for development purposes only. Property changes on: amavisadmin/trunk/tools/build_script.pl ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-24 18:35:17
|
Revision: 45 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=45&view=rev Author: streindl Date: 2007-01-24 10:35:08 -0800 (Wed, 24 Jan 2007) Log Message: ----------- merge from trunk Added Paths: ----------- amavisadmin/branches/documentation_1_0/webapp/ amavisadmin/branches/documentation_1_0/webapp/build.xml amavisadmin/branches/documentation_1_0/webapp/catalog.xml amavisadmin/branches/documentation_1_0/webapp/lib/ amavisadmin/branches/documentation_1_0/webapp/lib/complibs/ amavisadmin/branches/documentation_1_0/webapp/lib/complibs/index.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/ amavisadmin/branches/documentation_1_0/webapp/nbproject/ant-deploy.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/build-impl.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/genfiles.properties amavisadmin/branches/documentation_1_0/webapp/nbproject/private/ amavisadmin/branches/documentation_1_0/webapp/nbproject/private/private.properties amavisadmin/branches/documentation_1_0/webapp/nbproject/profiler-build-impl.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/project.properties amavisadmin/branches/documentation_1_0/webapp/nbproject/project.xml amavisadmin/branches/documentation_1_0/webapp/src/ amavisadmin/branches/documentation_1_0/webapp/src/conf/ amavisadmin/branches/documentation_1_0/webapp/src/conf/MANIFEST.MF amavisadmin/branches/documentation_1_0/webapp/src/java/ amavisadmin/branches/documentation_1_0/webapp/src/java/amavisadmin.properties.in amavisadmin/branches/documentation_1_0/webapp/src/java/de/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ApplicationBean1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ApproveRequests.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ChangePassword.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Configuration.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/EditJobs.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/EditSingleJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/EditUser.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Footer.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/HandleRequest.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Header.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Login.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/MyRequests.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/RequestBean1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/SessionBean1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ShowSingleMail.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/UserManagement.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/WEB-INF/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/WEB-INF/lib/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/AmavisAdminToolInitServlet.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/BOException.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/BORequestDoesAlreadyExistException.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/MailHandler.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/UserBO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/configuration/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/configuration/ConfigurationDataEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/configuration/ConfigurationDataTable.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractConfigurationSetting.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractConfigurationSettingId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMailAddress.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMailQueueEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMailQueueReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMessage.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMsgReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMsgReceipientId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractPolicy.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractQuarantine.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractQuarantineId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractRequest.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractUser.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractWBEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractWBEntryId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/BaseHibernateDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Bundle.properties amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationSetting.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationSetting.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationSettingId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/IBaseHibernateDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Job.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/JobDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailAddress.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailAddress.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailAddressDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueEntry.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueEntryDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueReceipient.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueReceipientDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Message.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Message.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MessageDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipient.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipientId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Policy.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Policy.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/PolicyDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Quarantine.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Quarantine.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/QuarantineDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/QuarantineId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Request.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Request.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/RequestDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/User.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/User.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/UserDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntry.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntryDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntryId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/util/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/util/HibernateSessionFactory.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/BaseJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/MailSendJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/MessagesCleanupJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/NewMailNotifierJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/ReleaseMailJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/ReminderJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/RetentionCleanupJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/migration/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/migration/MigrateV0toV1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/migration/MigrationJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/AdminNotifier.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/FooterTemplate.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/HeaderTemplate.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/LostPassword.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/NewMailNotify.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/RejectRelease.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/ReleaseError.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/ReleaseSuccess.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/Reminder.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/RequestRelease.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/visuals/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/visuals/UserListDataProvider.java amavisadmin/branches/documentation_1_0/webapp/src/java/hibernate.cfg.xml amavisadmin/branches/documentation_1_0/webapp/src/java/log4j.properties amavisadmin/branches/documentation_1_0/webapp/src/java/net/ amavisadmin/branches/documentation_1_0/webapp/src/java/net/sf/ amavisadmin/branches/documentation_1_0/webapp/src/java/net/sf/jsfcomp/ amavisadmin/branches/documentation_1_0/webapp/src/java/net/sf/jsfcomp/chartcreator/ amavisadmin/branches/documentation_1_0/webapp/src/java/org/ amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/ amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/JSTKUtil.java amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/copyright.jstk amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/license.jstk amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/osl-2.0.txt amavisadmin/branches/documentation_1_0/webapp/src/java/velocity.properties amavisadmin/branches/documentation_1_0/webapp/test/ amavisadmin/branches/documentation_1_0/webapp/web/ amavisadmin/branches/documentation_1_0/webapp/web/ApproveRequests.jsp amavisadmin/branches/documentation_1_0/webapp/web/CannotStart.html amavisadmin/branches/documentation_1_0/webapp/web/ChangePassword.jsp amavisadmin/branches/documentation_1_0/webapp/web/Configuration.jsp amavisadmin/branches/documentation_1_0/webapp/web/EditJobs.jsp amavisadmin/branches/documentation_1_0/webapp/web/EditSingleJob.jsp amavisadmin/branches/documentation_1_0/webapp/web/EditUser.jsp amavisadmin/branches/documentation_1_0/webapp/web/Footer.jspf amavisadmin/branches/documentation_1_0/webapp/web/HandlePendingReleases.jsp amavisadmin/branches/documentation_1_0/webapp/web/HandleRequest.jsp amavisadmin/branches/documentation_1_0/webapp/web/Header.jspf amavisadmin/branches/documentation_1_0/webapp/web/Login.jsp amavisadmin/branches/documentation_1_0/webapp/web/META-INF/ amavisadmin/branches/documentation_1_0/webapp/web/META-INF/context.xml amavisadmin/branches/documentation_1_0/webapp/web/MyRequests.jsp amavisadmin/branches/documentation_1_0/webapp/web/ShowSingleMail.jsp amavisadmin/branches/documentation_1_0/webapp/web/UserManagement.jsp amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/ amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/classes/ amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/faces-config.xml amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/lib/ amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/managed-beans.xml amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/navigation.xml amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/web.xml amavisadmin/branches/documentation_1_0/webapp/web/resources/ amavisadmin/branches/documentation_1_0/webapp/web/resources/stylesheet.css Removed Paths: ------------- amavisadmin/branches/documentation_1_0/build.xml amavisadmin/branches/documentation_1_0/catalog.xml amavisadmin/branches/documentation_1_0/lib/ amavisadmin/branches/documentation_1_0/nbproject/ amavisadmin/branches/documentation_1_0/src/ amavisadmin/branches/documentation_1_0/test/ amavisadmin/branches/documentation_1_0/web/ amavisadmin/branches/documentation_1_0/webapp/build.xml amavisadmin/branches/documentation_1_0/webapp/catalog.xml amavisadmin/branches/documentation_1_0/webapp/lib/ amavisadmin/branches/documentation_1_0/webapp/lib/complibs/ amavisadmin/branches/documentation_1_0/webapp/lib/complibs/index.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/ amavisadmin/branches/documentation_1_0/webapp/nbproject/ant-deploy.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/build-impl.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/genfiles.properties amavisadmin/branches/documentation_1_0/webapp/nbproject/private/ amavisadmin/branches/documentation_1_0/webapp/nbproject/private/private.properties amavisadmin/branches/documentation_1_0/webapp/nbproject/profiler-build-impl.xml amavisadmin/branches/documentation_1_0/webapp/nbproject/project.properties amavisadmin/branches/documentation_1_0/webapp/nbproject/project.xml amavisadmin/branches/documentation_1_0/webapp/src/ amavisadmin/branches/documentation_1_0/webapp/src/conf/ amavisadmin/branches/documentation_1_0/webapp/src/conf/MANIFEST.MF amavisadmin/branches/documentation_1_0/webapp/src/java/ amavisadmin/branches/documentation_1_0/webapp/src/java/amavisadmin.properties.in amavisadmin/branches/documentation_1_0/webapp/src/java/de/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ApplicationBean1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ApproveRequests.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ChangePassword.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Configuration.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/EditJobs.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/EditSingleJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/EditUser.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Footer.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/HandleRequest.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Header.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/Login.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/MyRequests.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/RequestBean1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/SessionBean1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/ShowSingleMail.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/UserManagement.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/WEB-INF/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/WEB-INF/lib/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/AmavisAdminToolInitServlet.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/BOException.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/BORequestDoesAlreadyExistException.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/MailHandler.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/UserBO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/VersionInfo.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/configuration/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/configuration/ConfigurationDataEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/bo/configuration/ConfigurationDataTable.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractConfigurationSetting.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractConfigurationSettingId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMailAddress.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMailQueueEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMailQueueReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMessage.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMsgReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractMsgReceipientId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractPolicy.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractQuarantine.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractQuarantineId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractRequest.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractUser.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractWBEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/AbstractWBEntryId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/BaseHibernateDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Bundle.properties amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationSetting.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationSetting.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/ConfigurationSettingId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/IBaseHibernateDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Job.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/JobDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailAddress.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailAddress.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailAddressDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueEntry.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueEntryDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueReceipient.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MailQueueReceipientDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Message.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Message.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MessageDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipient.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipient.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/MsgReceipientId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Policy.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Policy.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/PolicyDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Quarantine.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Quarantine.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/QuarantineDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/QuarantineId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Request.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/Request.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/RequestDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/User.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/User.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/UserDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntry.hbm.xml amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntry.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntryDAO.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/WBEntryId.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/util/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/db/util/HibernateSessionFactory.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/BaseJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/MailSendJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/MessagesCleanupJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/NewMailNotifierJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/ReleaseMailJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/ReminderJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/jobs/RetentionCleanupJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/migration/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/migration/MigrateV0toV1.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/migration/MigrationJob.java amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/AdminNotifier.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/FooterTemplate.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/HeaderTemplate.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/LostPassword.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/NewMailNotify.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/RejectRelease.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/ReleaseError.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/ReleaseSuccess.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/Reminder.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/templates/RequestRelease.vm amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/visuals/ amavisadmin/branches/documentation_1_0/webapp/src/java/de/sreindl/amavisadmin/visuals/UserListDataProvider.java amavisadmin/branches/documentation_1_0/webapp/src/java/hibernate.cfg.xml amavisadmin/branches/documentation_1_0/webapp/src/java/log4j.properties amavisadmin/branches/documentation_1_0/webapp/src/java/net/ amavisadmin/branches/documentation_1_0/webapp/src/java/net/sf/ amavisadmin/branches/documentation_1_0/webapp/src/java/net/sf/jsfcomp/ amavisadmin/branches/documentation_1_0/webapp/src/java/net/sf/jsfcomp/chartcreator/ amavisadmin/branches/documentation_1_0/webapp/src/java/org/ amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/ amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/JSTKUtil.java amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/copyright.jstk amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/license.jstk amavisadmin/branches/documentation_1_0/webapp/src/java/org/jstk/osl-2.0.txt amavisadmin/branches/documentation_1_0/webapp/src/java/velocity.properties amavisadmin/branches/documentation_1_0/webapp/test/ amavisadmin/branches/documentation_1_0/webapp/web/ amavisadmin/branches/documentation_1_0/webapp/web/ApproveRequests.jsp amavisadmin/branches/documentation_1_0/webapp/web/CannotStart.html amavisadmin/branches/documentation_1_0/webapp/web/ChangePassword.jsp amavisadmin/branches/documentation_1_0/webapp/web/Configuration.jsp amavisadmin/branches/documentation_1_0/webapp/web/EditJobs.jsp amavisadmin/branches/documentation_1_0/webapp/web/EditSingleJob.jsp amavisadmin/branches/documentation_1_0/webapp/web/EditUser.jsp amavisadmin/branches/documentation_1_0/webapp/web/Footer.jspf amavisadmin/branches/documentation_1_0/webapp/web/HandlePendingReleases.jsp amavisadmin/branches/documentation_1_0/webapp/web/HandleRequest.jsp amavisadmin/branches/documentation_1_0/webapp/web/Header.jspf amavisadmin/branches/documentation_1_0/webapp/web/Login.jsp amavisadmin/branches/documentation_1_0/webapp/web/META-INF/ amavisadmin/branches/documentation_1_0/webapp/web/META-INF/context.xml amavisadmin/branches/documentation_1_0/webapp/web/MyRequests.jsp amavisadmin/branches/documentation_1_0/webapp/web/ShowSingleMail.jsp amavisadmin/branches/documentation_1_0/webapp/web/UserManagement.jsp amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/ amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/classes/ amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/faces-config.xml amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/lib/ amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/managed-beans.xml amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/navigation.xml amavisadmin/branches/documentation_1_0/webapp/web/WEB-INF/web.xml amavisadmin/branches/documentation_1_0/webapp/web/resources/ amavisadmin/branches/documentation_1_0/webapp/web/resources/stylesheet.css Deleted: amavisadmin/branches/documentation_1_0/build.xml =================================================================== --- amavisadmin/branches/documentation_1_0/build.xml 2007-01-24 17:52:29 UTC (rev 44) +++ amavisadmin/branches/documentation_1_0/build.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -1,119 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<project name="SPAMAdmin" default="default" basedir="."> - <description>Builds, tests, and runs the project SPAMAdmin.</description> - <import file="nbproject/build-impl.xml"/> - - <import file="nbproject/profiler-build-impl.xml"/> <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-dist: called before jar building - -post-dist: called after jar building - -post-clean: called after cleaning build products - -pre-run-deploy: called before deploying - -post-run-deploy: called after deploying - - Example of pluging an obfuscator after the compilation could look like - - <target name="post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Other way how to customize the build is by overriding existing main targets. - The target of interest are: - - init-macrodef-javac: defines macro for javac compilation - init-macrodef-junit: defines macro for junit execution - init-macrodef-debug: defines macro for class debugging - do-dist: jar archive building - run: execution of project - javadoc-build: javadoc generation - - Example of overriding the target for project execution could look like - - <target name="run" depends="<PROJNAME>-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that overridden target depends on jar target and not only on - compile target as regular run target does. Again, for list of available - properties which you can use check the target you are overriding in - nbproject/build-impl.xml file. - - --> - <!-- <target name="-post-compile"> - <taskdef name="schemaexport" - classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" - classpath="${build.classes.dir}:${javac.classpath}"/> - <schemaexport - config="src/java/hibernate.cfg.xml" - quiet="no" - text="yes" - drop="no" - delimiter=";" - output="build/schema-export.sql"> - </schemaexport> - </target>--> - - <!-- Build amavisadmin.properties for build and version information --> - <target name="-post-compile"> - <tstamp> - <format property="build.timestamp" - pattern="yyyyMMdd'T'HHmmssZ" locale="en"/> - </tstamp> - <exec executable="/usr/bin/perl"> - <arg value="tools/reposInfo.pl" /> - <redirector output="reposinfo.properties" /> - </exec> - <copy file="${src.dir}/amavisadmin.properties.in" - tofile="${build.classes.dir}/amavisadmin.properties" - filtering="true" overwrite="true"> - <filterset> - <filtersfile file="reposinfo.properties" /> - <filter token="TSTAMP" value="${build.timestamp}" /> - </filterset> - </copy> - <delete file="reposinfo.properties" /> - </target> - - <target name="-pre-dist"> - <copy file="LICENSE" - tofile="${build.web.dir}/LICENSE" - filtering="false" overwrite="true"> - </copy> - </target> - - <target name="schemaupdate"> - <taskdef name="schemaupdate" - classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" - classpath="${build.classes.dir}:${javac.classpath}"/> - - <schemaupdate - config="src/java/hibernate.cfg.xml" - quiet="no" - text="yes" /> - </target> -</project> Deleted: amavisadmin/branches/documentation_1_0/catalog.xml =================================================================== Copied: amavisadmin/branches/documentation_1_0/webapp (from rev 44, amavisadmin/trunk/webapp) Deleted: amavisadmin/branches/documentation_1_0/webapp/build.xml =================================================================== --- amavisadmin/trunk/webapp/build.xml 2007-01-24 17:52:29 UTC (rev 44) +++ amavisadmin/branches/documentation_1_0/webapp/build.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -1,119 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<project name="SPAMAdmin" default="default" basedir="."> - <description>Builds, tests, and runs the project SPAMAdmin.</description> - <import file="nbproject/build-impl.xml"/> - - <import file="nbproject/profiler-build-impl.xml"/> <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-dist: called before jar building - -post-dist: called after jar building - -post-clean: called after cleaning build products - -pre-run-deploy: called before deploying - -post-run-deploy: called after deploying - - Example of pluging an obfuscator after the compilation could look like - - <target name="post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Other way how to customize the build is by overriding existing main targets. - The target of interest are: - - init-macrodef-javac: defines macro for javac compilation - init-macrodef-junit: defines macro for junit execution - init-macrodef-debug: defines macro for class debugging - do-dist: jar archive building - run: execution of project - javadoc-build: javadoc generation - - Example of overriding the target for project execution could look like - - <target name="run" depends="<PROJNAME>-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that overridden target depends on jar target and not only on - compile target as regular run target does. Again, for list of available - properties which you can use check the target you are overriding in - nbproject/build-impl.xml file. - - --> - <!-- <target name="-post-compile"> - <taskdef name="schemaexport" - classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" - classpath="${build.classes.dir}:${javac.classpath}"/> - <schemaexport - config="src/java/hibernate.cfg.xml" - quiet="no" - text="yes" - drop="no" - delimiter=";" - output="build/schema-export.sql"> - </schemaexport> - </target>--> - - <!-- Build amavisadmin.properties for build and version information --> - <target name="-post-compile"> - <tstamp> - <format property="build.timestamp" - pattern="yyyyMMdd'T'HHmmssZ" locale="en"/> - </tstamp> - <exec executable="/usr/bin/perl"> - <arg value="tools/reposInfo.pl" /> - <redirector output="reposinfo.properties" /> - </exec> - <copy file="${src.dir}/amavisadmin.properties.in" - tofile="${build.classes.dir}/amavisadmin.properties" - filtering="true" overwrite="true"> - <filterset> - <filtersfile file="reposinfo.properties" /> - <filter token="TSTAMP" value="${build.timestamp}" /> - </filterset> - </copy> - <delete file="reposinfo.properties" /> - </target> - - <target name="-pre-dist"> - <copy file="LICENSE" - tofile="${build.web.dir}/LICENSE" - filtering="false" overwrite="true"> - </copy> - </target> - - <target name="schemaupdate"> - <taskdef name="schemaupdate" - classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" - classpath="${build.classes.dir}:${javac.classpath}"/> - - <schemaupdate - config="src/java/hibernate.cfg.xml" - quiet="no" - text="yes" /> - </target> -</project> Copied: amavisadmin/branches/documentation_1_0/webapp/build.xml (from rev 44, amavisadmin/trunk/webapp/build.xml) =================================================================== --- amavisadmin/branches/documentation_1_0/webapp/build.xml (rev 0) +++ amavisadmin/branches/documentation_1_0/webapp/build.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<project name="SPAMAdmin" default="default" basedir="."> + <description>Builds, tests, and runs the project SPAMAdmin.</description> + <import file="nbproject/build-impl.xml"/> + + <import file="nbproject/profiler-build-impl.xml"/> <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-dist: called before jar building + -post-dist: called after jar building + -post-clean: called after cleaning build products + -pre-run-deploy: called before deploying + -post-run-deploy: called after deploying + + Example of pluging an obfuscator after the compilation could look like + + <target name="post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Other way how to customize the build is by overriding existing main targets. + The target of interest are: + + init-macrodef-javac: defines macro for javac compilation + init-macrodef-junit: defines macro for junit execution + init-macrodef-debug: defines macro for class debugging + do-dist: jar archive building + run: execution of project + javadoc-build: javadoc generation + + Example of overriding the target for project execution could look like + + <target name="run" depends="<PROJNAME>-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that overridden target depends on jar target and not only on + compile target as regular run target does. Again, for list of available + properties which you can use check the target you are overriding in + nbproject/build-impl.xml file. + + --> + <!-- <target name="-post-compile"> + <taskdef name="schemaexport" + classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" + classpath="${build.classes.dir}:${javac.classpath}"/> + <schemaexport + config="src/java/hibernate.cfg.xml" + quiet="no" + text="yes" + drop="no" + delimiter=";" + output="build/schema-export.sql"> + </schemaexport> + </target>--> + + <!-- Build amavisadmin.properties for build and version information --> + <target name="-post-compile"> + <tstamp> + <format property="build.timestamp" + pattern="yyyyMMdd'T'HHmmssZ" locale="en"/> + </tstamp> + <exec executable="/usr/bin/perl"> + <arg value="tools/reposInfo.pl" /> + <redirector output="reposinfo.properties" /> + </exec> + <copy file="${src.dir}/amavisadmin.properties.in" + tofile="${build.classes.dir}/amavisadmin.properties" + filtering="true" overwrite="true"> + <filterset> + <filtersfile file="reposinfo.properties" /> + <filter token="TSTAMP" value="${build.timestamp}" /> + </filterset> + </copy> + <delete file="reposinfo.properties" /> + </target> + + <target name="-pre-dist"> + <copy file="LICENSE" + tofile="${build.web.dir}/LICENSE" + filtering="false" overwrite="true"> + </copy> + </target> + + <target name="schemaupdate"> + <taskdef name="schemaupdate" + classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" + classpath="${build.classes.dir}:${javac.classpath}"/> + + <schemaupdate + config="src/java/hibernate.cfg.xml" + quiet="no" + text="yes" /> + </target> +</project> Deleted: amavisadmin/branches/documentation_1_0/webapp/catalog.xml =================================================================== Copied: amavisadmin/branches/documentation_1_0/webapp/catalog.xml (from rev 44, amavisadmin/trunk/webapp/catalog.xml) =================================================================== Copied: amavisadmin/branches/documentation_1_0/webapp/lib (from rev 44, amavisadmin/trunk/webapp/lib) Copied: amavisadmin/branches/documentation_1_0/webapp/lib/complibs (from rev 44, amavisadmin/trunk/webapp/lib/complibs) Deleted: amavisadmin/branches/documentation_1_0/webapp/lib/complibs/index.xml =================================================================== --- amavisadmin/trunk/webapp/lib/complibs/index.xml 2007-01-24 17:52:29 UTC (rev 44) +++ amavisadmin/branches/documentation_1_0/webapp/lib/complibs/index.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Directory list containing valid component libraries which is a workaround for Win32 file deletion problems.--> -<valid-directory-list/> Copied: amavisadmin/branches/documentation_1_0/webapp/lib/complibs/index.xml (from rev 44, amavisadmin/trunk/webapp/lib/complibs/index.xml) =================================================================== --- amavisadmin/branches/documentation_1_0/webapp/lib/complibs/index.xml (rev 0) +++ amavisadmin/branches/documentation_1_0/webapp/lib/complibs/index.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Directory list containing valid component libraries which is a workaround for Win32 file deletion problems.--> +<valid-directory-list/> Copied: amavisadmin/branches/documentation_1_0/webapp/nbproject (from rev 44, amavisadmin/trunk/webapp/nbproject) Deleted: amavisadmin/branches/documentation_1_0/webapp/nbproject/ant-deploy.xml =================================================================== --- amavisadmin/trunk/webapp/nbproject/ant-deploy.xml 2007-01-24 17:52:29 UTC (rev 44) +++ amavisadmin/branches/documentation_1_0/webapp/nbproject/ant-deploy.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project default="-deploy-ant" basedir="."> - <target name="-init" if="deploy.ant.enabled"> - <property file="${deploy.ant.properties.file}"/> - <tempfile property="temp.module.folder" prefix="tomcat" destdir="${java.io.tmpdir}"/> - <unwar src="${deploy.ant.archive}" dest="${temp.module.folder}"> - <patternset includes="META-INF/context.xml"/> - </unwar> - <xmlproperty file="${temp.module.folder}/META-INF/context.xml"/> - <delete dir="${temp.module.folder}"/> - </target> - <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init"> - <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/> - <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" - classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> - <deploy url="${tomcat.url}/manager" username="${tomcat.username}" - password="${tomcat.password}" path="${Context(path)}" - war="${deploy.ant.archive}"/> - <property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/> - </target> - <target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init"> - <echo message="Undeploying ${Context(path)}"/> - <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" - classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> - <undeploy url="${tomcat.url}/manager" username="${tomcat.username}" - password="${tomcat.password}" path="${Context(path)}"/> - </target> -</project> Copied: amavisadmin/branches/documentation_1_0/webapp/nbproject/ant-deploy.xml (from rev 44, amavisadmin/trunk/webapp/nbproject/ant-deploy.xml) =================================================================== --- amavisadmin/branches/documentation_1_0/webapp/nbproject/ant-deploy.xml (rev 0) +++ amavisadmin/branches/documentation_1_0/webapp/nbproject/ant-deploy.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project default="-deploy-ant" basedir="."> + <target name="-init" if="deploy.ant.enabled"> + <property file="${deploy.ant.properties.file}"/> + <tempfile property="temp.module.folder" prefix="tomcat" destdir="${java.io.tmpdir}"/> + <unwar src="${deploy.ant.archive}" dest="${temp.module.folder}"> + <patternset includes="META-INF/context.xml"/> + </unwar> + <xmlproperty file="${temp.module.folder}/META-INF/context.xml"/> + <delete dir="${temp.module.folder}"/> + </target> + <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init"> + <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/> + <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" + classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> + <deploy url="${tomcat.url}/manager" username="${tomcat.username}" + password="${tomcat.password}" path="${Context(path)}" + war="${deploy.ant.archive}"/> + <property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/> + </target> + <target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init"> + <echo message="Undeploying ${Context(path)}"/> + <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" + classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> + <undeploy url="${tomcat.url}/manager" username="${tomcat.username}" + password="${tomcat.password}" path="${Context(path)}"/> + </target> +</project> Deleted: amavisadmin/branches/documentation_1_0/webapp/nbproject/build-impl.xml =================================================================== --- amavisadmin/trunk/webapp/nbproject/build-impl.xml 2007-01-24 17:52:29 UTC (rev 44) +++ amavisadmin/branches/documentation_1_0/webapp/nbproject/build-impl.xml 2007-01-24 18:35:08 UTC (rev 45) @@ -1,818 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - *** GENERATED FROM project.xml - DO NOT EDIT *** - *** EDIT ../build.xml INSTEAD *** - - For the purpose of easier reading the script - is divided into following sections: - - initialization - - compilation - - dist - - execution - - debugging - - javadoc - - junit compilation - - junit execution - - junit debugging - - cleanup - - --> -<project name="AmavisAdmin-impl" default="build" basedir=".." xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1" xmlns:webproject1="http://www.netbeans.org/ns/web-project/1"> - <import file="ant-deploy.xml"/> - <target name="default" depends="dist,javadoc" description="Build whole project."/> - <!-- - INITIALIZATION SECTION - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target name="-init-private" depends="-pre-init"> - <property file="nbproject/private/private.properties"/> - </target> - <target name="-init-user" depends="-pre-init,-init-private"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target name="-init-project" depends="-pre-init,-init-private,-init-user"> - <property file="nbproject/project.properties"/> - </target> - <target name="-do-ear-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir"> - <property value="${build.ear.web.dir}/META-INF" name="build.meta.inf.dir"/> - <property name="build.classes.dir.real" value="${build.ear.classes.dir}"/> - <property name="build.web.dir.real" value="${build.ear.web.dir}"/> - </target> - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property, -do-ear-init"> - <condition property="have.tests"> - <or> - <available file="${test.src.dir}"/> - </or> - </condition> - <condition property="have.sources"> - <or> - <available file="${src.dir}"/> - </or> - </condition> - <condition property="netbeans.home+have.tests"> - <and> - <isset property="netbeans.home"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <isfalse value="${javadoc.preview}"/> - </condition> - <property name="javac.compilerargs" value=""/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <condition property="no.dist.ear.dir"> - <not> - <isset property="dist.ear.dir"/> - </not> - </condition> - <property name="build.web.excludes" value="${build.classes.excludes}"/> - <condition property="do.compile.jsps"> - <istrue value="${compile.jsps}"/> - </condition> - <condition property="do.display.browser"> - <istrue value="${display.browser}"/> - </condition> - <avai... [truncated message content] |
From: <str...@us...> - 2007-01-24 17:52:35
|
Revision: 44 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=44&view=rev Author: streindl Date: 2007-01-24 09:52:29 -0800 (Wed, 24 Jan 2007) Log Message: ----------- Refactoring of webapp package Added Paths: ----------- amavisadmin/trunk/webapp/ amavisadmin/trunk/webapp/build.xml amavisadmin/trunk/webapp/catalog.xml amavisadmin/trunk/webapp/lib/ amavisadmin/trunk/webapp/lib/complibs/ amavisadmin/trunk/webapp/nbproject/ amavisadmin/trunk/webapp/src/ amavisadmin/trunk/webapp/test/ amavisadmin/trunk/webapp/web/ Removed Paths: ------------- amavisadmin/trunk/build.xml amavisadmin/trunk/catalog.xml amavisadmin/trunk/lib/ amavisadmin/trunk/nbproject/ amavisadmin/trunk/src/ amavisadmin/trunk/test/ amavisadmin/trunk/web/ amavisadmin/trunk/webapp/lib/complibs/ Deleted: amavisadmin/trunk/build.xml =================================================================== --- amavisadmin/trunk/build.xml 2007-01-24 17:49:44 UTC (rev 43) +++ amavisadmin/trunk/build.xml 2007-01-24 17:52:29 UTC (rev 44) @@ -1,119 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<project name="SPAMAdmin" default="default" basedir="."> - <description>Builds, tests, and runs the project SPAMAdmin.</description> - <import file="nbproject/build-impl.xml"/> - - <import file="nbproject/profiler-build-impl.xml"/> <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-dist: called before jar building - -post-dist: called after jar building - -post-clean: called after cleaning build products - -pre-run-deploy: called before deploying - -post-run-deploy: called after deploying - - Example of pluging an obfuscator after the compilation could look like - - <target name="post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Other way how to customize the build is by overriding existing main targets. - The target of interest are: - - init-macrodef-javac: defines macro for javac compilation - init-macrodef-junit: defines macro for junit execution - init-macrodef-debug: defines macro for class debugging - do-dist: jar archive building - run: execution of project - javadoc-build: javadoc generation - - Example of overriding the target for project execution could look like - - <target name="run" depends="<PROJNAME>-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that overridden target depends on jar target and not only on - compile target as regular run target does. Again, for list of available - properties which you can use check the target you are overriding in - nbproject/build-impl.xml file. - - --> - <!-- <target name="-post-compile"> - <taskdef name="schemaexport" - classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" - classpath="${build.classes.dir}:${javac.classpath}"/> - <schemaexport - config="src/java/hibernate.cfg.xml" - quiet="no" - text="yes" - drop="no" - delimiter=";" - output="build/schema-export.sql"> - </schemaexport> - </target>--> - - <!-- Build amavisadmin.properties for build and version information --> - <target name="-post-compile"> - <tstamp> - <format property="build.timestamp" - pattern="yyyyMMdd'T'HHmmssZ" locale="en"/> - </tstamp> - <exec executable="/usr/bin/perl"> - <arg value="tools/reposInfo.pl" /> - <redirector output="reposinfo.properties" /> - </exec> - <copy file="${src.dir}/amavisadmin.properties.in" - tofile="${build.classes.dir}/amavisadmin.properties" - filtering="true" overwrite="true"> - <filterset> - <filtersfile file="reposinfo.properties" /> - <filter token="TSTAMP" value="${build.timestamp}" /> - </filterset> - </copy> - <delete file="reposinfo.properties" /> - </target> - - <target name="-pre-dist"> - <copy file="LICENSE" - tofile="${build.web.dir}/LICENSE" - filtering="false" overwrite="true"> - </copy> - </target> - - <target name="schemaupdate"> - <taskdef name="schemaupdate" - classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" - classpath="${build.classes.dir}:${javac.classpath}"/> - - <schemaupdate - config="src/java/hibernate.cfg.xml" - quiet="no" - text="yes" /> - </target> -</project> Deleted: amavisadmin/trunk/catalog.xml =================================================================== Copied: amavisadmin/trunk/webapp/build.xml (from rev 39, amavisadmin/trunk/build.xml) =================================================================== --- amavisadmin/trunk/webapp/build.xml (rev 0) +++ amavisadmin/trunk/webapp/build.xml 2007-01-24 17:52:29 UTC (rev 44) @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<project name="SPAMAdmin" default="default" basedir="."> + <description>Builds, tests, and runs the project SPAMAdmin.</description> + <import file="nbproject/build-impl.xml"/> + + <import file="nbproject/profiler-build-impl.xml"/> <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-dist: called before jar building + -post-dist: called after jar building + -post-clean: called after cleaning build products + -pre-run-deploy: called before deploying + -post-run-deploy: called after deploying + + Example of pluging an obfuscator after the compilation could look like + + <target name="post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Other way how to customize the build is by overriding existing main targets. + The target of interest are: + + init-macrodef-javac: defines macro for javac compilation + init-macrodef-junit: defines macro for junit execution + init-macrodef-debug: defines macro for class debugging + do-dist: jar archive building + run: execution of project + javadoc-build: javadoc generation + + Example of overriding the target for project execution could look like + + <target name="run" depends="<PROJNAME>-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that overridden target depends on jar target and not only on + compile target as regular run target does. Again, for list of available + properties which you can use check the target you are overriding in + nbproject/build-impl.xml file. + + --> + <!-- <target name="-post-compile"> + <taskdef name="schemaexport" + classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" + classpath="${build.classes.dir}:${javac.classpath}"/> + <schemaexport + config="src/java/hibernate.cfg.xml" + quiet="no" + text="yes" + drop="no" + delimiter=";" + output="build/schema-export.sql"> + </schemaexport> + </target>--> + + <!-- Build amavisadmin.properties for build and version information --> + <target name="-post-compile"> + <tstamp> + <format property="build.timestamp" + pattern="yyyyMMdd'T'HHmmssZ" locale="en"/> + </tstamp> + <exec executable="/usr/bin/perl"> + <arg value="tools/reposInfo.pl" /> + <redirector output="reposinfo.properties" /> + </exec> + <copy file="${src.dir}/amavisadmin.properties.in" + tofile="${build.classes.dir}/amavisadmin.properties" + filtering="true" overwrite="true"> + <filterset> + <filtersfile file="reposinfo.properties" /> + <filter token="TSTAMP" value="${build.timestamp}" /> + </filterset> + </copy> + <delete file="reposinfo.properties" /> + </target> + + <target name="-pre-dist"> + <copy file="LICENSE" + tofile="${build.web.dir}/LICENSE" + filtering="false" overwrite="true"> + </copy> + </target> + + <target name="schemaupdate"> + <taskdef name="schemaupdate" + classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" + classpath="${build.classes.dir}:${javac.classpath}"/> + + <schemaupdate + config="src/java/hibernate.cfg.xml" + quiet="no" + text="yes" /> + </target> +</project> Copied: amavisadmin/trunk/webapp/catalog.xml (from rev 43, amavisadmin/trunk/catalog.xml) =================================================================== Copied: amavisadmin/trunk/webapp/lib (from rev 39, amavisadmin/trunk/lib) Copied: amavisadmin/trunk/webapp/lib/complibs (from rev 43, amavisadmin/trunk/lib/complibs) Copied: amavisadmin/trunk/webapp/nbproject (from rev 43, amavisadmin/trunk/nbproject) Copied: amavisadmin/trunk/webapp/src (from rev 43, amavisadmin/trunk/src) Copied: amavisadmin/trunk/webapp/test (from rev 43, amavisadmin/trunk/test) Copied: amavisadmin/trunk/webapp/web (from rev 43, amavisadmin/trunk/web) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-24 17:49:48
|
Revision: 43 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=43&view=rev Author: streindl Date: 2007-01-24 09:49:44 -0800 (Wed, 24 Jan 2007) Log Message: ----------- fix for #1643722 Modified Paths: -------------- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ShowSingleMail.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/AbstractQuarantine.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.hbm.xml amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.java Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ShowSingleMail.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ShowSingleMail.java 2007-01-22 22:59:12 UTC (rev 42) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ShowSingleMail.java 2007-01-24 17:49:44 UTC (rev 43) @@ -446,11 +446,16 @@ if (message.getMsgs().getQuarantines() == null) { return "unset"; } - Iterator i = message.getMsgs().getQuarantines().iterator(); + Iterator iQ = message.getMsgs().getQuarantines().iterator(); StringBuilder msg = new StringBuilder(message.getMsgs().getSize().intValue()); - while (i.hasNext()) { - Quarantine q = (Quarantine)i.next(); - msg.append(q.getMailText()); + while (iQ.hasNext()) { + Quarantine q = (Quarantine)iQ.next(); + byte[] mailText = q.getMailText(); + char[] buffer = new char[mailText.length]; + for (int i= 0; i < mailText.length; i++) { + buffer[i] = (char)mailText[i]; + } + msg.append(buffer); } String buffer = msg.substring(0, Math.min(8192, msg.length())); buffer = buffer.replaceAll("&", "&"); Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/AbstractQuarantine.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/AbstractQuarantine.java 2007-01-22 22:59:12 UTC (rev 42) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/AbstractQuarantine.java 2007-01-24 17:49:44 UTC (rev 43) @@ -28,7 +28,7 @@ private QuarantineId id; private Message msgs; - private String mailText; + private byte[] mailText; private Integer version; @@ -40,7 +40,7 @@ /** full constructor */ - public AbstractQuarantine(QuarantineId id, Message msgs, String mailText) { + public AbstractQuarantine(QuarantineId id, Message msgs, byte[] mailText) { this.id = id; this.msgs = msgs; this.mailText = mailText; @@ -65,11 +65,11 @@ this.msgs = msgs; } - public String getMailText() { + public byte[] getMailText() { return this.mailText; } - public void setMailText(String mailText) { + public void setMailText(byte[] mailText) { this.mailText = mailText; } @@ -89,4 +89,4 @@ -} \ No newline at end of file +} Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.hbm.xml =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.hbm.xml 2007-01-22 22:59:12 UTC (rev 42) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.hbm.xml 2007-01-24 17:49:44 UTC (rev 43) @@ -32,7 +32,7 @@ <many-to-one name="msgs" class="de.sreindl.amavisadmin.db.Message" update="false" insert="false" fetch="select"> <column name="mail_id" length="12" not-null="true" /> </many-to-one> - <property name="mailText" type="java.lang.String"> + <property name="mailText" type="binary"> <column name="mail_text" not-null="true" /> </property> </class> Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.java 2007-01-22 22:59:12 UTC (rev 42) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Quarantine.java 2007-01-24 17:49:44 UTC (rev 43) @@ -37,7 +37,7 @@ /** full constructor */ - public Quarantine(QuarantineId id, Message msgs, String mailText) { + public Quarantine(QuarantineId id, Message msgs, byte[] mailText) { super(id, msgs, mailText); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-22 22:59:21
|
Revision: 42 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=42&view=rev Author: streindl Date: 2007-01-22 14:59:12 -0800 (Mon, 22 Jan 2007) Log Message: ----------- docs/user_guide.xml: Added first draft user user guide docs/installationguide.xml: Several additions related to PostgreSQL Modified Paths: -------------- amavisadmin/branches/documentation_1_0/docs/installationguide.xml Added Paths: ----------- amavisadmin/branches/documentation_1_0/docs/user_guide.xml Modified: amavisadmin/branches/documentation_1_0/docs/installationguide.xml =================================================================== --- amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-22 17:33:48 UTC (rev 41) +++ amavisadmin/branches/documentation_1_0/docs/installationguide.xml 2007-01-22 22:59:12 UTC (rev 42) @@ -17,7 +17,7 @@ <address><street>Langster Straße 28</street> <postcode>40668</postcode> <city>Meerbusch</city> -<country>Germany></country></address> +<country>Germany</country></address> <email>sr...@sr...</email> </author> @@ -197,6 +197,172 @@ </section> <section> + <title>PostgreSQL database</title> + + <para>This document does not describe how to setup the PostgreSQL + database. For most Microsoft <trademark + class="registered">Windows</trademark> and <trademark + class="registered">Linux</trademark>/<trademark + class="registered">Unix</trademark> distribitions there're binary + packages available (see <ulink + url="http://www.postgresql.org/ftp/binary/">http://www.postgresql.org/ftp/binary/<version></ulink> + for available systems and versions). They can be downloard If you want + (or need) to install PostgreSQL from scratch, the following section in + the PostgreSQL documentation might help: <ulink + url="http://www.postgresql.org/docs/8.1/interactive/installation.html">http://www.postgresql.org/docs/8.1/interactive/installation.html</ulink>.</para> + + <para>For development and testing PostgreSQL release 8.1 has been used. + Other versions might work also but no tests have been done to ensure + working on different releases of PostgreSQL.</para> + + <section> + <title>Creating the database for storing Amavisd-new data</title> + + <para>It makes sense (from performance, sizing and other aspects like + security) to create a separate database that contains the data stored + by Amavisd-new and AmavisAdmin. The database should be accessable only + by superusers and a specific functional account for maximum security. + In addition PostgreSQL offers the possibility to move parts of the + data to other filesystems/paths by using tablespaces.</para> + + <section> + <title>Creating a functional database user</title> + + <para>It makes sense to create a functional user that is used by the + applications (amavisd-new and AmavisAdmin) to connect to the + database. This user created should be able to access the database + only from the IP-addresses used by the applications itself. This + gives some additional security. To create a user, two steps are + neccessary: First the user itself has to be created. Afterwards the + user has to be configured to connect to the database. The second + step depends on your local security, therfore please refer to <ulink + url="http://www.postgresql.org/docs/8.1/interactive/client-authentication.html">http://www.postgresql.org/docs/8.1/interactive/client-authentication.html</ulink> + for details. Creating a user can be done by using the command + <command>createuser</command> that is part of every PostgreSQL + distribution. The following example shows how to create the user + amavis that will be used for administrators and applications to + connect to the database (please replace + <replaceable>superuser</replaceable> with your superuser role + name):</para> + + <screen xml:space="preserve"><prompt>sreindl@linux-fest:~> </prompt><userinput>sudo -u postgres createuser \ +</userinput><prompt>> </prompt><userinput> --no-superuser --no-createrole --no-createdb \ +</userinput><prompt>> </prompt><userinput> --pwprompt --username=<replaceable>superuser</replaceable> --password amavis +</userinput><prompt>Enter password for new role: </prompt><userinput><replaceable><password></replaceable> +</userinput><prompt>Enter it again: </prompt><userinput><replaceable><password></replaceable> +</userinput><prompt>Password:</prompt> <userinput><replaceable><superuserpassword></replaceable> +</userinput><computeroutput>CREATE ROLE +</computeroutput><prompt>sreindl@linux-fest:~> </prompt></screen> + + <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> + </section> + + <section> + <title>Creating a tablespace</title> + + <para>For maintainability I would suggest to create the database + used for Amavisd-new in a separate tablespace. Creating a tablespace + in PostgreSQL is done in two steps: At first you have to create a + directory in the file system which will contain the tablespace data. + With the Linux/Unix operating system the command might look like + this:</para> + + <programlisting><prompt>$ </prompt><userinput>mkdir -p <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput></programlisting> + + <para>where the path given might even reside on a different machine + (i.e. network file server). On other operating systems this command + might look different or you might even use a graphical user + interface to create the path. After creating the path you have to + change the permissions that only the database server has access to + the created path. This is basically done for security + reasons:</para> + + <programlisting><prompt>$ </prompt><userinput>chown <replaceable>postgres</replaceable> <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput> +<prompt>$ </prompt><userinput>chmod 0700 <replaceable>/srv/db/tablespaces/amavis</replaceable></userinput></programlisting> + + <para>The first command assigns the user postgres (please provide + the user name which has been used to install the postgres database) + to the created path, i.e. change the owner of this path to the + database system. The second command changes the permissions of the + directory in a way that only the PostgreSQL system (and the system + administrator) can access the contents of the directory. Other + operating systems might need other commands to accomplish + this.</para> + + <para>The second step is to actually create the tablespace. This is + done by using database commands. The following example creates a + tablespace <database class="table">tb_admin</database> which points + to the directory created above:</para> + + <para><screen><prompt>sreindl@linux-fest:~></prompt> +<prompt>sreindl@linux-fest:~> </prompt><userinput>psql --username=<replaceable>superuser</replaceable> \</userinput> +<prompt>> </prompt> <userinput>--password postgres</userinput> +<computeroutput>Password for user <replaceable>superuser</replaceable>: +Welcome to psql 8.1.5, the PostgreSQL interactive terminal. + +Type: \copyright for distribution terms + \h for help with SQL commands + \? for help with psql commands + \g or terminate with semicolon to execute query + \q to quit + +</computeroutput><prompt>postgres=# </prompt><userinput>CREATE TABLESPACE <replaceable>tb_amavis</replaceable> </userinput> +<prompt>postgres-# </prompt><userinput> OWNER amavis </userinput> +<prompt>postgres-# </prompt><userinput> LOCATION '<replaceable>/srv/db/tablespaces/amavis</replaceable>';</userinput> +<computeroutput>CREATE TABLE</computeroutput> +<prompt>postgres=#</prompt></screen></para> + </section> + + <section> + <title>Creating the database</title> + + <para>After doing the preparation steps described in the sections + above, the final step is to create the actual database. This can be + done by using the command <command>createdb</command> or by using + SQL commands entered into the PostgreSQL frontent + <command>psql</command>. The database encoding can be of any type as + the mail text itself is stored as a binary field and therefore + there's no need to use binary encoding for the database. The + following command creates the database <database + class="name">amavis</database> for user <database + class="user">amavis</database> in tablespace <database + class="table">tb_amavis</database>:</para> + + <screen><prompt>sreindl@linux-fest:~> </prompt><userinput>createdb --tablespace=tb_admin \ +</userinput><prompt>> </prompt><userinput> --owner=amavis \ +</userinput><prompt>> </prompt><userinput> --echo \ +</userinput><prompt>> </prompt><userinput> --user=superuser \ +</userinput><prompt>> </prompt><userinput> --password +</userinput><prompt>Password:</prompt> <userinput><replaceable><password></replaceable></userinput> +<computeroutput>CREATE DATABASE</computeroutput> +<prompt>sreindl@linux-fest:~> </prompt> +</screen> + + <para>A similar command on the psql command line would be</para> + + <screen><prompt>postgres=# </prompt><userinput>CREATE DATABASE amavis OWNER amavis TABLESPACE tb_amavis;</userinput> +<computeroutput>CREATE DATABASE</computeroutput> +<prompt>postgres=#</prompt></screen> + </section> + </section> + + <section> + <title>Create SQL data model</title> + + <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> + </section> + </section> + + <section> <title>Amavisd-new</title> <para>The Amavisd-new application can be downloaded from the <ulink @@ -253,4 +419,183 @@ </calloutlist> </section> </section> + + <appendix id="app-postgres-ddl"> + <title>Sample PostgreSQL DDL script</title> + + <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); +); + +-- 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 +); + +-- 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) +); + +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 + + 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 + + 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 + + spam_modifies_subj char(1) default NULL, -- Y/N + + 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, + + 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, + + 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, + + 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 +); + +-- 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. + +-- 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; + +-- 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> </article> \ No newline at end of file Added: amavisadmin/branches/documentation_1_0/docs/user_guide.xml =================================================================== --- amavisadmin/branches/documentation_1_0/docs/user_guide.xml (rev 0) +++ amavisadmin/branches/documentation_1_0/docs/user_guide.xml 2007-01-22 22:59:12 UTC (rev 42) @@ -0,0 +1,86 @@ +<?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"> +<article> + <articleinfo> + <title>AmavisAdmin</title> + + <subtitle>User Manual</subtitle> + + <author> + <firstname>Stephen</firstname> + + <surname>Reindl</surname> + + <address><street>Langster Str. 28</street> +<postcode>40668</postcode> <city>Meerbusch</city> +<country>Germany</country></address> + + <email>sr...@sr...</email> + </author> + + <pubdate>February 2007</pubdate> + + <copyright> + <year>2006</year> + + <year>2007</year> + + <holder>Stephen Reindl</holder> + </copyright> + + <legalnotice> + <para>Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. You may + obtain a copy of the License at</para> + + <para><ulink + url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink></para> + + <para>Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing permissions + and limitations under the License.</para> + </legalnotice> + + <revhistory> + <revision> + <revnumber>0.1</revnumber> + + <date>2007-01-22</date> + + <authorinitials>sr</authorinitials> + + <revdescription> + <para>Initial document</para> + </revdescription> + </revision> + </revhistory> + </articleinfo> + + <section> + <title>Preface</title> + + <para>This document describes how to use AmavisAdmin from a user's + perspective. As the AmavisAdmin can be used by both, regular users and + adminstrators, there's no specific document for administration of + AmavisAdmin. Specific details about configuration and scheduling can be + found in the <citetitle id="ref-installation-manual">installation + manual</citetitle>.</para> + + <section> + <title>Bibliography</title> + + <bibliography> + <biblioentry id="maler96"> + <title>From Text to Model to Markup</title> + + <subtitle></subtitle> + </biblioentry> + </bibliography> + + <para></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-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-21 16:45:12
|
Revision: 40 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=40&view=rev Author: streindl Date: 2007-01-21 08:45:08 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Documentation Branch Added Paths: ----------- amavisadmin/branches/documentation_1_0/ Copied: amavisadmin/branches/documentation_1_0 (from rev 39, amavisadmin/trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-21 15:41:45
|
Revision: 39 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=39&view=rev Author: streindl Date: 2007-01-21 07:41:38 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Merge chanes from trunk Modified Paths: -------------- amavisadmin/trunk/tools/reposInfo.pl Modified: amavisadmin/trunk/tools/reposInfo.pl =================================================================== --- amavisadmin/trunk/tools/reposInfo.pl 2007-01-21 14:52:36 UTC (rev 38) +++ amavisadmin/trunk/tools/reposInfo.pl 2007-01-21 15:41:38 UTC (rev 39) @@ -51,7 +51,7 @@ my $url = $_info->URL; if ($url =~ /trunk/) { print "branch=trunk\n"; -} elsif ($url =~ /branches\/([^\/]+)\//) { +} elsif ($url =~ /branches\/([^\/]+)/) { print "branch=branch $1\n"; } elsif ($url =~ /tags\/([^\/]+)\//) { print "branch=$1\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-21 14:52:38
|
Revision: 38 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=38&view=rev Author: streindl Date: 2007-01-21 06:52:36 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Wrong tag recognition Modified Paths: -------------- amavisadmin/branches/alpha2/tools/reposInfo.pl Modified: amavisadmin/branches/alpha2/tools/reposInfo.pl =================================================================== --- amavisadmin/branches/alpha2/tools/reposInfo.pl 2007-01-21 14:48:38 UTC (rev 37) +++ amavisadmin/branches/alpha2/tools/reposInfo.pl 2007-01-21 14:52:36 UTC (rev 38) @@ -51,7 +51,7 @@ my $url = $_info->URL; if ($url =~ /trunk/) { print "branch=trunk\n"; -} elsif ($url =~ /branches\/([^\/]+)\//) { +} elsif ($url =~ /branches\/([^\/]+)/) { print "branch=branch $1\n"; } elsif ($url =~ /tags\/([^\/]+)\//) { print "branch=$1\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <str...@us...> - 2007-01-21 14:48:41
|
Revision: 37 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=37&view=rev Author: streindl Date: 2007-01-21 06:48:38 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Prepare for alpha2 Added Paths: ----------- amavisadmin/branches/alpha2/ amavisadmin/branches/alpha2/docs/Makefile amavisadmin/branches/alpha2/docs/cust/titlepage.templates.xml amavisadmin/branches/alpha2/docs/images amavisadmin/branches/alpha2/docs/installationguide.xml amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/ApproveRequests.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/EditJobs.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/EditSingleJob.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/MyRequests.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/SessionBean1.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/jobs/ReleaseMailJob.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/jobs/RetentionCleanupJob.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/templates/ReleaseError.vm amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/templates/ReleaseSuccess.vm amavisadmin/branches/alpha2/src/java/hibernate.cfg.xml amavisadmin/branches/alpha2/src/java/log4j.properties amavisadmin/branches/alpha2/web/EditSingleJob.jsp Removed Paths: ------------- amavisadmin/branches/alpha2/docs/Makefile amavisadmin/branches/alpha2/docs/cust/titlepage.templates.xml amavisadmin/branches/alpha2/docs/installationguide.xml amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/ApproveRequests.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/EditJobs.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/EditSingleJob.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/MyRequests.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/SessionBean1.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java amavisadmin/branches/alpha2/src/java/de/sreindl/amavisadmin/jobs/RetentionCleanupJob.java amavisadmin/branches/alpha2/src/java/hibernate.cfg.xml amavisadmin/branches/alpha2/src/java/log4j.properties amavisadmin/branches/alpha2/web/EditSingleJob.jsp Copied: amavisadmin/branches/alpha2 (from rev 35, amavisadmin/trunk) Deleted: amavisadmin/branches/alpha2/docs/Makefile =================================================================== --- amavisadmin/trunk/docs/Makefile 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/branches/alpha2/docs/Makefile 2007-01-21 14:48:38 UTC (rev 37) @@ -1,641 +0,0 @@ -# $Source$ -# $Author: xmldoc $ -# $Date: 2006-09-01 15:47:16 +0900 (Fri, 01 Sep 2006) $ -# $Revision: 6235 $ -# vim: number -# -# ----------------------------------------------------------------- -# ** Makefile.DocBook -- generate output from DocBook sources ** -# ----------------------------------------------------------------- -# -# This file is part of the DocBook Project XSL Stylesheet -# distribution. -# -# See http://docbook.sourceforge.net/release/xsl/current/ -# for copyright and other information. -# DOCBOOK_OUTPUT_FORMATS is the default set of targets (output -# formats) that get built when you type "make" without any targets -# explicitly specified. To generate a different set of output -# formats, change the value of DOCBOOK_OUTPUT_FORMATS here or set -# it in your environment; for example: -# -# set DOCBOOK_OUTPUT_FORMATS="html pdf"; export DOCBOOK_OUTPUT_FORMATS -# -# Of course by explicitly specifying particular targets when you -# invoke "make", you can always override generation of the default -# set of targets; for example: -# -# make html txt -# -# That would generate just HTML (unchunked) and plain-text output. -# -DOCBOOK_OUTPUT_FORMATS ?= man chunk txt pdf - -# If you want XHTML output instead of HTML, set HTML_OR_XHTML to -# 'xhtml' or just specify 'xhtml" in DOCBOOK_OUTPUT_FORMATS. -ifeq ($(findstring xhtml,$(DOCBOOK_OUTPUT_FORMATS)),) -HTML_OR_XHTML ?= html -else -HTML_OR_XHTML ?= xhtml -endif - -# ----------------------------------------------------------------- -# *** TOOLS and other DEPENDENCIES *** -# ----------------------------------------------------------------- -# we use rmdir(1) to remove dirs we create for chunked HTML output -RMDIR = rmdir -# "-p" causes empty parent dirs to be deleted as well -RMDIR_FLAGS = --ignore-fail-on-non-empty -p - -# possible values for PDF_MAKER are: -# dblatex|fop|fop1|xep|xmlroff|passivetex -PDF_MAKER = fop1 - -# possible values for TXT_MAKER are: -# links|lynx|w3m|w3mmee -TXT_MAKER = w3m -TXT_MAKER_FLAGS = -dump - -# xsl -XSLT = xsltproc -XSLT_FLAGS = --xinclude - -# http://dblatex.sourceforge.net/ -DBLATEX = dblatex -DBLATEX_FLAGS = -b pdftex - -FOP = fop -FOP_FLAGS = - -XEP = xep -XEP_FLAGS = - -# http://xmlroff.sourceforge.net/ -XMLROFF = xmlroff -XMLROFF_FLAGS = - -PDFTEX = pdftex -PDFTEX_FLAGS = - -# used by PassiveTeX -PDFXMLTEX = pdfxmltex - -# http://docbook2x.sourceforge.net/ -DB2X_XSLTPROC = db2x_xsltproc -DB2X_XSLTPROC_FLAGS = -DB2X_TEXIXML = db2x_texixml -DB2X_TEXIXML_FLAGS = - -# we call the man(1) command to generate "foo.N.pdf" and -# "foo.N.txt" output (see "man-pdf" & "man-txt" targets) -MAN = man -MAN_FLAGS = - -# The "ps2pdf" command is part of GhostSript (gs) distro. -# It is just a wrapper script around gs that does this: -# -# gs -dCompatibilityLevel=1.2 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ -# "-sOutputFile=$outfile" -dCompatibilityLevel=1.2 -c .setpdfwrite -f "$infile" -# -# Where, for example: $outfile = foo.pdf and $infile = foo.1 -PS2PDF = ps2pdf -PS2PDF_FLAGS = - -# The "col" command is needed for stripping backspaces and -# underscores from man(1) output to get pure plain-text -COL = col -COL_FLAGS = - -# The "expand" command is needed for expanding tabs from files -# generated from "man foo.1 | col -b" output -# output to get pure plain-text -EXPAND = expand -EXPAND_FLAGS = - -# value of DOCBOOK_XSL should either be the canonical -# (docbook.sourceforge.net) URL for the DocBook Project XSL -# stylesheets OR it can be a local system path -DOCBOOK_XSL = docbook-xsl-1.71.1 - -# ----------------------------------------------------------------- -# names of some DIRECTORIES and FILES we need -# ----------------------------------------------------------------- -# We create a tmp directory once per make invocation; it's needed -# for holding a temporary copy of the custom DBLaTeX stylesheet -# (because dblatex currently can't read a stylesheet from stdin) -TMP ?= /tmp -TMPNUM := $(shell echo $$$$) -DOCBOOK_TMP := $(TMP)/docbook-make-$(TMPNUM) - -# MAN_MANIFEST_EXT is file extension added to individual manifest -# files -MAN_MANIFEST_EXT = manifest_man - -# HTML_MANIFEST_EXT is file extension added to HTML manifest files -HTML_MANIFEST_EXT = manifest_html - -# BASEDIR_SUFFIX is a what you need to set if you want a suffix -# added to the end of each "base.dir" we create while generating -# chunked HTML output -#BASEDIR_SUFFIX = -html -#BASEDIR_SUFFIX = _html -BASEDIR_SUFFIX = - -# ----------------------------------------------------------------- -# assorted OPTIONS -# ----------------------------------------------------------------- -# HTML_STYLESHEET -> $html.stylesheet stylesheet param -# http://docbook.sourceforge.net/snapshots/xsl/doc/html/html.stylesheet.html -HTML_STYLESHEET = style.css -# HTML_IMAGES -> $admon.graphics.path -# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.path.html -HTML_IMAGES = images/ -# HTML_IMAGES_EXT -> $admon.graphics.extension -# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.extension.html -HTML_IMAGES_EXT = .png - -# use these to set params on the command-line -# format is, e.g., HTML_PARAMS="--stringparam variablelist.as.table 1..." -FO_PARAMS = -HTML_PARAMS = -MAN_PARAMS = - -# DBX_PARAMS is for dblatex(1); format uses "-p": -# DBX_PARAMS="-p doc.publisher.show 1 -p term.breakline 1... -DBX_PARAMS= - -# What file extension do you use for DocBook source files? -DOCBOOK_FILE_EXTENSION = .xml - -# ----------------------------------------------------------------- -# make(1) functions for building file lists -# ----------------------------------------------------------------- -# -# the values of the following are used for determing what needs -# to be built and/or cleaned up - -SOURCE_FILES_DBK = $(wildcard *$(DOCBOOK_FILE_EXTENSION)) - -FILES_FO = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).fo) -FILES_TXT = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).txt) -FILES_PDF = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).pdf) -FILES_LOG = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).log) -FILES_OUT = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).out) -FILES_AUX = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).aux) -FILES_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).html) -FILES_INFO = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).info) -DIRS_CHUNK = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base)$(BASEDIR_SUFFIX)) -LISTS_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(HTML_MANIFEST_EXT)) -LISTS_MAN = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(MAN_MANIFEST_EXT)) -FILES_CHNK = $(shell for manifest in $(LISTS_HTML); do if [ -f "$$manifest" ]; then cat $$manifest; fi done) -FILES_MAN = $(shell for manifest in $(LISTS_MAN); do if [ -f "$$manifest" ]; then cat $$manifest; fi done) -FILES_MANP = $(foreach base,$(FILES_MAN),$(base).pdf) -FILES_MANT = $(foreach base,$(FILES_MAN),$(base).txt) -DIRS_MAN = $(shell for file in $(FILES_MAN); do dirname $$file; done | uniq) - -# ----------------------------------------------------------------- -# ** stylesheet for testing whether a file has a refentry -# ----------------------------------------------------------------- -REFENTRY_CHECK := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0" \ - xmlns:db="http://docbook.org/ns/docbook" \ - > \ - <xsl:output method="text"/> \ - <xsl:template match="/"> \ - <xsl:if test="//refentry|//db:refentry"> \ - <xsl:text>true</xsl:text> \ - </xsl:if> \ - </xsl:template> \ -</xsl:stylesheet> - -# ----------------------------------------------------------------- -# ** Stylesheet Customization Layers ** -# ----------------------------------------------------------------- -# -# for DBLaTeX -DBX_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:param name="co.linkends.show">0</xsl:param> \ - <xsl:param name="callout.markup.circled">1</xsl:param> \ - <xsl:param name="callout.linkends.hot">0</xsl:param> \ - <xsl:param name="doc.publisher.show">1</xsl:param> \ - <xsl:param name="term.breakline">1</xsl:param> \ - <xsl:param name="doc.alignment">left</xsl:param> \ - <xsl:param name="newtbl.use">1</xsl:param> \ - <xsl:param name="latex.hyperparam"/> \ - <xsl:param name="latex.style">docbook</xsl:param> \ - <xsl:param name="latex.biblio.output">all</xsl:param> \ - <xsl:param name="latex.bibfiles">""</xsl:param> \ - <xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \ - <xsl:param name="latex.output.revhistory">0</xsl:param> \ - <xsl:param name="latex.figure.position">[htbp]</xsl:param> \ - <xsl:param name="latex.figure.boxed">0</xsl:param> \ - <xsl:param name="latex.babel.use">1</xsl:param> \ - <xsl:param name="latex.babel.language"></xsl:param> \ - <xsl:param name="latex.class.options">twoside</xsl:param> \ - <xsl:param name="biblioentry.item.separator">, </xsl:param> \ - <xsl:param name="refentry.xref.manvolnum">1</xsl:param> \ - <xsl:param name="refsynopsis.title">Synopsis</xsl:param> \ - <xsl:param name="refnamediv.title"></xsl:param> \ - <xsl:param name="funcsynopsis.style">ansi</xsl:param> \ - <xsl:param name="funcsynopsis.decoration">1</xsl:param> \ - <xsl:param name="function.parens">0</xsl:param> \ - <xsl:param name="classsynopsis.default.language">java</xsl:param> \ - <xsl:param name="show.comments">0</xsl:param> \ -</xsl:stylesheet> - -# for FO output -FO_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - xmlns:fo="http://www.w3.org/1999/XSL/Format" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \ - <xsl:include href="cust/titlepage.templates.xsl"/> \ - <xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \ - <xsl:param name="paper.type">A4</xsl:param> \ - <xsl:param name="draft.watermark.image"></xsl:param> \ - <xsl:param name="hyphenation">false</xsl:param> \ - <xsl:param name="hyphenate.verbatim">1</xsl:param> \ - <xsl:param name="alignment">left</xsl:param> \ - <xsl:param name="refentry.generate.name">1</xsl:param> \ - <xsl:param name="refentry.generate.title">0</xsl:param> \ - <xsl:param name="refentry.pagebreak">1</xsl:param> \ - <xsl:param name="shade.verbatim">1</xsl:param> \ - <xsl:param name="variablelist.as.blocks">1</xsl:param> \ - <xsl:param name="ulink.show">1</xsl:param> \ - <xsl:param name="ulink.footnotes">1</xsl:param> \ - <xsl:param name="index.on.type">1</xsl:param> \ - <xsl:attribute-set name="xref.properties"> \ - <xsl:attribute name="color">blue</xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="shade.verbatim.style"> \ - <xsl:attribute name="background-color">\#E0E0E0</xsl:attribute> \ - <xsl:attribute name="padding-left">4pt</xsl:attribute> \ - <xsl:attribute name="padding-right">4pt</xsl:attribute> \ - <xsl:attribute name="padding-top">4pt</xsl:attribute> \ - <xsl:attribute name="padding-bottom">4pt</xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:param name="section.autolabel">1</xsl:param> \ - <xsl:attribute-set name="section.title.level1.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="section.title.level2.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.3"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="section.title.level3.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.1"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="section.title.level4.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="component.title.properties"> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ - <xsl:attribute-set name="monospace.verbatim.properties"> \ - <xsl:attribute name="wrap-option">wrap</xsl:attribute> \ - <xsl:attribute name="hyphenation-character">\</xsl:attribute> \ - <xsl:attribute name="font-size"> \ - <xsl:value-of select="$$body.font.master * 0.8"></xsl:value-of> \ - <xsl:text>pt</xsl:text> \ - </xsl:attribute> \ - </xsl:attribute-set> \ -</xsl:stylesheet> - -# for single-file (X)HTML outpout -HTML_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/docbook.xsl"/> \ - <xsl:param name="gentext.custom">local.l10n.xml</xsl:param> \ - <xsl:param name="local.l10n.xml" select="document($$gentext.custom)"/> \ - <xsl:param name="refentry.generate.name">1</xsl:param> \ - <xsl:param name="refentry.generate.title">0</xsl:param> \ - <xsl:param name="root.filename"></xsl:param> \ - <xsl:param name="variablelist.as.table">0</xsl:param> \ - <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \ - <xsl:param name="admon.graphics">0</xsl:param> \ - <xsl:param name="index.on.type">1</xsl:param> \ -</xsl:stylesheet> - -# for chunked (X)HTML output -CHNK_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/chunk.xsl"/> \ - <xsl:param name="refentry.generate.name">0</xsl:param> \ - <xsl:param name="refentry.generate.title">1</xsl:param> \ - <xsl:param name="variablelist.as.table">0</xsl:param> \ - <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \ - <xsl:param name="admon.graphics">1</xsl:param> \ - <xsl:param name="admon.graphics.path">$(HTML_IMAGES)</xsl:param> \ - <xsl:param name="admon.graphics.extension">$(HTML_IMAGES_EXT)</xsl:param> \ - <xsl:param name="root.filename"></xsl:param> \ - <xsl:param name="generate.manifest">1</xsl:param> \ - <xsl:param name="use.id.as.filename">1</xsl:param> \ - <xsl:param name="chunker.output.indent">yes</xsl:param> \ - <xsl:param name="index.on.type">1</xsl:param> \ -</xsl:stylesheet> - -# for man-page output -MAN_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ - version="1.0"> \ - <xsl:import href="$(DOCBOOK_XSL)/manpages/docbook.xsl"/> \ - <xsl:param name="man.output.manifest.enabled" select="1"/> \ - <xsl:param name="man.output.in.separate.dir" select="1"/> \ - <xsl:param name="man.output.base.dir">man/</xsl:param> \ - <xsl:param name="man.output.subdirs.enabled" select="1"/> \ -</xsl:stylesheet> - -# ----------------------------------------------------------------- -# ** TARGETS START HERE ** -# ----------------------------------------------------------------- -# prevents make from deleting, e.g. foo.1, after making foo.1.pdf -# and foo.1.txt from it. -.PRECIOUS: %.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9 - -docbook: cust/titlepage.templates.xsl $(DOCBOOK_OUTPUT_FORMATS) - -man: $(LISTS_MAN) - -# we can generate PDFs from man pages -man-pdf: man - $(MAKE) $(FILES_MANP) - -# we can generate plain text from man pages -man-txt: man - $(MAKE) $(FILES_MANT) - -html: $(FILES_HTML) - -chunk: $(LISTS_HTML) - -txt: $(FILES_TXT) - -pdf: $(FILES_PDF) - -info: $(FILES_INFO) - -cust/titlepage.templates.xsl: cust/titlepage.templates.xml - xsltproc -output cust/titlepage.templates.xsl \ - $(DOCBOOK_XSL)/template/titlepage.xsl cust/titlepage.templates.xml - -# use the "debug" target to echo variables, etc., to -# test/troubleshoot changes you make to this makefile -debug: - @echo $(DIRS_MAN) - -# ----------------------------------------------------------------- -# pattern rule for making (X)HTML and plain-text output -# ----------------------------------------------------------------- -%.html: %$(DOCBOOK_FILE_EXTENSION) - @echo '$(HTML_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) - $< > $@ - -%.txt: %.html - $(TXT_MAKER) $(TXT_MAKER_FLAGS) ./$< \ - | sed "s/^\(\s\+[0-9]\+\. \)file:\/\/.\+$$/\\1(local)/g" \ - | egrep -v '^ file:///.+$$' \ - > $@ -# if DOCBOOK_OUTPUT_FORMATS does not contain "html", then we need -# to remove the "intermediate" HTML files we used for generating -# plain-text output -ifeq ($(findstring html,$(DOCBOOK_OUTPUT_FORMATS)),) - $(RM) $< -endif - -# ----------------------------------------------------------------- -# pattern rule for making chunked (X)HTML pages -# ----------------------------------------------------------------- -%.$(HTML_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION) - @echo '$(CHNK_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) \ - --stringparam manifest $@ \ - --stringparam base.dir $(basename $@)$(BASEDIR_SUFFIX)/ \ - - $< - -# ----------------------------------------------------------------- -# pattern rules for making FO and PDF stuff -# ----------------------------------------------------------------- -%.fo: %$(DOCBOOK_FILE_EXTENSION) - @echo '$(FO_CUSTOM)' \ - | $(XSLT) $(XSLT_FLAGS) $(FO_PARAMS) - $< > $@ - -ifeq ($(PDF_MAKER),dblatex) -%.pdf: %$(DOCBOOK_FILE_EXTENSION) - mkdir -p $(DOCBOOK_TMP) - echo '$(DBX_CUSTOM)' > $(DOCBOOK_TMP)/dblatex.xsl - -$(DBLATEX) $(DBLATEX_FLAGS)\ - -p $(DOCBOOK_TMP)/dblatex.xsl \ - -o $@ \ - $< - $(RM) -r $(DOCBOOK_TMP) -endif - -%.pdf: %.fo -ifeq ($(PDF_MAKER),) - $(error No PDF_MAKER specified. Cannot make pdf) -else -ifeq ($(PDF_MAKER),xep) - $(XEP) $(XEP_FLAGS) $< $@ -else -ifeq ($(PDF_MAKER),fop) - $(FOP) $(FOP_FLAGS) $< $@ -else -ifeq ($(PDF_MAKER),fop1) - $(FOP) $(FOP_FLAGS) $< $@ -else -ifeq ($(PDF_MAKER),xmlroff) - $(XMLROFF) $(XMLROFF_FLAGS) $< -o $@ -else -ifeq ($(PDF_MAKER),passivetex) - $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< - @if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \ - $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \ - fi - @if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \ - $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \ - fi - $(RM) $(basename $@).log - $(RM) $(basename $@).aux - $(RM) $(basename $@).out -else - $(error I do not know how to make a PDF using "$(PDF_MAKER)") -endif -endif -endif -endif -endif -endif - -# ----------------------------------------------------------------- -# pattern rules for making TeXinfo stuff -# ----------------------------------------------------------------- -%.txml: %$(DOCBOOK_FILE_EXTENSION) - $(DB2X_XSLTPROC) $(DB2X_XSLTPROC_FLAGS) -s texi -o $@ $< - -%.texi: %.txml - $(DB2X_TEXIXML) $(DB2X_TEXIXML_FLAGS) $< - -# the following is actually a built-in rule, but it's redefined -# here just for the sake of clarity -%.info: %.texi - $(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@ - -# ----------------------------------------------------------------- -# pattern rule for making man pages -# ----------------------------------------------------------------- -%.$(MAN_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION) - @if [ "$(strip $(shell echo '$(REFENTRY_CHECK)' | $(XSLT) $(XSLT_FLAGS) - $<))" != "true" ]; then \ - touch $@; \ - else \ - echo '$(MAN_CUSTOM)' \ - | $(XSLT) $(XSLT_FLAGS) $(MAN_PARAMS) \ - --stringparam man.output.manifest.filename $@ \ - - $<; \ - fi - -# ----------------------------------------------------------------- -# pattern rule for enabling direct "make foo.1" to work -# ----------------------------------------------------------------- - -%.1 %.2 %.3 %.4 %.5 %.6 %.7: %.xml - $(MAKE) $(basename $<).$(MAN_MANIFEST_EXT) - -# ----------------------------------------------------------------- -# pattern rules for making Postscript/PDF output from man pages -# ----------------------------------------------------------------- -%.1.ps: %.1 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.2.ps: %.2 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.3.ps: %.3 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.4.ps: %.4 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.5.ps: %.5 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.6.ps: %.6 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.7.ps: %.7 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.8.ps: %.8 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -%.9.ps: %.9 - $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ - -# ----------------------------------------------------------------- -# pattern rule for converting Postscript to PDF -# ----------------------------------------------------------------- -%.pdf: %.ps - $(PS2PDF) $(PS2PDF_FLAGS) $< - -# ----------------------------------------------------------------- -# pattern rules for making plain-text output from man pages -# ----------------------------------------------------------------- -%.1.txt: %.1 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.2.txt: %.2 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.3.txt: %.3 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.4.txt: %.4 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.5.txt: %.5 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.6.txt: %.6 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.7.txt: %.7 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.8.txt: %.8 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -%.9.txt: %.9 - $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ - -# ----------------------------------------------------------------- -# target(s) for cleaning up the mess -# ----------------------------------------------------------------- -clean: -ifneq ($(FILES_TXT),) - $(RM) $(FILES_TXT) -endif -ifneq ($(FILES_PDF),) - $(RM) $(FILES_PDF) -endif -ifneq ($(FILES_FO),) - $(RM) $(FILES_FO) -endif -ifneq ($(FILES_LOG),) - $(RM) $(FILES_LOG) -endif -ifneq ($(FILES_OUT),) - $(RM) $(FILES_OUT) -endif -ifneq ($(FILES_AUX),) - $(RM) $(FILES_AUX) -endif -ifneq ($(FILES_HTML),) - $(RM) $(FILES_HTML) -endif -ifneq ($(FILES_CHNK),) - $(RM) $(FILES_CHNK) -endif -ifneq ($(FILES_MAN),) - $(RM) $(FILES_MAN) -endif -ifneq ($(FILES_MANT),) - $(RM) $(FILES_MANT) -endif -ifneq ($(FILES_MANP),) - $(RM) $(FILES_MANP) -endif -ifneq ($(FILES_INFO),) - $(RM) $(FILES_INFO) -endif -ifneq ($(DIRS_CHUNK),) - for dir in $(DIRS_CHUNK); do \ - if [ -d "$$dir" ]; then \ - $(RMDIR) $(RMDIR_FLAGS) $$dir; \ - fi \ - done -endif -ifneq ($(DIRS_MAN),) -ifneq ($(DIRS_MAN),.) - for dir in $(DIRS_MAN); do \ - if [ -d "$$dir" ]; then \ - $(RMDIR) $(RMDIR_FLAGS) $$dir; \ - fi \ - done -endif -endif -ifneq ($(LISTS_MAN),) - $(RM) $(LISTS_MAN) -endif -ifneq ($(LISTS_HTML),) - $(RM) $(LISTS_HTML) -endif Copied: amavisadmin/branches/alpha2/docs/Makefile (from rev 36, amavisadmin/trunk/docs/Makefile) =================================================================== --- amavisadmin/branches/alpha2/docs/Makefile (rev 0) +++ amavisadmin/branches/alpha2/docs/Makefile 2007-01-21 14:48:38 UTC (rev 37) @@ -0,0 +1,641 @@ +# $Source$ +# $Author: xmldoc $ +# $Date: 2006-09-01 15:47:16 +0900 (Fri, 01 Sep 2006) $ +# $Revision: 6235 $ +# vim: number +# +# ----------------------------------------------------------------- +# ** Makefile.DocBook -- generate output from DocBook sources ** +# ----------------------------------------------------------------- +# +# This file is part of the DocBook Project XSL Stylesheet +# distribution. +# +# See http://docbook.sourceforge.net/release/xsl/current/ +# for copyright and other information. +# DOCBOOK_OUTPUT_FORMATS is the default set of targets (output +# formats) that get built when you type "make" without any targets +# explicitly specified. To generate a different set of output +# formats, change the value of DOCBOOK_OUTPUT_FORMATS here or set +# it in your environment; for example: +# +# set DOCBOOK_OUTPUT_FORMATS="html pdf"; export DOCBOOK_OUTPUT_FORMATS +# +# Of course by explicitly specifying particular targets when you +# invoke "make", you can always override generation of the default +# set of targets; for example: +# +# make html txt +# +# That would generate just HTML (unchunked) and plain-text output. +# +DOCBOOK_OUTPUT_FORMATS ?= man chunk txt pdf + +# If you want XHTML output instead of HTML, set HTML_OR_XHTML to +# 'xhtml' or just specify 'xhtml" in DOCBOOK_OUTPUT_FORMATS. +ifeq ($(findstring xhtml,$(DOCBOOK_OUTPUT_FORMATS)),) +HTML_OR_XHTML ?= html +else +HTML_OR_XHTML ?= xhtml +endif + +# ----------------------------------------------------------------- +# *** TOOLS and other DEPENDENCIES *** +# ----------------------------------------------------------------- +# we use rmdir(1) to remove dirs we create for chunked HTML output +RMDIR = rmdir +# "-p" causes empty parent dirs to be deleted as well +RMDIR_FLAGS = --ignore-fail-on-non-empty -p + +# possible values for PDF_MAKER are: +# dblatex|fop|fop1|xep|xmlroff|passivetex +PDF_MAKER = fop1 + +# possible values for TXT_MAKER are: +# links|lynx|w3m|w3mmee +TXT_MAKER = w3m +TXT_MAKER_FLAGS = -dump + +# xsl +XSLT = xsltproc +XSLT_FLAGS = --xinclude + +# http://dblatex.sourceforge.net/ +DBLATEX = dblatex +DBLATEX_FLAGS = -b pdftex + +FOP = fop +FOP_FLAGS = + +XEP = xep +XEP_FLAGS = + +# http://xmlroff.sourceforge.net/ +XMLROFF = xmlroff +XMLROFF_FLAGS = + +PDFTEX = pdftex +PDFTEX_FLAGS = + +# used by PassiveTeX +PDFXMLTEX = pdfxmltex + +# http://docbook2x.sourceforge.net/ +DB2X_XSLTPROC = db2x_xsltproc +DB2X_XSLTPROC_FLAGS = +DB2X_TEXIXML = db2x_texixml +DB2X_TEXIXML_FLAGS = + +# we call the man(1) command to generate "foo.N.pdf" and +# "foo.N.txt" output (see "man-pdf" & "man-txt" targets) +MAN = man +MAN_FLAGS = + +# The "ps2pdf" command is part of GhostSript (gs) distro. +# It is just a wrapper script around gs that does this: +# +# gs -dCompatibilityLevel=1.2 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ +# "-sOutputFile=$outfile" -dCompatibilityLevel=1.2 -c .setpdfwrite -f "$infile" +# +# Where, for example: $outfile = foo.pdf and $infile = foo.1 +PS2PDF = ps2pdf +PS2PDF_FLAGS = + +# The "col" command is needed for stripping backspaces and +# underscores from man(1) output to get pure plain-text +COL = col +COL_FLAGS = + +# The "expand" command is needed for expanding tabs from files +# generated from "man foo.1 | col -b" output +# output to get pure plain-text +EXPAND = expand +EXPAND_FLAGS = + +# value of DOCBOOK_XSL should either be the canonical +# (docbook.sourceforge.net) URL for the DocBook Project XSL +# stylesheets OR it can be a local system path +DOCBOOK_XSL = docbook-xsl-1.71.1 + +# ----------------------------------------------------------------- +# names of some DIRECTORIES and FILES we need +# ----------------------------------------------------------------- +# We create a tmp directory once per make invocation; it's needed +# for holding a temporary copy of the custom DBLaTeX stylesheet +# (because dblatex currently can't read a stylesheet from stdin) +TMP ?= /tmp +TMPNUM := $(shell echo $$$$) +DOCBOOK_TMP := $(TMP)/docbook-make-$(TMPNUM) + +# MAN_MANIFEST_EXT is file extension added to individual manifest +# files +MAN_MANIFEST_EXT = manifest_man + +# HTML_MANIFEST_EXT is file extension added to HTML manifest files +HTML_MANIFEST_EXT = manifest_html + +# BASEDIR_SUFFIX is a what you need to set if you want a suffix +# added to the end of each "base.dir" we create while generating +# chunked HTML output +#BASEDIR_SUFFIX = -html +#BASEDIR_SUFFIX = _html +BASEDIR_SUFFIX = + +# ----------------------------------------------------------------- +# assorted OPTIONS +# ----------------------------------------------------------------- +# HTML_STYLESHEET -> $html.stylesheet stylesheet param +# http://docbook.sourceforge.net/snapshots/xsl/doc/html/html.stylesheet.html +HTML_STYLESHEET = style.css +# HTML_IMAGES -> $admon.graphics.path +# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.path.html +HTML_IMAGES = images/ +# HTML_IMAGES_EXT -> $admon.graphics.extension +# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.extension.html +HTML_IMAGES_EXT = .png + +# use these to set params on the command-line +# format is, e.g., HTML_PARAMS="--stringparam variablelist.as.table 1..." +FO_PARAMS = +HTML_PARAMS = +MAN_PARAMS = + +# DBX_PARAMS is for dblatex(1); format uses "-p": +# DBX_PARAMS="-p doc.publisher.show 1 -p term.breakline 1... +DBX_PARAMS= + +# What file extension do you use for DocBook source files? +DOCBOOK_FILE_EXTENSION = .xml + +# ----------------------------------------------------------------- +# make(1) functions for building file lists +# ----------------------------------------------------------------- +# +# the values of the following are used for determing what needs +# to be built and/or cleaned up + +SOURCE_FILES_DBK = $(wildcard *$(DOCBOOK_FILE_EXTENSION)) + +FILES_FO = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).fo) +FILES_TXT = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).txt) +FILES_PDF = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).pdf) +FILES_LOG = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).log) +FILES_OUT = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).out) +FILES_AUX = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).aux) +FILES_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).html) +FILES_INFO = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).info) +DIRS_CHUNK = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base)$(BASEDIR_SUFFIX)) +LISTS_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(HTML_MANIFEST_EXT)) +LISTS_MAN = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(MAN_MANIFEST_EXT)) +FILES_CHNK = $(shell for manifest in $(LISTS_HTML); do if [ -f "$$manifest" ]; then cat $$manifest; fi done) +FILES_MAN = $(shell for manifest in $(LISTS_MAN); do if [ -f "$$manifest" ]; then cat $$manifest; fi done) +FILES_MANP = $(foreach base,$(FILES_MAN),$(base).pdf) +FILES_MANT = $(foreach base,$(FILES_MAN),$(base).txt) +DIRS_MAN = $(shell for file in $(FILES_MAN); do dirname $$file; done | uniq) + +# ----------------------------------------------------------------- +# ** stylesheet for testing whether a file has a refentry +# ----------------------------------------------------------------- +REFENTRY_CHECK := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ + version="1.0" \ + xmlns:db="http://docbook.org/ns/docbook" \ + > \ + <xsl:output method="text"/> \ + <xsl:template match="/"> \ + <xsl:if test="//refentry|//db:refentry"> \ + <xsl:text>true</xsl:text> \ + </xsl:if> \ + </xsl:template> \ +</xsl:stylesheet> + +# ----------------------------------------------------------------- +# ** Stylesheet Customization Layers ** +# ----------------------------------------------------------------- +# +# for DBLaTeX +DBX_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ + version="1.0"> \ + <xsl:param name="co.linkends.show">0</xsl:param> \ + <xsl:param name="callout.markup.circled">1</xsl:param> \ + <xsl:param name="callout.linkends.hot">0</xsl:param> \ + <xsl:param name="doc.publisher.show">1</xsl:param> \ + <xsl:param name="term.breakline">1</xsl:param> \ + <xsl:param name="doc.alignment">left</xsl:param> \ + <xsl:param name="newtbl.use">1</xsl:param> \ + <xsl:param name="latex.hyperparam"/> \ + <xsl:param name="latex.style">docbook</xsl:param> \ + <xsl:param name="latex.biblio.output">all</xsl:param> \ + <xsl:param name="latex.bibfiles">""</xsl:param> \ + <xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \ + <xsl:param name="latex.output.revhistory">0</xsl:param> \ + <xsl:param name="latex.figure.position">[htbp]</xsl:param> \ + <xsl:param name="latex.figure.boxed">0</xsl:param> \ + <xsl:param name="latex.babel.use">1</xsl:param> \ + <xsl:param name="latex.babel.language"></xsl:param> \ + <xsl:param name="latex.class.options">twoside</xsl:param> \ + <xsl:param name="biblioentry.item.separator">, </xsl:param> \ + <xsl:param name="refentry.xref.manvolnum">1</xsl:param> \ + <xsl:param name="refsynopsis.title">Synopsis</xsl:param> \ + <xsl:param name="refnamediv.title"></xsl:param> \ + <xsl:param name="funcsynopsis.style">ansi</xsl:param> \ + <xsl:param name="funcsynopsis.decoration">1</xsl:param> \ + <xsl:param name="function.parens">0</xsl:param> \ + <xsl:param name="classsynopsis.default.language">java</xsl:param> \ + <xsl:param name="show.comments">0</xsl:param> \ +</xsl:stylesheet> + +# for FO output +FO_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ + xmlns:fo="http://www.w3.org/1999/XSL/Format" \ + version="1.0"> \ + <xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \ + <xsl:include href="cust/titlepage.templates.xsl"/> \ + <xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \ + <xsl:param name="paper.type">A4</xsl:param> \ + <xsl:param name="draft.watermark.image"></xsl:param> \ + <xsl:param name="hyphenation">false</xsl:param> \ + <xsl:param name="hyphenate.verbatim">0</xsl:param> \ + <xsl:param name="alignment">left</xsl:param> \ + <xsl:param name="refentry.generate.name">1</xsl:param> \ + <xsl:param name="refentry.generate.title">0</xsl:param> \ + <xsl:param name="refentry.pagebreak">1</xsl:param> \ + <xsl:param name="shade.verbatim">1</xsl:param> \ + <xsl:param name="variablelist.as.blocks">1</xsl:param> \ + <xsl:param name="ulink.show">1</xsl:param> \ + <xsl:param name="ulink.footnotes">1</xsl:param> \ + <xsl:param name="index.on.type">1</xsl:param> \ + <xsl:attribute-set name="xref.properties"> \ + <xsl:attribute name="color">blue</xsl:attribute> \ + </xsl:attribute-set> \ + <xsl:attribute-set name="shade.verbatim.style"> \ + <xsl:attribute name="background-color">\#E0E0E0</xsl:attribute> \ + <xsl:attribute name="padding-left">4pt</xsl:attribute> \ + <xsl:attribute name="padding-right">4pt</xsl:attribute> \ + <xsl:attribute name="padding-top">4pt</xsl:attribute> \ + <xsl:attribute name="padding-bottom">4pt</xsl:attribute> \ + </xsl:attribute-set> \ + <xsl:param name="section.autolabel">1</xsl:param> \ + <xsl:attribute-set name="section.title.level1.properties"> \ + <xsl:attribute name="font-size"> \ + <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \ + <xsl:text>pt</xsl:text> \ + </xsl:attribute> \ + </xsl:attribute-set> \ + <xsl:attribute-set name="section.title.level2.properties"> \ + <xsl:attribute name="font-size"> \ + <xsl:value-of select="$$body.font.master * 1.3"></xsl:value-of> \ + <xsl:text>pt</xsl:text> \ + </xsl:attribute> \ + </xsl:attribute-set> \ + <xsl:attribute-set name="section.title.level3.properties"> \ + <xsl:attribute name="font-size"> \ + <xsl:value-of select="$$body.font.master * 1.1"></xsl:value-of> \ + <xsl:text>pt</xsl:text> \ + </xsl:attribute> \ + </xsl:attribute-set> \ + <xsl:attribute-set name="section.title.level4.properties"> \ + <xsl:attribute name="font-size"> \ + <xsl:value-of select="$$body.font.master"></xsl:value-of> \ + <xsl:text>pt</xsl:text> \ + </xsl:attribute> \ + </xsl:attribute-set> \ + <xsl:attribute-set name="component.title.properties"> \ + <xsl:attribute name="font-size"> \ + <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \ + <xsl:text>pt</xsl:text> \ + </xsl:attribute> \ + </xsl:attribute-set> \ + <xsl:attribute-set name="monospace.verbatim.properties"> \ + <xsl:attribute name="wrap-option">wrap</xsl:attribute> \ + <xsl:attribute name="hyphenation-character">\</xsl:attribute> \ + <xsl:attribute name="font-size"> \ + <xsl:value-of select="$$body.font.master * 0.8"></xsl:value-of> \ + <xsl:text>pt</xsl:text> \ + </xsl:attribute> \ + </xsl:attribute-set> \ +</xsl:stylesheet> + +# for single-file (X)HTML outpout +HTML_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ + version="1.0"> \ + <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/docbook.xsl"/> \ + <xsl:param name="gentext.custom">local.l10n.xml</xsl:param> \ + <xsl:param name="local.l10n.xml" select="document($$gentext.custom)"/> \ + <xsl:param name="refentry.generate.name">1</xsl:param> \ + <xsl:param name="refentry.generate.title">0</xsl:param> \ + <xsl:param name="root.filename"></xsl:param> \ + <xsl:param name="variablelist.as.table">0</xsl:param> \ + <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \ + <xsl:param name="admon.graphics">0</xsl:param> \ + <xsl:param name="index.on.type">1</xsl:param> \ +</xsl:stylesheet> + +# for chunked (X)HTML output +CHNK_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ + version="1.0"> \ + <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/chunk.xsl"/> \ + <xsl:param name="refentry.generate.name">0</xsl:param> \ + <xsl:param name="refentry.generate.title">1</xsl:param> \ + <xsl:param name="variablelist.as.table">0</xsl:param> \ + <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \ + <xsl:param name="admon.graphics">1</xsl:param> \ + <xsl:param name="admon.graphics.path">$(HTML_IMAGES)</xsl:param> \ + <xsl:param name="admon.graphics.extension">$(HTML_IMAGES_EXT)</xsl:param> \ + <xsl:param name="root.filename"></xsl:param> \ + <xsl:param name="generate.manifest">1</xsl:param> \ + <xsl:param name="use.id.as.filename">1</xsl:param> \ + <xsl:param name="chunker.output.indent">yes</xsl:param> \ + <xsl:param name="index.on.type">1</xsl:param> \ +</xsl:stylesheet> + +# for man-page output +MAN_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ + version="1.0"> \ + <xsl:import href="$(DOCBOOK_XSL)/manpages/docbook.xsl"/> \ + <xsl:param name="man.output.manifest.enabled" select="1"/> \ + <xsl:param name="man.output.in.separate.dir" select="1"/> \ + <xsl:param name="man.output.base.dir">man/</xsl:param> \ + <xsl:param name="man.output.subdirs.enabled" select="1"/> \ +</xsl:stylesheet> + +# ----------------------------------------------------------------- +# ** TARGETS START HERE ** +# ----------------------------------------------------------------- +# prevents make from deleting, e.g. foo.1, after making foo.1.pdf +# and foo.1.txt from it. +.PRECIOUS: %.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9 + +docbook: $(DOCBOOK_OUTPUT_FORMATS) + +man: $(LISTS_MAN) + +# we can generate PDFs from man pages +man-pdf: man + $(MAKE) $(FILES_MANP) + +# we can generate plain text from man pages +man-txt: man + $(MAKE) $(FILES_MANT) + +html: $(FILES_HTML) + +chunk: $(LISTS_HTML) + +txt: $(FILES_TXT) + +pdf: cust/titlepage.templates.xsl $(FILES_PDF) + +info: $(FILES_INFO) + +cust/titlepage.templates.xsl: cust/titlepage.templates.xml + xsltproc -output cust/titlepage.templates.xsl \ + $(DOCBOOK_XSL)/template/titlepage.xsl cust/titlepage.templates.xml + +# use the "debug" target to echo variables, etc., to +# test/troubleshoot changes you make to this makefile +debug: + @echo $(DIRS_MAN) + +# ----------------------------------------------------------------- +# pattern rule for making (X)HTML and plain-text output +# ----------------------------------------------------------------- +%.html: %$(DOCBOOK_FILE_EXTENSION) + @echo '$(HTML_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) - $< > $@ + +%.txt: %.html + $(TXT_MAKER) $(TXT_MAKER_FLAGS) ./$< \ + | sed "s/^\(\s\+[0-9]\+\. \)file:\/\/.\+$$/\\1(local)/g" \ + | egrep -v '^ file:///.+$$' \ + > $@ +# if DOCBOOK_OUTPUT_FORMATS does not contain "html", then we need +# to remove the "intermediate" HTML files we used for generating +# plain-text output +ifeq ($(findstring html,$(DOCBOOK_OUTPUT_FORMATS)),) + $(RM) $< +endif + +# ----------------------------------------------------------------- +# pattern rule for making chunked (X)HTML pages +# ----------------------------------------------------------------- +%.$(HTML_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION) + @echo '$(CHNK_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) \ + --stringparam manifest $@ \ + --stringparam base.dir $(basename $@)$(BASEDIR_SUFFIX)/ \ + - $< + +# ----------------------------------------------------------------- +# pattern rules for making FO and PDF stuff +# ----------------------------------------------------------------- +%.fo: %$(DOCBOOK_FILE_EXTENSION) + @echo '$(FO_CUSTOM)' \ + | $(XSLT) $(XSLT_FLAGS) $(FO_PARAMS) - $< > $@ + +ifeq ($(PDF_MAKER),dblatex) +%.pdf: %$(DOCBOOK_FILE_EXTENSION) + mkdir -p $(DOCBOOK_TMP) + echo '$(DBX_CUSTOM)' > $(DOCBOOK_TMP)/dblatex.xsl + -$(DBLATEX) $(DBLATEX_FLAGS)\ + -p $(DOCBOOK_TMP)/dblatex.xsl \ + -o $@ \ + $< + $(RM) -r $(DOCBOOK_TMP) +endif + +%.pdf: %.fo +ifeq ($(PDF_MAKER),) + $(error No PDF_MAKER specified. Cannot make pdf) +else +ifeq ($(PDF_MAKER),xep) + $(XEP) $(XEP_FLAGS) $< $@ +else +ifeq ($(PDF_MAKER),fop) + $(FOP) $(FOP_FLAGS) $< $@ +else +ifeq ($(PDF_MAKER),fop1) + $(FOP) $(FOP_FLAGS) $< $@ +else +ifeq ($(PDF_MAKER),xmlroff) + $(XMLROFF) $(XMLROFF_FLAGS) $< -o $@ +else +ifeq ($(PDF_MAKER),passivetex) + $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< + @if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \ + $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \ + fi + @if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \ + $(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \ + fi + $(RM) $(basename $@).log + $(RM) $(basename $@).aux + $(RM) $(basename $@).out +else + $(error I do not know how to make a PDF using "$(PDF_MAKER)") +endif +endif +endif +endif +endif +endif + +# ----------------------------------------------------------------- +# pattern rules for making TeXinfo stuff +# ----------------------------------------------------------------- +%.txml: %$(DOCBOOK_FILE_EXTENSION) + $(DB2X_XSLTPROC) $(DB2X_XSLTPROC_FLAGS) -s texi -o $@ $< + +%.texi: %.txml + $(DB2X_TEXIXML) $(DB2X_TEXIXML_FLAGS) $< + +# the following is actually a built-in rule, but it's redefined +# here just for the sake of clarity +%.info: %.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@ + +# ----------------------------------------------------------------- +# pattern rule for making man pages +# ----------------------------------------------------------------- +%.$(MAN_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION) + @if [ "$(strip $(shell echo '$(REFENTRY_CHECK)' | $(XSLT) $(XSLT_FLAGS) - $<))" != "true" ]; then \ + touch $@; \ + else \ + echo '$(MAN_CUSTOM)' \ + | $(XSLT) $(XSLT_FLAGS) $(MAN_PARAMS) \ + --stringparam man.output.manifest.filename $@ \ + - $<; \ + fi + +# ----------------------------------------------------------------- +# pattern rule for enabling direct "make foo.1" to work +# ----------------------------------------------------------------- + +%.1 %.2 %.3 %.4 %.5 %.6 %.7: %.xml + $(MAKE) $(basename $<).$(MAN_MANIFEST_EXT) + +# ----------------------------------------------------------------- +# pattern rules for making Postscript/PDF output from man pages +# ----------------------------------------------------------------- +%.1.ps: %.1 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.2.ps: %.2 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.3.ps: %.3 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.4.ps: %.4 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.5.ps: %.5 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.6.ps: %.6 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.7.ps: %.7 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.8.ps: %.8 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +%.9.ps: %.9 + $(MAN) -l $(MAN_FLAGS) -Tps $< > $@ + +# ----------------------------------------------------------------- +# pattern rule for converting Postscript to PDF +# ----------------------------------------------------------------- +%.pdf: %.ps + $(PS2PDF) $(PS2PDF_FLAGS) $< + +# ----------------------------------------------------------------- +# pattern rules for making plain-text output from man pages +# ----------------------------------------------------------------- +%.1.txt: %.1 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.2.txt: %.2 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.3.txt: %.3 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.4.txt: %.4 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.5.txt: %.5 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.6.txt: %.6 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.7.txt: %.7 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.8.txt: %.8 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +%.9.txt: %.9 + $(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@ + +# ----------------------------------------------------------------- +# target(s) for cleaning up the mess +# ----------------------------------------------------------------- +clean: +ifneq ($(FILES_TXT),) + $(RM) $(FILES_TXT) +endif +ifneq ($(FILES_PDF),) + $(RM) $(FILES_PDF) +endif +ifneq ($(FILES_FO),) + $(RM) $(FILES_FO) +endif +ifneq ($(FILES_LOG),) + $(RM) $(FILES_LOG) +endif +ifneq ($(FILES_OUT),) + $(RM) $(FILES_OUT) +endif +ifneq ($(FILES_AUX),) + $(RM) $(FILES_AUX) +endif +ifneq ($(FILES_HTML),) + $(RM) $(FILES_HTML) +endif +ifneq ($(FILES_CHNK),) + $(RM) $(FILES_CHNK) +endif +ifneq ($(FILES_MAN),) + $(RM) $(FILES_MAN) +endif +ifneq ($(FILES_MANT),) + $(RM) $(FILES_MANT) +endif +ifneq ($(FILES_MANP),) + $(RM) $(FILES_MANP) +endif +ifneq ($(FILES_INFO),) + $(RM) $(FILES_INFO) +endif +ifneq ($(DIRS_CHUNK),) + for dir in $(DIRS_CHUNK); do \ + if [ -d "$$dir" ]; then \ + $(RMDIR) $(RMDIR_FLAGS) $$dir; \ + fi \ + done +endif +ifneq ($(DIRS_MAN),) +ifneq ($(DIRS_MAN),.) + for dir in $(DIRS_MAN); do \ + if [ -d "$$dir" ]; then \ + $(RMDIR) $(RMDIR_FLAGS) $$dir; \ + fi \ + done +endif +endif +ifneq ($(LISTS_MAN),) + $(RM) $(LISTS_MAN) +endif +ifneq ($(LISTS_HTML),) + $(RM) $(LISTS_HTML) +endif Deleted: amavisadmin/branches/alpha2/docs/cust/titlepage.templates.xml =================================================================== --- amavisadmin/trunk/docs/cust/titlepage.templates.xml 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/branches/alpha2/docs/cust/titlepage.templates.xml 2007-01-21 14:48:38 UTC (rev 37) @@ -1,1312 +0,0 @@ -<!DOCTYPE t:templates [ -<!ENTITY hsize0 "10pt"> -<!ENTITY hsize1 "12pt"> -<!ENTITY hsize2 "14.4pt"> -<!ENTITY hsize3 "17.28pt"> -<!ENTITY hsize4 "20.736pt"> -<!ENTITY hsize5 "24.8832pt"> -<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 --> -<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 --> -<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 --> -<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 --> -<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 --> -<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 --> -]> -<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0" - xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param" - xmlns:fo="http://www.w3.org/1999/XSL/Format" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - -<!-- ******************************************************************** - $Id: titlepage.templates.xml 5947 2006-05-07 07:20:39Z bobstayton $ - ******************************************************************** - - This file is part of the DocBook XSL Stylesheet distribution. - See ../README or http://docbook.sf.net/ for copyright - and other information. - - ******************************************************************** --> - -<!-- ==================================================================== --> - -<t:titlepage t:element="article" t:wrapper="fo:block" - font-family="{$title.fontset}"> - - <t:titlepage-content t:side="recto" - start-indent="0pt" - text-align="center"> - - <title t:named-template="component.title" - param:node="ancestor-or-self::article[1]" - keep-with-next.within-column="always" - font-size="&hsize5;" - font-weight="bold"/> - - <subtitle/> - - <corpauthor space-before="0.5em" - font-size="&hsize2;"/> - <authorgroup space-before="0.5em" - font-size="&hsize2;"/> - <author space-before="0.5em" - font-size="&hsize2;"/> - - <othercredit space-before="0.5em"/> - <releaseinfo space-before="0.5em"/> - <copyright space-before="0.5em"/> - <legalnotice text-align="start" - margin-left="0.5in" - margin-right="0.5in" - font-family="{$body.fontset}"/> - <pubdate space-before="0.5em"/> - <revision space-before="0.5em"/> - <revhistory space-before="0.5em"/> - <abstract space-before="0.5em" - text-align="start" - margin-left="0.5in" - margin-right="0.5in" - font-family="{$body.fontset}"/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <fo:block break-after="page"/> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="set" t:wrapper="fo:block"> - <t:titlepage-content t:side="recto"> - <title - t:named-template="division.title" - param:node="ancestor-or-self::set[1]" - text-align="center" - font-size="&hsize5;" - space-before="&hsize5space;" - font-weight="bold" - font-family="{$title.fontset}"/> - <subtitle - font-family="{$title.fontset}" - text-align="center"/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - - <t:titlepage t:element="book" t:wrapper="fo:block"> - <t:titlepage-content t:side="recto"> - <title - t:named-template="division.title" - param:node="ancestor-or-self::book[1]" - text-align="center" - font-size="&hsize5;" - space-before="&hsize5space;" - font-weight="bold" - font-family="{$title.fontset}"/> - <subtitle - text-align="center" - font-size="&hsize4;" - space-before="&hsize4space;" - font-family="{$title.fontset}"/> - <corpauthor font-size="&hsize3;" - keep-with-next.within-column="always" - space-before="2in"/> - <authorgroup space-before="2in"/> - <author font-size="&hsize3;" - space-before="&hsize2space;" - keep-with-next.within-column="always"/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - <title - t:named-template="book.verso.title" - font-size="&hsize2;" - font-weight="bold" - font-family="{$title.fontset}"/> - <corpauthor/> - <authorgroup t:named-template="verso.authorgroup"/> - <author/> - <othercredit/> - <releaseinfo space-before="0.5em"/> - <pubdate space-before="1em"/> - <copyright/> - <abstract/> - <legalnotice font-size="8pt"/> - </t:titlepage-content> - - <t:titlepage-separator> - <fo:block break-after="page"/> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - <fo:block break-after="page"/> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="part" t:wrapper="fo:block"> - <t:titlepage-content t:side="recto"> - <title - t:named-template="division.title" - param:node="ancestor-or-self::part[1]" - text-align="center" - font-size="&hsize5;" - space-before="&hsize5space;" - font-weight="bold" - font-family="{$title.fontset}"/> - <subtitle - text-align="center" - font-size="&hsize4;" - space-before="&hsize4space;" - font-weight='bold' - font-style='italic' - font-family="{$title.fontset}"/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="partintro" t:wrapper="fo:block"> - <t:titlepage-content t:side="recto"> - <title - text-align="center" - font-size="&hsize5;" - font-weight="bold" - space-before="1em" - font-family="{$title.fontset}"/> - <subtitle - text-align="center" - font-size="&hsize2;" - font-weight="bold" - font-style="italic" - font-family="{$title.fontset}"/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="reference" t:wrapper="fo:block"> - <t:titlepage-content t:side="recto"> - <title - t:named-template="division.title" - param:node="ancestor-or-self::reference[1]" - text-align="center" - font-size="&hsize5;" - space-before="&hsize5space;" - font-weight="bold" - font-family="{$title.fontset}"/> - <subtitle - font-family="{$title.fontset}" - text-align="center"/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block"> - <t:titlepage-content t:side="recto"> - <title - font-family="{$title.fontset}"/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="refsection" t:wrapper="fo:block"> - <t:titlepage-content t:side="recto"> - <title - font-family="{$title.fontset}"/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="refsect1" t:wrapper="fo:block"> - <t:titlepage-content t:side... [truncated message content] |
From: <str...@us...> - 2007-01-21 14:45:24
|
Revision: 36 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=36&view=rev Author: streindl Date: 2007-01-21 06:45:25 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Fixes for several small issues and * 1640418 * 1636552 Modified Paths: -------------- amavisadmin/trunk/docs/Makefile amavisadmin/trunk/docs/cust/titlepage.templates.xml amavisadmin/trunk/docs/installationguide.xml amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ApproveRequests.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditJobs.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditSingleJob.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/MyRequests.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/SessionBean1.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/RetentionCleanupJob.java amavisadmin/trunk/src/java/hibernate.cfg.xml amavisadmin/trunk/src/java/log4j.properties amavisadmin/trunk/web/EditSingleJob.jsp Added Paths: ----------- amavisadmin/trunk/docs/images amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/ReleaseMailJob.java amavisadmin/trunk/src/java/de/sreindl/amavisadmin/templates/ReleaseError.vm amavisadmin/trunk/src/java/de/sreindl/amavisadmin/templates/ReleaseSuccess.vm Modified: amavisadmin/trunk/docs/Makefile =================================================================== --- amavisadmin/trunk/docs/Makefile 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/docs/Makefile 2007-01-21 14:45:25 UTC (rev 36) @@ -254,7 +254,7 @@ <xsl:param name="paper.type">A4</xsl:param> \ <xsl:param name="draft.watermark.image"></xsl:param> \ <xsl:param name="hyphenation">false</xsl:param> \ - <xsl:param name="hyphenate.verbatim">1</xsl:param> \ + <xsl:param name="hyphenate.verbatim">0</xsl:param> \ <xsl:param name="alignment">left</xsl:param> \ <xsl:param name="refentry.generate.name">1</xsl:param> \ <xsl:param name="refentry.generate.title">0</xsl:param> \ @@ -365,7 +365,7 @@ # and foo.1.txt from it. .PRECIOUS: %.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9 -docbook: cust/titlepage.templates.xsl $(DOCBOOK_OUTPUT_FORMATS) +docbook: $(DOCBOOK_OUTPUT_FORMATS) man: $(LISTS_MAN) @@ -383,7 +383,7 @@ txt: $(FILES_TXT) -pdf: $(FILES_PDF) +pdf: cust/titlepage.templates.xsl $(FILES_PDF) info: $(FILES_INFO) Modified: amavisadmin/trunk/docs/cust/titlepage.templates.xml =================================================================== --- amavisadmin/trunk/docs/cust/titlepage.templates.xml 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/docs/cust/titlepage.templates.xml 2007-01-21 14:45:25 UTC (rev 36) @@ -33,17 +33,33 @@ font-family="{$title.fontset}"> <t:titlepage-content t:side="recto" - start-indent="0pt" text-align="center"> - <title t:named-template="component.title" +<!--t:named-template="component.title"--> + <title param:node="ancestor-or-self::article[1]" keep-with-next.within-column="always" + space-before="2cm" font-size="&hsize5;" font-weight="bold"/> - <subtitle/> + <subtitle + keep-with-next.within-column="always" + space-before="2cm" + font-size="&hsize3;" + font-weight="bold" + /> + <author space-before="0.5em" + font-size="&hsize2;"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + <title + t:named-template="book.verso.title" + font-size="&hsize2;" + font-weight="bold" + font-family="{$title.fontset}"/> <corpauthor space-before="0.5em" font-size="&hsize2;"/> <authorgroup space-before="0.5em" @@ -58,19 +74,10 @@ margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}"/> - <pubdate space-before="0.5em"/> <revision space-before="0.5em"/> <revhistory space-before="0.5em"/> - <abstract space-before="0.5em" - text-align="start" - margin-left="0.5in" - margin-right="0.5in" - font-family="{$body.fontset}"/> </t:titlepage-content> - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - <t:titlepage-separator> <fo:block break-after="page"/> </t:titlepage-separator> @@ -79,6 +86,7 @@ </t:titlepage-before> <t:titlepage-before t:side="verso"> + <fo:block break-after="page"/> </t:titlepage-before> </t:titlepage> Added: amavisadmin/trunk/docs/images =================================================================== --- amavisadmin/trunk/docs/images (rev 0) +++ amavisadmin/trunk/docs/images 2007-01-21 14:45:25 UTC (rev 36) @@ -0,0 +1 @@ +link docbook-xsl-1.71.1/images/ \ No newline at end of file Property changes on: amavisadmin/trunk/docs/images ___________________________________________________________________ Name: svn:special + * Modified: amavisadmin/trunk/docs/installationguide.xml =================================================================== --- amavisadmin/trunk/docs/installationguide.xml 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/docs/installationguide.xml 2007-01-21 14:45:25 UTC (rev 36) @@ -6,14 +6,19 @@ ]> <article> <articleinfo> - <title>&aa;</title> + <title>AmavisAdmin</title> + <subtitle>Installation Guide</subtitle> <author> - <firstname>Stephen</firstname> <surname>Reindl</surname> + <firstname>Stephen</firstname> + + <surname>Reindl</surname> + <address><street>Langster Str. 28</street> <postcode>40668</postcode> <city>Meerbusch</city> -<country>Germany></country></address> +<country>Germany></country></address> + <email>sr...@sr...</email> </author> @@ -21,7 +26,9 @@ <copyright> <year>2006</year> + <year>2007</year> + <holder>Stephen Reindl</holder> </copyright> @@ -30,7 +37,8 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at</para> - <para><ulink url="http://www.apache.org/licenses/LICENSE-2.0"/></para> + <para><ulink + url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink></para> <para>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" @@ -38,161 +46,177 @@ implied. See the License for the specific language governing permissions and limitations under the License.</para> </legalnotice> + + <revhistory> + <revision><revnumber>0.1</revnumber><date>2007-01-20</date><authorinitials>sr</authorinitials><revdescription><para>Initial document</para></revdescription></revision> + </revhistory> </articleinfo> <section id="preface"> <title>Preface</title> - <para> - This document describes how to install and use the &aa; tool. In addition - the document describes which tools are necessary to build an developement - platform that is suitable to develop and maintain &aa;. - </para> + <para>This document describes how to install and use the AmavisAdmin tool. + In addition the document describes which tools are necessary to build an + developement platform that is suitable to develop and maintain + AmavisAdmin.</para> - <para> - As &aa; is heavily based on Java and other open platform tools, building - a working production or development environment can be done without - creating any costs (except maybe for hardware, please see below ...). - </para> + <para>As AmavisAdmin is heavily based on Java and other open platform + tools, building a working production or development environment can be + done without creating any costs (except maybe for hardware, please see + below ...).</para> </section> <section id="sec-system-requirements"> <title>System Requirements</title> - <para> - The following requirements have to be met to run &aa; on a Computer: - </para> + <para>The following requirements have to be met to run AmavisAdmin on a + Computer:</para> <itemizedlist> <listitem> - <para> - Java runtime Version 1.5.0 (Tested with 1.5.0-10) from Sun (<ulink - url="http://java.sun.com"></ulink>) - </para> + <para>Java runtime Version 1.5.0 (Tested with 1.5.0-10) from Sun + (<ulink url="http://java.sun.com">http://java.sun.com</ulink>)</para> </listitem> <listitem> - <para> - An java application server. The software has been tested with Apache - Tomcat release <ulink url="http://tomcat.apache.org/">5.5.</ulink> - </para> + <para>An java application server. The software has been tested with + Apache Tomcat release <ulink + url="http://tomcat.apache.org/">5.5.</ulink></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 used. - </para> - - <para> - The Amavisd-new package doesn't need to run on the same machine but - both the database Amavisd-new and a specific TCP port need to be - available to perform neccessary operations. - </para> + <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 + used.</para> + + <para>The Amavisd-new package doesn't need to run on the same machine + but both the database Amavisd-new and a specific TCP port need to be + available to perform neccessary operations.</para> </listitem> - + <listitem> - <para> - A Database server where the Amavisd-Server stores it's mails and - &aa; 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> + <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 - url="http://jdbc.postgresql.org/" />. - </para> + <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 + url="http://jdbc.postgresql.org/">http://jdbc.postgresql.org/</ulink>.</para> </listitem> </itemizedlist> </section> - + <section id="sec-downloading-and-installing"> <title>Downloading and installing the components</title> <section id="sec-download-java-sdk"> <title>Java JDK/JRE</title> - <para> - The java package can be installed usually by using standard packages - provided by you operating system vendor (e.g SuSE/OpenSuSE is - providing java packages as part of their distribution) or you can - download them as add-ons either by Sun or by other vendors (IBM, - ...). The following list gives some example of additional packages to - be installed. For further reference please contact your operating - system vendor: - </para> + <para>The java package can be installed usually by using standard + packages provided by you operating system vendor (e.g SuSE/OpenSuSE is + providing java packages as part of their distribution) or you can + download them as add-ons either by Sun or by other vendors (IBM, ...). + The following list gives some example of additional packages to be + installed. For further reference please contact your operating system + vendor:</para> <variablelist> - <varlistentry> - <term><trademark>Microsoft Windows</trademark></term> - <listitem> - <para>On Windows you might use the standard packages downloadable - from <ulink url="http://java.sun.com">Sun's java - pages</ulink>.</para> - </listitem> - </varlistentry> + <varlistentry> + <term><trademark>Microsoft Windows</trademark></term> - <varlistentry> - <term>OpenSuSE</term> - <listitem> - <para>On OpenSuSE the following package needs to be - installed:</para> - <itemizedlist> - <listitem><para>java-1_5_0-sun-1.5.0_update10-2.1</para> - </listitem> - </itemizedlist> - </listitem> - </varlistentry> + <listitem> + <para>On Windows you might use the standard packages downloadable + from <ulink url="http://java.sun.com">Sun's java + pages</ulink>.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term>OpenSuSE</term> + + <listitem> + <para>On OpenSuSE the following package needs to be + installed:</para> + + <itemizedlist> + <listitem> + <para>java-1_5_0-sun-1.5.0_update10-2.1</para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> </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>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> - Version 5.5.17 of Apache Tomcat can be downloaded for example from - </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> - <ulink url="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/"/> - </para> + <para>Version 5.5.17 of Apache Tomcat can be downloaded for example + from</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><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> - 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" /> an - intersting source of information about how to install tomcat. - </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> + <title>Amavisd-new</title> + + <para>The Amavisd-new application can be downloaded from the <ulink + 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> + + <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 +... +tar: Read 4608 bytes from -</computeroutput> +<prompt>$ </prompt><userinput>cd amavisd-new-<replaceable><version></replaceable></userinput></screen> + + <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> + + </section> </section> -</article> +</article> \ No newline at end of file Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ApproveRequests.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ApproveRequests.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/ApproveRequests.java 2007-01-21 14:45:25 UTC (rev 36) @@ -31,14 +31,23 @@ import com.sun.rave.web.ui.component.TableColumn; import com.sun.rave.web.ui.component.TableRowGroup; import de.sreindl.amavisadmin.bo.ConfigurationBO; +import de.sreindl.amavisadmin.bo.UserBO; +import de.sreindl.amavisadmin.db.MailQueueEntry; +import de.sreindl.amavisadmin.db.MailQueueEntryDAO; +import de.sreindl.amavisadmin.db.MailQueueReceipient; +import de.sreindl.amavisadmin.db.MailQueueReceipientDAO; import de.sreindl.amavisadmin.db.MessageDAO; import de.sreindl.amavisadmin.db.MsgReceipient; import de.sreindl.amavisadmin.db.MsgReceipientDAO; import de.sreindl.amavisadmin.db.MsgReceipientId; import de.sreindl.amavisadmin.db.User; +import de.sreindl.amavisadmin.db.UserDAO; import de.sreindl.amavisadmin.db.util.HibernateSessionFactory; import java.io.IOException; import java.io.StringWriter; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; import javax.faces.FacesException; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; @@ -128,173 +137,173 @@ public void setForm1(Form f) { this.form1 = f; } - + private Table table1 = new Table(); - + public Table getTable1() { return table1; } - + public void setTable1(Table t) { this.table1 = t; } - + private TableRowGroup tableRowGroup1 = new TableRowGroup(); - + public TableRowGroup getTableRowGroup1() { return tableRowGroup1; } - + public void setTableRowGroup1(TableRowGroup trg) { this.tableRowGroup1 = trg; } - + private TableColumn tableColumn1 = new TableColumn(); - + public TableColumn getTableColumn1() { return tableColumn1; } - + public void setTableColumn1(TableColumn tc) { this.tableColumn1 = tc; } - + private StaticText staticText1 = new StaticText(); - + public StaticText getStaticText1() { return staticText1; } - + public void setStaticText1(StaticText st) { this.staticText1 = st; } - + private TableColumn tableColumn2 = new TableColumn(); - + public TableColumn getTableColumn2() { return tableColumn2; } - + public void setTableColumn2(TableColumn tc) { this.tableColumn2 = tc; } - + private StaticText staticText2 = new StaticText(); - + public StaticText getStaticText2() { return staticText2; } - + public void setStaticText2(StaticText st) { this.staticText2 = st; } - + private TableColumn tableColumn3 = new TableColumn(); - + public TableColumn getTableColumn3() { return tableColumn3; } - + public void setTableColumn3(TableColumn tc) { this.tableColumn3 = tc; } - + private Hyperlink hlFrom = new Hyperlink(); - + public Hyperlink getHlFrom() { return hlFrom; } - + public void setHlFrom(Hyperlink h) { this.hlFrom = h; } - + private TableColumn tableColumn4 = new TableColumn(); - + public TableColumn getTableColumn4() { return tableColumn4; } - + public void setTableColumn4(TableColumn tc) { this.tableColumn4 = tc; } - + private Hyperlink hlSubject = new Hyperlink(); - + public Hyperlink getHlSubject() { return hlSubject; } - + public void setHlSubject(Hyperlink h) { this.hlSubject = h; } - + private TableColumn tableColumn5 = new TableColumn(); - + public TableColumn getTableColumn5() { return tableColumn5; } - + public void setTableColumn5(TableColumn tc) { this.tableColumn5 = tc; } - + private StaticText staticText3 = new StaticText(); - + public StaticText getStaticText3() { return staticText3; } - + public void setStaticText3(StaticText st) { this.staticText3 = st; } - + private TableColumn tableColumn6 = new TableColumn(); - + public TableColumn getTableColumn6() { return tableColumn6; } - + public void setTableColumn6(TableColumn tc) { this.tableColumn6 = tc; } - + private Hyperlink hlApprove = new Hyperlink(); - + public Hyperlink getHlApprove() { return hlApprove; } - + public void setHlApprove(Hyperlink h) { this.hlApprove = h; } - + private Hyperlink hlReject = new Hyperlink(); - + public Hyperlink getHlReject() { return hlReject; } - + public void setHlReject(Hyperlink h) { this.hlReject = h; } - + private Button btnBack = new Button(); - + public Button getBtnBack() { return btnBack; } - + public void setBtnBack(Button b) { this.btnBack = b; } - + private PanelGroup groupPanel1 = new PanelGroup(); - + public PanelGroup getGroupPanel1() { return groupPanel1; } - + public void setGroupPanel1(PanelGroup pg) { this.groupPanel1 = pg; } @@ -388,28 +397,28 @@ public void destroy() { HibernateSessionFactory.closeSession(); } - + /** * <p>Return a reference to the scoped data bean.</p> */ protected ApplicationBean1 getApplicationBean1() { return (ApplicationBean1)getBean("ApplicationBean1"); } - + /** * <p>Return a reference to the scoped data bean.</p> */ protected SessionBean1 getSessionBean1() { return (SessionBean1)getBean("SessionBean1"); } - + /** * <p>Return a reference to the scoped data bean.</p> */ protected RequestBean1 getRequestBean1() { return (RequestBean1)getBean("RequestBean1"); } - + /** * <p>Return the content type as a visible representation for the user</p> * <p>The following mappings are performed: @@ -446,14 +455,14 @@ return "Unknown " + content; } } - + public String hlApprove_action() { Session session = HibernateSessionFactory.getSession(); Transaction trx = null; MsgReceipient msgr = null; TableRowDataProvider trdp = (TableRowDataProvider)getBean("currentRow"); if (trdp == null) { - error ("Cannot retrieve current row?"); + error("Cannot retrieve current row?"); return null; } @@ -488,12 +497,12 @@ } return null; } - - + + public String hlFrom_action() { TableRowDataProvider trdp = (TableRowDataProvider)getBean("currentRow"); if (trdp == null) { - error ("internal error - Cannot find current row"); + error("internal error - Cannot find current row"); return null; } String mailId = (String)trdp.getValue("mail_id"); @@ -504,22 +513,22 @@ getSessionBean1().setParameter(SessionBean1.PARAM_PREV_PAGE_ID, "approveRequests"); return "showSingleMail"; } - + public String hlSubject_action() { // same code return hlFrom_action(); } - + public String hlReject_action() { Session session = HibernateSessionFactory.getSession(); Transaction trx = null; MsgReceipient msgr = null; TableRowDataProvider trdp = (TableRowDataProvider)getBean("currentRow"); if (trdp == null) { - error ("Cannot retrieve current row?"); + error("Cannot retrieve current row?"); return null; } - + String mailId = (String)trdp.getValue("mail_id"); Integer rid = (Integer)trdp.getValue("rid"); try { @@ -556,20 +565,43 @@ private void sendRejectionMail(MsgReceipient msgr) { VelocityContext context = new VelocityContext(); + UserDAO dao = new UserDAO(); + List adminUsers = dao.findByAdmin(Boolean.TRUE); + + if (adminUsers.size() == 0) { + warn("Warning: No admin users defined"); + return; + } User currentUser = getSessionBean1().getCurrentUser(); context.put("user", msgr.getRequestUser()); context.put("signature", ConfigurationBO.getConfValue(ConfigurationBO.APP_TITLE)); - context.put("baselink", ConfigurationBO.getConfValue(ConfigurationBO.CONF_BASE_URL) + "/"); + context.put("baselink", ConfigurationBO.getConfValue(ConfigurationBO.CONF_BASE_URL)); context.put("message", msgr.getMsgs()); context.put("admin", currentUser); + Session session = HibernateSessionFactory.getSession(); + Transaction trx = session.beginTransaction(); try { Template lostPwd = Velocity.getTemplate("/de/sreindl/amavisadmin/templates/RejectRelease.vm"); StringWriter w = new StringWriter(); lostPwd.merge(context, w); - InternetAddress sender = new InternetAddress(currentUser.getEmail(), currentUser.getFullname()); - InternetAddress receipient = new InternetAddress(msgr.getRequestUser().getEmail(), msgr.getRequestUser().getFullname()); - System.err.println(w.toString()); - //MailHandler.sendMail(sender, receipients, (String) context.get("subject"), w.toString()); + + MailQueueEntry mqe = new MailQueueEntry(); + MailQueueReceipient mqr = new MailQueueReceipient(); + + mqe.setEncoding("text/plain"); + mqe.setStatus(MailQueueEntryDAO.STATUS_NEW); + mqe.setFrom(UserBO.formatMailAddress(currentUser)); + mqe.setMailText(w.toString()); + mqe.setSubject((String)context.get("subject")); + mqe.setReceipients(new HashSet()); + session.save(mqe); + + mqr.setReceipient(UserBO.formatMailAddress(msgr.getRequestUser())); + mqr.setType(MailQueueReceipientDAO.TYPE_TO); + mqe.getReceipients().add(mqr); + mqr.setMailQueueEntry(mqe); + session.save(mqr); + trx.commit(); } catch (Exception ex) { log(ex.getMessage(), ex); getFacesContext().addMessage(null, @@ -577,6 +609,6 @@ ex.getMessage())); } } - + } Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditJobs.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditJobs.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditJobs.java 2007-01-21 14:45:25 UTC (rev 36) @@ -36,6 +36,8 @@ import de.sreindl.amavisadmin.jobs.BaseJob; import de.sreindl.amavisadmin.jobs.MailSendJob; import de.sreindl.amavisadmin.jobs.MessagesCleanupJob; +import de.sreindl.amavisadmin.jobs.NewMailNotifierJob; +import de.sreindl.amavisadmin.jobs.ReleaseMailJob; import de.sreindl.amavisadmin.jobs.ReminderJob; import de.sreindl.amavisadmin.jobs.RetentionCleanupJob; import java.io.IOException; @@ -440,7 +442,8 @@ return null; } String jobName = (String)trdp.getValue("job_name"); - getSessionBean1().setParameter("JOB_NAME", jobName); + getSessionBean1().setParameter(EditSingleJob.KEY_JOB_NAME, jobName); + getSessionBean1().setParameter(EditSingleJob.KEY_JOB, null); return "editJob"; } @@ -541,9 +544,16 @@ job.setJobName("New SPAM Mail Notifier"); job.setDescription("Send mails to users about new mails arrived. Please review parameters before enabling this job!"); job.setCronSettings("0 0 7 * * ?"); - job.setJobClass(AdminNotifierJob.class); + job.setJobClass(NewMailNotifierJob.class); job.setEnabled(Boolean.FALSE); session.save(job); + job = new Job(); + job.setJobName("Release Mail Daemon"); + job.setDescription("Job responsible for releasing mails approved by an admin. Please review parameters before enabling this job!"); + job.setCronSettings("0 2/15 * * * ?"); + job.setJobClass(ReleaseMailJob.class); + job.setEnabled(Boolean.FALSE); + session.save(job); trx.commit(); getSessionBean1().getJobsDataProvider().refresh(); StdSchedulerFactory factory = @@ -573,6 +583,8 @@ } public String btnAddNewEntry_action() { + getSessionBean1().setParameter(EditSingleJob.KEY_JOB_NAME, null); + getSessionBean1().setParameter(EditSingleJob.KEY_JOB, null); return "editJob"; } Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditSingleJob.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditSingleJob.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/EditSingleJob.java 2007-01-21 14:45:25 UTC (rev 36) @@ -397,6 +397,46 @@ this.groupPanel2 = pg; } + private Message message3 = new Message(); + + public Message getMessage3() { + return message3; + } + + public void setMessage3(Message m) { + this.message3 = m; + } + + private Message message4 = new Message(); + + public Message getMessage4() { + return message4; + } + + public void setMessage4(Message m) { + this.message4 = m; + } + + private Message message5 = new Message(); + + public Message getMessage5() { + return message5; + } + + public void setMessage5(Message m) { + this.message5 = m; + } + + private Message message6 = new Message(); + + public Message getMessage6() { + return message6; + } + + public void setMessage6(Message m) { + this.message6 = m; + } + // </editor-fold> /** @@ -422,7 +462,6 @@ super.init(); // Perform application initialization that must complete // *before* managed components are initialized - // TODO - add your own initialiation code here // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization"> // Initialize automatically managed components @@ -453,15 +492,34 @@ } } - String[] classes = findJobClasses(); + + Class[] classes = findJobClasses(); Option[] options = new Option[classes.length]; for (int i = 0; i < classes.length; i++) { - options[i] = new Option(classes[i]); + options[i] = new Option(classes[i].getName()); } dropDown1DefaultOptions.setOptions(options); configurationTableEntries = getSessionBean1().getConfigurationTableEntries(); + currentJob = (Job)getSessionBean1().getParameter(KEY_JOB); + if (currentJob == null) { + String jobName = (String)getSessionBean1().getParameter(KEY_JOB_NAME); + if (jobName != null) { + JobDAO dao = new JobDAO(); + currentJob = dao.findById(jobName); + if (currentJob == null) { + error("Cannot find job " + jobName); + currentJob = new Job(); + currentJob.setJobName(jobName); + } + } else { + currentJob = new Job(); + } + loadConfigData(); + getSessionBean1().setParameter(KEY_JOB, currentJob); + } + } /** @@ -472,7 +530,6 @@ * resources that will be required in your event handlers.</p> */ public void preprocess() { - String jobName = (String)getSessionBean1().getParameter("JOB_NAME"); } /** @@ -484,42 +541,7 @@ * this page.</p> */ public void prerender() { - // regular startup - String jobName = (String)getSessionBean1().getParameter("JOB_NAME"); - this.erase(); - if (jobName != null) { - JobDAO dao = new JobDAO(); - Job currentJob = dao.findById(jobName); - fldJobName.setText(currentJob.getJobName()); - fldDescription.setText(currentJob.getDescription()); - fldCRONSchedule.setText(currentJob.getCronSettings()); - dropDown1.setValue(currentJob.getJobClass().getName()); - chkEnabled.setSelected(currentJob.getEnabled()); - try { - BaseJob job = (BaseJob)currentJob.getJobClass().newInstance(); - ArrayList<ConfigurationDataEntry> entries = - job.getConfigurationDataTable(); - // add job's configuration entries to array - Iterator<ConfigurationDataEntry> iKeys = entries.iterator(); - while (iKeys.hasNext()) { - ConfigurationDataEntry entry = iKeys.next(); - if (currentJob.getConfItems().containsKey(entry.getKey())) { - ConfigurationSetting confEntry = - (ConfigurationSetting)currentJob.getConfItems().get(entry.getKey()); - entry.setValue(confEntry.getValue()); - } - } - ConfigurationDataEntry[] deArray = - entries.toArray(new ConfigurationDataEntry[entries.size()]); - configurationTableEntries.setArray(deArray); - } catch (InstantiationException ie) { - log("Error ", ie); - } catch (IllegalAccessException iae) { - log("Error ", iae); - } - } else { - configurationTableEntries.setArray(null); - } + dropDown1.setSelected(currentJob.getJobClass().getName()); } /** @@ -620,8 +642,8 @@ return url; } - private String[] findJobClasses() { - ArrayList jobs = new ArrayList(); + private Class[] findJobClasses() { + ArrayList<Class> jobs = new ArrayList<Class>(); Package[] packages = Package.getPackages(); for (int i = 0 ; i < packages.length; i++) { try { @@ -633,32 +655,21 @@ } if (sup != null) { // found - jobs.add(classes[clazz].getName()); + jobs.add(classes[clazz]); } } } catch(ClassNotFoundException cnfe) { System.err.println("Cannot find package " + packages[i].getName()); } } - String[] result = new String[jobs.size()]; - return (String[]) jobs.toArray(result); + return jobs.toArray(new Class[jobs.size()]); } public String btnSave_action() { - String jobName = (String)getSessionBean1().getParameter("JOB_NAME"); - getSessionBean1().setParameter("JOB_NAME", null); - Job currentJob = null; - if (jobName != null) { - JobDAO dao = new JobDAO(); - currentJob = dao.findById(jobName); - } else { - currentJob = new Job(); - } - currentJob.setJobName((String)fldJobName.getText()); - currentJob.setDescription((String)fldDescription.getText()); - currentJob.setCronSettings((String)fldCRONSchedule.getText()); - String className = (String)dropDown1.getValue(); + getSessionBean1().setParameter(KEY_JOB_NAME, null); + getSessionBean1().setParameter(KEY_JOB, null); + String className = (String) dropDown1.getValue(); try { Class clazz = Class.forName(className); currentJob.setJobClass(clazz); @@ -667,26 +678,18 @@ log(cnfe.getMessage(), cnfe); return null; } - currentJob.setEnabled(Boolean.valueOf(chkEnabled.isChecked())); Session session = null; Transaction trx = null; try { session = HibernateSessionFactory.getSession(); trx = session.beginTransaction(); // save job - if (currentJob.getConfItems() != null) { - currentJob.getConfItems().clear(); - } else { - currentJob.setConfItems(new HashMap()); - } if (currentJob.getVersion() == null) { session.save(currentJob); } else { session.update(currentJob); } - currentJob.setConfItems(new HashMap()); - saveConfEntries(currentJob, - (ConfigurationDataEntry[])configurationTableEntries.getArray()); + saveConfEntries(currentJob, configurationTableEntries); trx.commit(); // refresh data set getSessionBean1().getJobsDataProvider().refresh(); @@ -714,6 +717,8 @@ } public String btnCancel_action() { + getSessionBean1().setParameter(KEY_JOB_NAME, null); + getSessionBean1().setParameter(KEY_JOB, null); return "goBack"; } @@ -763,42 +768,50 @@ return null; } - private void saveConfEntries(Job currentJob, ConfigurationDataEntry[] confEntries) { + private void saveConfEntries(Job currentJob, ConfigurationDataTable confEntries) { Session session = HibernateSessionFactory.getSession(); - for (int i = 0; i < confEntries.length; i++) { + ConfigurationDataEntry[] entries = + (ConfigurationDataEntry[]) confEntries.getArray(); + for (int i = 0; i < entries.length; i++) { // #1638972 - ConfigurationDataEntry ent = confEntries[i]; + ConfigurationDataEntry ent = entries[i]; ConfigurationSettingId key = new ConfigurationSettingId(ent.getKey(), currentJob); ConfigurationSetting conf = (ConfigurationSetting)session.get(ConfigurationSetting.class, key); - if (conf == null) { - conf = new ConfigurationSetting(key, ent.getValue()); + //#1640418 + if (ent.getValue() != null) { + if (conf == null) { + conf = new ConfigurationSetting(key, ent.getValue()); + session.save(conf); + } else { + conf.setValue(ent.getValue()); + session.update(conf); + } + } else { + if (conf != null) { + // delete old entry + session.delete(conf); + } } - conf.setValue(ent.getValue()); - session.save(conf); currentJob.getConfItems().put(ent.getKey(), conf); } } public void dropDown1_processValueChange(ValueChangeEvent event) { + String className = (String)dropDown1.getValue(); try { - String className = (String)dropDown1.getValue(); Class clazz = Class.forName(className); - BaseJob job = (BaseJob)clazz.newInstance(); - ArrayList<ConfigurationDataEntry> entries = - job.getConfigurationDataTable(); - ConfigurationDataEntry[] deArray = - entries.toArray(new ConfigurationDataEntry[entries.size()]); - configurationTableEntries.setArray(deArray); - } catch (ClassNotFoundException cnfe) { - log("Error ", cnfe); - } catch (InstantiationException ie) { - log("Error ", ie); - } catch (IllegalAccessException iae) { - log("Error ", iae); + currentJob.setJobClass(clazz); + } catch (ClassNotFoundException e) { + fatal("Class " + className + " not found even if looked up in object code"); + return; } + if (currentJob.getConfItems() == null) { + currentJob.setConfItems(new HashMap()); + } + loadConfigData(); } /** @@ -846,5 +859,69 @@ return defaultValue == null || defaultValue.length() == 0; } + private void loadConfigData() { + try { + Class clazz = currentJob.getJobClass(); + if (clazz == null) { + // take class from from first element in list as this + // happens only on new jobs. + String className = + (String) dropDown1DefaultOptions.getOptions()[0].getValue(); + clazz = Class.forName(className); + currentJob.setJobClass(clazz); + } + BaseJob job = (BaseJob)clazz.newInstance(); + ArrayList<ConfigurationDataEntry> entries = + job.getConfigurationDataTable(); + // add job's configuration entries to array + Iterator<ConfigurationDataEntry> iKeys = entries.iterator(); + while (iKeys.hasNext()) { + ConfigurationDataEntry entry = iKeys.next(); + if (currentJob.getConfItems().containsKey(entry.getKey())) { + ConfigurationSetting confEntry = + (ConfigurationSetting)currentJob.getConfItems().get(entry.getKey()); + entry.setValue(confEntry.getValue()); + } + } + ConfigurationDataEntry[] deArray = + entries.toArray(new ConfigurationDataEntry[entries.size()]); + configurationTableEntries.setArray(deArray); + } catch (ClassNotFoundException ie) { + log("Error ", ie); + } catch (InstantiationException ie) { + log("Error ", ie); + } catch (IllegalAccessException iae) { + log("Error ", iae); + } + } + + /** + * Holds value of property currentJob. + */ + private Job currentJob; + + /** + * Getter for property currentJob. + * @return Value of property currentJob. + */ + public Job getCurrentJob() { + return this.currentJob; + } + + /** + * Setter for property currentJob. + * @param currentJob New value of property currentJob. + */ + public void setCurrentJob(Job currentJob) { + this.currentJob = currentJob; + } + + /** Session key for the job name to be handled */ + public static final String KEY_JOB_NAME = "editSinglePage.JOB_NAME"; + /** Session key for the current job being edited */ + public static final String KEY_JOB = "editSinglePage.JOB"; + + /** Job name used to identify, that a new job is going to be created */ + public static final String KEY_CREATE_TOKEN = "$$Create"; } Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/HandlePendingReleases.java 2007-01-21 14:45:25 UTC (rev 36) @@ -32,6 +32,11 @@ import com.sun.rave.web.ui.component.TableRowGroup; import de.sreindl.amavisadmin.bo.ConfigurationBO; import de.sreindl.amavisadmin.bo.MailHandler; +import de.sreindl.amavisadmin.bo.UserBO; +import de.sreindl.amavisadmin.db.MailQueueEntry; +import de.sreindl.amavisadmin.db.MailQueueEntryDAO; +import de.sreindl.amavisadmin.db.MailQueueReceipient; +import de.sreindl.amavisadmin.db.MailQueueReceipientDAO; import de.sreindl.amavisadmin.db.MsgReceipient; import de.sreindl.amavisadmin.db.MsgReceipientDAO; import de.sreindl.amavisadmin.db.MsgReceipientId; @@ -41,6 +46,7 @@ import java.io.IOException; import java.io.StringWriter; import java.sql.SQLException; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import javax.faces.FacesException; @@ -242,13 +248,13 @@ public void setBtnRevert(Button b) { this.btnRevert = b; } - + private PanelGroup groupPanel1 = new PanelGroup(); - + public PanelGroup getGroupPanel1() { return groupPanel1; } - + public void setGroupPanel1(PanelGroup pg) { this.groupPanel1 = pg; } @@ -478,31 +484,46 @@ */ private void sendRequestMailToAdmins(int requestsReleased) { VelocityContext context = new VelocityContext(); + UserDAO dao = new UserDAO(); + List adminUsers = dao.findByAdmin(Boolean.TRUE); + + if (adminUsers.size() == 0) { + warn("Warning: No admin users defined"); + return; + } context.put("user", getSessionBean1().getCurrentUser()); context.put("signature", ConfigurationBO.getConfValue(ConfigurationBO.APP_TITLE)); - context.put("baselink", ConfigurationBO.getConfValue(ConfigurationBO.CONF_BASE_URL) + "/"); + context.put("baselink", ConfigurationBO.getConfValue(ConfigurationBO.CONF_BASE_URL)); context.put("newRequestCount", new Integer(requestsReleased)); context.put("totalReqCount", new Integer(getSessionBean1().getPendingReleases())); + Session session = HibernateSessionFactory.getSession(); + Transaction trx = session.beginTransaction(); try { Template lostPwd = Velocity.getTemplate("/de/sreindl/amavisadmin/templates/RequestRelease.vm"); StringWriter w = new StringWriter(); lostPwd.merge(context, w); - UserDAO udao = new UserDAO(); - List admins = udao.findByAdmin(Boolean.TRUE); - InternetAddress sender = new InternetAddress(ConfigurationBO.getConfValue(ConfigurationBO.MAIL_SENDER)); - InternetAddress[] receipients = new InternetAddress[admins.size()]; - Iterator i = admins.iterator(); - int cnt = 0; + + MailQueueEntry mqe = new MailQueueEntry(); + + mqe.setEncoding("text/plain"); + mqe.setStatus(MailQueueEntryDAO.STATUS_NEW); + mqe.setFrom(UserBO.formatMailAddress(getSessionBean1().getCurrentUser())); + mqe.setMailText(w.toString()); + mqe.setSubject((String)context.get("subject")); + mqe.setReceipients(new HashSet()); + session.save(mqe); + + Iterator i = adminUsers.iterator(); while (i.hasNext()) { - User admin = (User)i.next(); - receipients[cnt] = new InternetAddress(admin.getEmail()); - if (admin.getFullname() != null) { - receipients[cnt].setPersonal(admin.getFullname()); - } - cnt++; + User user = (User)i.next(); + MailQueueReceipient mqr = new MailQueueReceipient(); + mqr.setReceipient(UserBO.formatMailAddress(user)); + mqr.setType(MailQueueReceipientDAO.TYPE_TO); + mqe.getReceipients().add(mqr); + mqr.setMailQueueEntry(mqe); + HibernateSessionFactory.getSession().save(mqr); } - System.err.println(w.toString()); - //MailHandler.sendMail(sender, receipients, (String) context.get("subject"), w.toString()); + trx.commit(); } catch (Exception ex) { log(ex.getMessage(), ex); getFacesContext().addMessage(null, Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/MyRequests.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/MyRequests.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/MyRequests.java 2007-01-21 14:45:25 UTC (rev 36) @@ -475,7 +475,7 @@ return "SPAM (" + ((spam_level != null) ? spam_level.toString() : "unknown") + ")"; case MessageDAO.CONTENT_VIRUS: String smtpResp = (String)trdp.getValue("smtp_resp"); - return "VIRUS " + smtpResp.substring(smtpResp.indexOf("VIRUS: ")+7) + ")"; + return "VIRUS " + smtpResp.substring(smtpResp.indexOf("VIRUS: ")+7); case MessageDAO.CONTENT_BLOCKED: return "Banned"; default: Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/SessionBean1.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/SessionBean1.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/SessionBean1.java 2007-01-21 14:45:25 UTC (rev 36) @@ -73,7 +73,7 @@ approvePendingRowSet.setTableName("msgrcpt"); approvePendingDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionBean1.approvePendingRowSet}")); jobsRowSet.setDataSourceName("java:comp/env/jdbc/amavisDB"); - jobsRowSet.setCommand("SELECT ALL PUBLIC.jobs.job_name, \n PUBLIC.jobs.job_description, \n PUBLIC.jobs.job_cron_settings, \n PUBLIC.jobs.job_class, \n PUBLIC.jobs.job_enabled, \n PUBLIC.jobs.job_last_run_date \nFROM PUBLIC.jobs\nWHERE PUBLIC.jobs.job_special = 'false'\nORDER BY PUBLIC.jobs.job_name ASC "); + jobsRowSet.setCommand("SELECT ALL job_name, \n job_description, \n job_cron_settings, \n job_class, \n job_enabled, \n job_last_run_date \nFROM PUBLIC.job\nWHERE job_special = 'false'\nORDER BY job_name ASC "); jobsRowSet.setTableName("jobs"); jobsDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionBean1.jobsRowSet}")); } Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/bo/ConfigurationBO.java 2007-01-21 14:45:25 UTC (rev 36) @@ -98,8 +98,8 @@ if (log.isDebugEnabled()) { log.debug("setValue (" + key + ", " + value + ")"); } - JobDAO dao = new JobDAO(); - Job globalJob = dao.findById(GLOBAL_JOB); + JobDAO dao = new JobDAO(); + Job globalJob = dao.findById(GLOBAL_JOB); if (confMap != null) { ConfigurationSetting c = (ConfigurationSetting)confMap.get(key); if (c == null) { @@ -139,8 +139,27 @@ if (c == null) { c = new ConfigurationSetting(new ConfigurationSettingId(key, globalJob)); } - c.setValue(((ConfigurationSetting)confMap.get(key)).getValue()); - sess.saveOrUpdate(c); + //#1640418 + String value = ((ConfigurationSetting)confMap.get(key)).getValue(); + if (value == null) { + // remove old entry if exist + if (c.getVersion() != null) { + // data exists in database + sess.delete(c); + } + } else { // new or chagned value + if (c.getValue() != null) { // old value exists + if (!c.getValue().equals(value)) { + // update only in case of changed data + c.setValue(value); + sess.saveOrUpdate(c); + } + } else { + // new entry + c.setValue(value); + sess.save(c); + } + } } trx.commit(); HibernateSessionFactory.closeSession(); Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/Job.hbm.xml 2007-01-21 14:45:25 UTC (rev 36) @@ -18,7 +18,7 @@ --> <hibernate-mapping> <!-- #1640285 --> - <class name="de.sreindl.amavisadmin.db.Job" table="job" schema="public"> + <class name="de.sreindl.amavisadmin.db.Job" table="job" schema="public" lazy="false"> <id name="jobName"> <column name="job_name" length="64" /> <generator class="assigned" /> @@ -40,7 +40,8 @@ <map name="confItems" inverse="true" - cascade="all"> + cascade="all" + lazy="false"> <key column="job_ref"/> <map-key column="key" type="string" /> Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/db/MsgReceipientDAO.java 2007-01-21 14:45:25 UTC (rev 36) @@ -187,6 +187,11 @@ public static final Character RS_RELEASED = 'R'; /** + * There has been an error during release. + */ + public static final Character RS_RELEASE_ERROR = 'E'; + + /** * Message is marked for deletion */ public static final Character RS_DELETED = 'D'; Modified: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java 2007-01-20 16:51:50 UTC (rev 35) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/AdminNotifierJob.java 2007-01-21 14:45:25 UTC (rev 36) @@ -99,7 +99,7 @@ } context.put("appTitle", ConfigurationBO.getConfValue(ConfigurationBO.APP_TITLE)); context.put("signature", ConfigurationBO.getConfValue(ConfigurationBO.APP_TITLE)); - context.put("baselink", ConfigurationBO.getConfValue(ConfigurationBO.CONF_BASE_URL) + "/"); + context.put("baselink", ConfigurationBO.getConfValue(ConfigurationBO.CONF_BASE_URL)); context.put("requestCount", Integer.valueOf(requestCount)); Template lostPwd = Velocity.getTemplate("/de/sreindl/amavisadmin/templates/AdminNotifier.vm"); StringWriter w = new StringWriter(); Added: amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/ReleaseMailJob.java =================================================================== --- amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/ReleaseMailJob.java (rev 0) +++ amavisadmin/trunk/src/java/de/sreindl/amavisadmin/jobs/ReleaseMailJob.java 2007-01-21 14:45:25 UTC (rev 36) @@ -0,0 +1,413 @@ +/* + * Copyright (C) 2007 Stephen Reindl. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.sreindl.amavisadmin.jobs; + +import de.sreindl.amavisadmin.bo.ConfigurationBO; +import de.sreindl.amavisadmin.bo.UserBO; +import de.sreindl.amavisadmin.bo.configuration.ConfigurationDataEntry; +import de.sreindl.amavisadmin.db.ConfigurationSetting; +import de.sreindl.amavisadmin.db.MailQueueEntry; +import de.sreindl.amavisadmin.db.MailQueueEntryDAO; +import de.sreindl.amavisadmin.db.MailQueueReceipient; +import de.sreindl.amavisadmin.db.MailQueueReceipientDAO; +import de.sreindl.amavisadmin.db.MsgReceipient; +import de.sreindl.amavisadmin.db.MsgReceipientDAO; +import de.sreindl.amavisadmin.db.User; +import de.sreindl.amavisadmin.db.UserDAO; +import de.sreindl.amavisadmin.db.util.HibernateSessionFactory; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintStream; +import java.io.StringWriter; +import java.net.InetAddress; +import java.net.Socket; +import java.net.SocketException; +import java.net.SocketTimeoutException; +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.Velocity; +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.quartz.JobExecutionContext; + +/** + * This job is responsible releasing messages to the recipients. + * + * <p>This job is selecting information from msgrcpt table where RS='W' and + * call amavisd-new to release those messages. + * + * @author sreindl... [truncated message content] |