Package: spamass-milter
Version: 0.3.1-2
Severity: important
Tags: patch

1 - there is a big typo in init script (and also a bash-ism):
   * it creates a directory with "basename $SOCKET"
     instead of "dirname $SOCKET"
   * you need to be root to read/write the socket
   * the README.debian do not reflect the fact that postfix
     runs chrooted

   so there are the proposal files:

############################
# /etc/init.d/spamass-milter
############################
#!/bin/sh
#
# $Id: spamass-milter.init 156 2006-09-13 03:38:31Z don $
#
# Sample init script for Debian GNU/Linux
#
#  Copyright (c) 2002 Georg C. F. Greve <[EMAIL PROTECTED]>,
#   all rights maintained by FSF Europe e.V., 
#   Villa Vogelsang, Antonienallee 1, 45279 Essen, Germany
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#  
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#  
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#   Contact:
#            Michael Brown <[EMAIL PROTECTED]>

# This init script was modified on Thu, 30 Jan 2003 02:06:04 -0500 by
# Don Armstrong <[EMAIL PROTECTED]> from contrib/spamass-milter to
# allow force-reload and options specified in
# /etc/default/spamass-milter necessary for inclusion in debian.


PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/spamass-milter
SOCKET=/var/run/sendmail/spamass.sock
PIDFILE=/var/run/spamass.pid
DESC="Sendmail milter plugin for SpamAssassin"

DEFAULT=/etc/default/spamass-milter
OPTIONS=""
GROUP=root

test -x $DAEMON || exit 0

if [ -r $DEFAULT ]; then
    . $DEFAULT;
fi;

set -e

case "$1" in
  start)
        echo -n "Starting $DESC: "

        if [ ! -d `dirname $SOCKET` ]; then
            mkdir -p `dirname $SOCKET`;
        fi;
        start-stop-daemon --start -p $PIDFILE --exec $DAEMON -- -P $PIDFILE -f 
-p $SOCKET $OPTIONS
        chown root:$MAILGROUP $SOCKET
        chmod 770 $SOCKET
        echo "${DAEMON}"
        ;;
  stop)
        echo -n "Stopping $DESC: "

        start-stop-daemon --stop -p $PIDFILE --signal 3 --exec $DAEMON
        /bin/sleep 5s
        /bin/rm -f $SOCKET

        echo "${DAEMON}"
        ;;
  force-reload | restart)
        echo -n "Restarting $DESC: "

        start-stop-daemon --stop -p $PIDFILE --signal 3 --exec $DAEMON
        /bin/sleep 5s
        /bin/rm -f $SOCKET
        start-stop-daemon --start -p $PIDFILE --exec $DAEMON -- -P $PIDFILE -f 
-p $SOCKET $OPTIONS
        chown root:$MAILGROUP $SOCKET
        chmod 770 $SOCKET

        echo "${DAEMON}"

        ;;
  *)
        N=$0
        echo "Usage: $N {start|stop|restart}" >&2
        exit 1
        ;;
esac

exit 0
#############################################################################

#################
# /etc/defaults/spamass-milter
#################
# spamass-milt startup defaults

# OPTIONS are passed directly to spamass-milter.
# man spamass-milter for details

# Default, use the nobody user as the default user, ignore messages
# from localhost
#OPTIONS="-u nobody -i 127.0.0.1"

# Reject emails with spamassassin scores > 15.
#OPTIONS="-r 15"

# Do not modify Subject:, Content-Type: or body.
#OPTIONS="-m"
#

####
# Options example for postfix
#
#OPTIONS="-m -u spamass -r 15"
#SOCKET=/var/spool/postfix/milter/spamass.sock
#MAILGROUP=postfix
########################################################################

####################
# /usr/share/doc/spamass-milter/README.Debian
#####################
[...]
--------------------------------------------------------------
  Integrating spamass-milter into your postfix installation
--------------------------------------------------------------

You need to edit /etc/postfix/main.cf and configure smptpd_milters so
that postfix connects to the spamass-milter socket. Something like:

# spamass-milter configuration
smtpd_milters = unix:/milter/spamass.sock
milter_default_action = accept

should work. Beware that Postfix runs on Debian in a chrooted way,
so the path is relative to the Postfix queues directory.

See http://www.postfix.org/MILTER_README.html or
/usr/share/doc/postfix/MILTER_README.gz (in postfix-doc) for
information on how to set tempfail and the various timeouts that the
sendmail configuration above uses.
[...]
########################################################################

HTH,
-- 
TH.


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-k7
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages spamass-milter depends on:
ii  libc6                  2.3.6.ds1-13etch5 GNU C Library: Shared libraries
ii  libgcc1                1:4.1.1-21        GCC support library
ii  libmilter0             8.13.8-3          Sendmail Mail Filter API (Milter)
ii  libstdc++6             4.1.1-21          The GNU Standard C++ Library v3
ii  spamc                  3.2.3-0.volatile1 Client for SpamAssassin spam filte

Versions of packages spamass-milter recommends:
ii  postfix                2.3.8-2+b1        A high-performance mail transport 
ii  spamassassin           3.2.3-0.volatile1 Perl-based spam filter using text 

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to