debian/0000755000000000000000000000000011760444751007177 5ustar debian/amavisd-milter.default0000644000000000000000000000260211760430621013452 0ustar # Defaults for amavisd-milter initscript # sourced by /etc/init.d/amavisd-milter # installed at /etc/default/amavisd-milter by the maintainer scripts # 2011-01-26 Harald Jenny # The user should be the one amavisd-new is running as #SYSTEMUSER=amavis # Pidfile is placed in run-directory from amavisd-new #PIDFILE=/var/run/amavis/amavisd-milter.pid # This is the default location of the milter socket #MILTERSOCKET=/var/lib/amavis/amavisd-milter.sock # If you want the milter daemon to listen on tcp please # use something like the next line: #MILTERSOCKET=inet:60001@127.0.0.1 # When using postfix and you want the smtpd to run # chrooted you may need a socket inside the chroot. # You will probably also need the options at the end of # this file! #MILTERSOCKET=/var/spool/postfix/amavis/amavis.sock # The default location of the amavisd-new socket #AMAVISSOCKET=/var/lib/amavis/amavisd.sock # Here amavisd-milter stores the mails which should get # checked (needs to be changed when amavisd-new TEMPBASE # variable is modified!). #WORKINGDIR=/var/lib/amavis/tmp # The parameters listed here will be passed directly to # amavisd-milter directly, please take a look at the # programs manpage for detailed infomation. #EXTRAPARAMS="" # Set these two options if you want the socket to have # special permissions (usefull mainly for postfix). #MILTERSOCKETOWNER="postfix:postfix" #MILTERSOCKETMODE="0660" debian/compat0000644000000000000000000000000211760430621010364 0ustar 9 debian/README.Debian0000644000000000000000000000224311760430621011230 0ustar amavisd-milter for Debian ------------------------- As amavisd-milter does not have a config file all configuration is done in /etc/default/amavisd-milter, which is sourced by the package's init script. Via MILTERSOCKET you can specify the socket through which either sendmail or postfix connect to amavisd-milter - the syntax for unix is straight-forward just the file name, tcp uses the form inet:PORT@IPADDRESS. When you plan to use amavisd-milter with postfix you may also want to set the MILTERSOCKETOWNER and the MILTERSOCKETMODE directives, they will allow you to change the username as well as the the permissions of the socket after it has been created by the daemon. Please keep in mind that amavisd-milter (in contrary to the old amavisd-new-milter) uses the AM.PDP protocol to communicate with the amavisd daemon so a paragraph like the following has to be present in your amavisd-new config file: $interface_policy{'SOCK'} = 'AM.PDP-SOCK'; $policy_bank{'AM.PDP-SOCK'} = { protocol => 'AM.PDP', auth_required_release => 0, # don't require secret-id for release }; -- Harald Jenny Wed, 7 Jul 2010 00:22:44 +0200 debian/amavisd-milter.docs0000644000000000000000000000001711760430621012754 0ustar AUTHORS README debian/watch0000644000000000000000000000012611760430621010216 0ustar version=3 http://sf.net/amavisd-milter/amavisd-milter-([0-9]\.[0-9]\.[0-9]+)\.tar\.gz debian/copyright0000644000000000000000000001026711760430621011127 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: amavisd-milter Upstream-Contact: Petr Rehor Source: http://amavisd-milter.sourceforge.net/ Files: * Copyright: 2005, Petr Rehor License: BSD-like Files: compat/fts_compat.h compat/daemon.c compat/mkdtemp.c compat/fts_open.c Copyright: 1987, 1989, 1990, 1993, 1994, The Regents of the University of California License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: compat/strlcpy.c Copyright: 1998, Todd C. Miller License: ISC Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. . THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Files: debian/* Copyright: 2009-2012, Harald Jenny License: BSD-like License: BSD-like Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/control0000644000000000000000000000277211760430621010601 0ustar Source: amavisd-milter Section: mail Priority: extra Maintainer: Harald Jenny Build-Depends: dpkg-dev (>= 1.16.1~), debhelper (>= 9), autotools-dev, libmilter-dev Homepage: http://amavisd-milter.sourceforge.net/ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=amavisd-new/pkg-amavisd-milter.git Vcs-Git: git://anonscm.debian.org/amavisd-new/pkg-amavisd-milter.git Standards-Version: 3.9.3 Package: amavisd-milter Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, libmilter1.0.1 (>= 8.14.3-9.5), amavisd-new Recommends: sendmail | postfix Provides: amavisd-new-milter Breaks: amavisd-new-milter (<= 1:2.6.4-2) Replaces: amavisd-new-milter (<= 1:2.6.4-2) Description: amavisd-new interface for milter-capable MTAs This package provides a milter for amavisd-new that works with Sendmail or Postfix, using the AM.PDP protocol. . Replacing the older amavisd-new-milter program, amavisd-milter makes use of the full functionality of amavisd-new. It supports using spam and virus information header fields, rewriting message subjects, adding address extensions, and selectively removing recipients. Package: amavisd-milter-dbg Architecture: any Section: debug Depends: ${misc:Depends}, amavisd-milter (= ${binary:Version}) Description: amavisd-new interface for milter-capable MTAs - debugging symbols This package provides a milter for amavisd-new that works with Sendmail or Postfix, using the AM.PDP protocol. . This package contains the debugging symbols for amavisd-milter. debian/changelog0000644000000000000000000001312211760430621011037 0ustar amavisd-milter (1.5.0-5) unstable; urgency=low * debian/copyright: - Changed format specification URL from svn to released version 1.0. - Corrected file listing to use spaces instead of commas to comply with DEP-5 and satisfy lintian. - Added 2012 to the copyright years for the debian packaging. * debian/control: - Bumped Standards to 3.9.3 (changed to copyright-format 1.0). - Removed hardening-includes from Build-Depends and instead add a versioned build depedency on dpkg-dev >= 1.16.1~ (needed for getting hardened compile flags through dpkg-buildflags). - Build-Depend on debhelper >= 9. - Removed version constraints from Build-Depends, Depends and Recommends where requirements are already fulfilled in Squeeze. * debian/rules: - Switched from manual usage of hardening-includes to dpkg-buildflags. * debian/compat: - Bumped Version to 9. -- Harald Jenny Sun, 27 May 2012 15:29:55 +0200 amavisd-milter (1.5.0-4) unstable; urgency=low * debian/control: - Bumped Standards to 3.9.2 (no changes needed). - Changed Vcs-* fields as package is now maintained in a git repository (thanks to Alexander Wirt for the conversion from mercurial). - Changed build depedency on debhelper to >= 8 for easier backporting to Lenny. * debian/changelog: - Fixed small word duplication error. * debian/rules: - Modified inclusion method of HARDENING_CFLAGS and HARDENING_LDFLAGS from hardening-includes package to avoid duplication of these params. - Stopped unnecessary linking of amavisd-milter binary by adding "-Wl,--as-needed" to LDFLAGS. -- Harald Jenny Mon, 15 Aug 2011 19:11:03 +0200 amavisd-milter (1.5.0-3) unstable; urgency=low * debian/changelog: - Added thanks to initiator of two changes (forgot last time). - Reformatted changelog for better legibility. * debian/control: - Bumped Standards to 3.9.1 (no changes needed). - Added build dependency on hardening-includes. - Really make package 3.9.0 Standards compliant by changing Conflicts to Breaks (overlooked this fact last time). - Added Provides and Replaces for amavisd-new-milter to simplify upgrading from lenny to squeeze-backports. - Build-Depend on debhelper changed to >= 8.0.0. - Made build depedency on autotools-dev versioned to >= 20100122.1 (needed for debhelper helpers). - Made depedency on libmilter versioned to >= 8.14.3-9.5 (needed for pulling in a version fixing bug #527862). * debian/rules: - Added rules to include hardening flags in compilation. - Changed dh_installinit invocation to restart amavisd-milter after upgrade for minimizing daemon downtime. - Removed dh_installchangelogs override as upstream changelog gets picked up automatically. - Changed to use autotools_dev option with dh. - Cleaned up and minimized ruleset. * debian/patches/*-location: - Corrected the mail address in the patches and modified the timestamp accordingly. * debian/patches/ax_path_milter-flags-fix: - Grabbed patch from upstream CVS to fix problem with LDFLAGS (requiring recreation of configure script). * debian/patches/configure-flags-fix: - Created patch to modify configure directly instead of recreating it (to minimize changeset). * debian/compat: - Bumped Version to 8. * debian/amavisd-milter.init: - Rewrote some parts of the init script to make the code more error resistant (thanks to Gabor Kiss for the initial bug report and Teodor Micu and Agustin Martin for the valuable help). Closes: #609762: amavisd-milter: Init script changes owner of current directory to 'amavis' * debian/amavisd-milter.default: - Modified configfile to comply with changed code in init script. * debian/copyright: - Modified to comply with current DEP-5 candidate (thanks to Dominique Dumont for the libconfig-model-perl parser). - Changed license for debian packaging to match the one used by upstream simplifying patch exchange (thanks to Paul Wise and Charles Plessy for the valuable help). -- Harald Jenny Mon, 28 Mar 2011 22:38:07 +0200 amavisd-milter (1.5.0-2) unstable; urgency=low * debian/control: - Bumped Standards to 3.9.0 (no changes needed). - Added Vcs-* fields as package is now hosted in amavisd-new repository. - Build-Depend on debhelper changed to >= 7.0.50~. - Build-Depend on autotools-dev added. - Added an entry for the amavisd-milter-dbg package. * debian/amavisd-milter.default: - Added a note about amavisd-new TEMPDIR (thanks to Miguel A. Novo for the hint). * debian/README.Debian: - Added a note about AM.PDP section in amavisd-new config (thanks to Miguel A. Novo for the hint). * debian/copyright: - Changed to use DEP-5 proposal format. * debian/rules: - Converted to dh usage. - Added code to symlink to autotools-dev versions of config.{sub,guess} at compile time. - Added rules to build a debug package. * debian/stamp-patched, README.source: - Removed as they were leftovers of pre-official packages. * debian/source.lintian-overrides: - Removed due to use of autotools-dev. * debian/compat: - Bumped Version to 7. -- Harald Jenny Mon, 12 Jul 2010 02:24:04 +0200 amavisd-milter (1.5.0-1) unstable; urgency=medium * Initial public release (Closes: #577819). -- Harald Jenny Wed, 12 May 2010 22:55:26 +0200 debian/rules0000755000000000000000000000130311760430621010243 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed include /usr/share/dpkg/buildflags.mk %: dh $@ --with autotools_dev override_dh_auto_configure: dh_auto_configure -- --prefix=/usr --mandir=\$${prefix}/share/man \ --sysconfdir=/etc --localstatedir=/var/lib/amavis \ --with-working-dir=/var/lib/amavis/tmp override_dh_auto_install: dh_auto_install --destdir=debian/amavisd-milter override_dh_installdocs: dh_installdocs -Namavisd-milter-dbg dh_installdocs -pamavisd-milter-dbg --link-doc=amavisd-milter override_dh_installinit: dh_installinit -R override_dh_strip: dh_strip --dbg-package=amavisd-milter-dbg debian/patches/0000755000000000000000000000000011760430621010615 5ustar debian/patches/configure-flags-fix0000644000000000000000000000207711760430621014405 0ustar Description: Fix LDFLAGS typo when compiling for Debian Author: Harald Jenny Forwarded: not-needed Last-Update: 2010-10-26 Index: amavisd-milter/configure =================================================================== --- amavisd-milter.orig/configure 2010-11-26 15:49:19.317520201 +0100 +++ amavisd-milter/configure 2010-11-26 15:49:33.537532240 +0100 @@ -9123,7 +9123,7 @@ # Debian use for libmilter.a /usr/lib/libmilter instead of /usr/lib if test "$ax_path_milter_ok" = "no" ; then unset ac_cv_lib_milter_smfi_main - ac_milter_save_LDFLAGS="$LDLFAGS" + ac_milter_save_LDFLAGS="$LDFLAGS" MILTER_LDFLAGS="-L/usr/lib/libmilter" LDFLAGS="$MILTER_LDFLAGS $LDFLAGS" if test "${ac_cv_header_libmilter_mfapi_h+set}" = set; then @@ -9512,7 +9512,7 @@ CPPFLAGS="$CPPFLAGS $MILTER_CPPFLAGS" # Save and modify LDFLAGS. - ac_milter_save_LDFLAGS="$LDLFAGS" + ac_milter_save_LDFLAGS="$LDFLAGS" MILTER_LDFLAGS="-L${SENDMAIL_BASE_DIR}/${SENDMAIL_OBJ_DIR}/libmilter" LDFLAGS="$MILTER_LDFLAGS $LDFLAGS" debian/patches/manpage-locations0000644000000000000000000000630111760430621014141 0ustar Description: Adapt paths in manpage for Debian Author: Harald Jenny Forwarded: not-needed Last-Update: 2010-10-26 Index: b/amavisd-milter/amavisd-milter.8 =================================================================== --- a/amavisd-milter/amavisd-milter.8 2009-10-29 15:53:14.000000000 +0100 +++ b/amavisd-milter/amavisd-milter.8 2010-02-23 19:30:44.000000000 +0100 @@ -106,7 +106,7 @@ 20 minutes. We suggest to use less than 10 minutes. .It Fl p Ar pidfile -Use this pid file (default /var/amavis/amavisd-milter.pid). +Use this pid file (default /var/run/amavis/amavisd-milter.pid). .It Fl P When .Sy amavisd-new @@ -121,7 +121,7 @@ .Sy sendmail and .Nm -(default /var/amavis/amavisd-milter.sock). +(default /var/lib/amavis/amavisd-milter.sock). The protocol spoken over this socket is .Sy MILTER (Mail FILTER). @@ -146,7 +146,7 @@ .Nm and .Sy amavisd-new -(default /var/amavis/amavisd.sock). +(default /var/lib/amavis/amavisd.sock). The protocol spoken over this socket is .Sy AM.PDP (AMavis Policy Delegation Protocol). @@ -181,7 +181,7 @@ .It Fl v Report the version number and exit. .It Fl w Ar directory -Set working directory (default /var/amavis). +Set working directory (default /var/lib/amavis/tmp). .El .Ss Limited support for sendmail 8.12 .Bl -bullet -compact @@ -211,17 +211,17 @@ .Pp .Sh FILES .Bl -tag -width indent -.It Em /var/amavis/amavisd-milter.pid +.It Em /var/run/amavis/amavisd-milter.pid The default process-id file. -.It Em /var/amavis/amavisd-milter.sock +.It Em /var/lib/amavis/amavisd-milter.sock The default .Sy sendmail communication socket. -.It Em /var/amavis/amavisd.sock +.It Em /var/lib/amavis/amavisd.sock Th default .Sy amavisd-new communication socket. -.It Em /var/amavis +.It Em /var/lib/amavis/tmp The default working directory. .El .Sh POLICY BANK @@ -257,7 +257,7 @@ define(`confMILTER_MACROS_ENVFROM', confMILTER_MACROS_ENVFROM`, r, b') INPUT_MAIL_FILTER(`amavisd-milter', - `S=local:/var/amavis/amavisd-milter.sock, + `S=local:/var/lib/amavis/amavisd-milter.sock, F=T, T=S:10m;R:10m;E:10m') .Ed .Pp @@ -273,29 +273,29 @@ .Pp First create working directory: .Bd -literal -offset indent -mkdir /var/amavis/tmp -chmod 750 /var/amavis/tmp -chown amavis /var/amavis/tmp +mkdir /var/lib/amavis/tmp +chmod 750 /var/lib/amavis/tmp +chown amavis /var/lib/amavis/tmp .Ed .Pp Then start .Nm as non-priviledged user amavis: .Pp -.Dl su - amavis -c \&" Ns Nm Fl w Ar /var/amavis/tmp Ns \&" +.Dl su - amavis -c \&" Ns Nm Fl w Ar /var/lib/amavis/tmp Ns \&" .Ss Limiting maximum concurrent connections to amavisd To limit concurrent connections to 4 and fail after 10 minutes (10*60 secs) of waiting run .Nm with this options: .Pp -.Dl su - amavis -c \&" Ns Nm Fl w Ar /var/amavis/tmp Fl m Ar 4 Fl M Ar 600 Ns \&" +.Dl su - amavis -c \&" Ns Nm Fl w Ar /var/lib/amavis/tmp Fl m Ar 4 Fl M Ar 600 Ns \&" .Ss Troubleshooting For troubleshooting run .Nm on the foreground and set debug level to appropriate level: .Pp -.Dl su - amavis -c \&" Ns Nm Fl w Ar /var/amavis/tmp Fl f Fl d Ar level Ns \&" +.Dl su - amavis -c \&" Ns Nm Fl w Ar /var/lib/amavis/tmp Fl f Fl d Ar level Ns \&" .Pp where debug levels are: .Bl -tag -width "XXXX" debian/patches/ax_path_milter-flags-fix0000644000000000000000000000226211760430621015420 0ustar Description: Fix LDFLAGS typo when compiling for Debian Author: Petr Rehor Origin: upstream, http://amavisd-milter.cvs.sourceforge.net/viewvc/amavisd-milter/amavisd-milter/aclocal/ax_path_milter.m4?r1=1.3&r2=1.4 Last-Update: 2010-10-26 Index: amavisd-milter/aclocal/ax_path_milter.m4 =================================================================== --- amavisd-milter.orig/aclocal/ax_path_milter.m4 2010-11-26 15:47:10.837523721 +0100 +++ amavisd-milter/aclocal/ax_path_milter.m4 2010-11-26 15:47:26.625537144 +0100 @@ -130,7 +130,7 @@ # Debian use for libmilter.a /usr/lib/libmilter instead of /usr/lib if test "$ax_path_milter_ok" = "no" ; then unset ac_cv_lib_milter_smfi_main - ac_milter_save_LDFLAGS="$LDLFAGS" + ac_milter_save_LDFLAGS="$LDFLAGS" MILTER_LDFLAGS="-L/usr/lib/libmilter" LDFLAGS="$MILTER_LDFLAGS $LDFLAGS" AC_CHECK_HEADER([libmilter/mfapi.h],[ @@ -309,7 +309,7 @@ CPPFLAGS="$CPPFLAGS $MILTER_CPPFLAGS" # Save and modify LDFLAGS. - ac_milter_save_LDFLAGS="$LDLFAGS" + ac_milter_save_LDFLAGS="$LDFLAGS" MILTER_LDFLAGS="-L${SENDMAIL_BASE_DIR}/${SENDMAIL_OBJ_DIR}/libmilter" LDFLAGS="$MILTER_LDFLAGS $LDFLAGS" debian/patches/pidfile-location0000644000000000000000000000132411760430621013762 0ustar Description: Adapt location of pidfile for Debian Author: Harald Jenny Forwarded: not-needed Last-Update: 2010-10-26 Index: b/amavisd-milter/main.c =================================================================== --- a/amavisd-milter/main.c 2008-11-10 01:45:10.000000000 +0100 +++ b/amavisd-milter/main.c 2009-11-02 22:29:21.000000000 +0100 @@ -45,7 +45,7 @@ int max_wait = 5 * 60; sem_t max_sem_t; sem_t *max_sem = NULL; -const char *pid_file = LOCAL_STATE_DIR "/" PACKAGE ".pid"; +const char *pid_file = "/var/run/amavis/" PACKAGE ".pid"; const char *mlfi_socket = LOCAL_STATE_DIR "/" PACKAGE ".sock"; #ifdef HAVE_SMFI_SETBACKLOG int mlfi_socket_backlog = 0; debian/patches/series0000644000000000000000000000012011760430621012023 0ustar pidfile-location manpage-locations ax_path_milter-flags-fix configure-flags-fix debian/amavisd-milter.init0000644000000000000000000000604711760430621013000 0ustar #!/bin/sh # # amavisd-milter /etc/init.d/ initscript for amavisd-milter # Derived from /etc/init.d/amavisd-new-milter by # Brian May and # Henrique M. Holschuh # Ideas from /etc/init.d/rsyslog by Michael Biebl # # and /etc/init.d/ssh # Copyright (c) 2009 by Harald Jenny # # Distributed under the GPL version 2 # ### BEGIN INIT INFO # Provides: amavisd-milter # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts the amavisd-milter daemon # Description: milter daemon for sendmail/postfix and amavisd-new ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/amavisd-milter NAME=amavisd-milter DESC="amavisd-milter Daemon" OPTIONS="" # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r "/etc/default/$NAME" ] && . "/etc/default/$NAME" [ -n "$SYSTEMUSER" ] || SYSTEMUSER=amavis if [ -z "$PIDFILE" ]; then PIDFILE="/var/run/amavis/$NAME.pid" else OPTIONS="$OPTIONS -p $PIDFILE" fi PIDDIR="$(dirname "$PIDFILE")" if [ ! -e "$PIDDIR" ]; then mkdir "$PIDDIR" chown "$SYSTEMUSER":"$(id "$SYSTEMUSER" -g -n)" "$PIDDIR" fi if [ -z "$MILTERSOCKET" ]; then MILTERSOCKETTYPE=pipe else OPTIONS="$OPTIONS -s $MILTERSOCKET" if [ "$(echo $MILTERSOCKET | grep ^inet)" ]; then MILTERSOCKETTYPE=tcp else MILTERSOCKETTYPE=pipe MILTERDIR="$(dirname "$MILTERSOCKET")" if [ ! -e "$MILTERDIR" ]; then mkdir "$MILTERDIR" chown "$SYSTEMUSER" "$MILTERDIR" fi fi fi [ -z "$AMAVISSOCKET" ] || OPTIONS="$OPTIONS -S $AMAVISSOCKET" [ -z "$WORKINGDIR" ] || OPTIONS="$OPTIONS -w $WORKINGDIR" [ -z "$EXTRAPARAMS" ] || OPTIONS="$OPTIONS $EXTRAPARAMS" START="--start --quiet --chuid $SYSTEMUSER --pidfile $PIDFILE --startas $DAEMON --name $NAME -- $OPTIONS" STOP="--stop --quiet --retry 10 --pidfile $PIDFILE --startas $DAEMON --name $NAME" # Define LSB functions. . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting $DESC:" "$NAME" start-stop-daemon $START case "$?" in 0) log_end_msg 0 if [ "$MILTERSOCKETTYPE" = "pipe" ]; then if [ "$MILTERSOCKETOWNER" ]; then chown "$MILTERSOCKETOWNER" "$MILTERSOCKET" fi if [ "$MILTERSOCKETMODE" ]; then chmod "$MILTERSOCKETMODE" "$MILTERSOCKET" fi fi ;; 1) log_progress_msg "already started" log_end_msg 0 ;; *) log_end_msg $? ;; esac ;; stop) log_daemon_msg "Stopping $DESC:" "$NAME" start-stop-daemon $STOP case "$?" in 0) log_end_msg 0 ;; 1) log_progress_msg "already stopped" log_end_msg 0 ;; *) log_end_msg $? ;; esac ;; restart|force-reload) $0 stop $0 start ;; status) status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? ;; *) log_failure_msg "Usage: $0 {start|stop|restart|force-reload|status}" exit 1 ;; esac exit 0 debian/source/0000755000000000000000000000000011760430621010466 5ustar debian/source/format0000644000000000000000000000001411760430621011674 0ustar 3.0 (quilt)