spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Network Tests don't fire with Milter


From: Steve
Subject: Re: Network Tests don't fire with Milter
Date: Sun, 22 Nov 2009 07:09:55 +0000

On Sat, 2009-11-21 at 16:19 -0800, Don Armstrong wrote:
> On Thu, 19 Nov 2009, Steve wrote:
> 
> > On Thu, 2009-11-19 at 10:19 -0600, Shadwick, Tony wrote:
> > > I'm running postfix on debian and Ubuntu server.  In 
> > > /etc/default/spamass-milter I have this:
> > > 
> > > OPTIONS="-d rcpt -e my.domain.here -r 4.4 -m -u address@hidden -i 
> > > 127.0.0.1 -i my.ignored.ip.range"
> > > 
> > > The network tests run just fine, rejects on a score of 4.4.  It logs all 
> > > recipient processing.
> > > 
> > > What does yours look like?
> > > 
> > > Tony Shadwick
> > > 
> > > 
> > Hi Tony + list,
> > 
> > I have:
> > /etc/default/spamass-milter
> > # spamass-milt startup defaults
> > 
> > # Default, use the spamass-milter user as the default user, ignore
> > # messages from localhost
> > OPTIONS="-u spamass-milter -i 127.0.0.1"
> > 
> > # Reject emails with spamassassin scores > 15.
> > OPTIONS="-r 15"
> 
> You want
> 
> Options="-u spamass-milter -i 127.0.0.1 -r 15"
>  
> > ***BUT***
> > My start/stop init.d call looks like this 
> > {DAEMON=/usr/local/sbin/spamass-milter):
> > 
> > start-stop-daemon --start -b --exec $DAEMON --oknodo --user spamass-milter 
> > -- -r 35 -p $SOCKET
> > 
> > My guess is this over-rides the /etc/default options as setting it
> > to -r 35 here is honoured. I'm sure it has something to do with
> > this: --oknodo, but I can't find the English translation for
> > '--oknodo' :-)
> 
> This looks like someone has started with the Debian init.d script that
> I wrote, and screwed it up. You'll have to show us the full init.d
> script. [And you don't want --oknodo; it's an error if you asked to
> start the daemon, and it wasn't able to start.]
> 
> 
> Don Armstrong
> 
Hi Don,

Guilty as charged, I stole your init script. Initially I could not get
the milter to work at all and someone advised me to make some changes -
that's how I've ended up with the script as it is:

I guess I have two issues unique to the milter (but are not a problem if
I implements Spamassassin without the milter):

1. The network tests don't fire (only with the milter)
2. It does not rewrite the header with a spam report (again only with
the milter)

I still think it's start options, but I'm missing *why* :-?
#!/bin/sh
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/spamass-milter
SOCKET=/home/mail/email/private/samilter
DESC="milter plugin for SpamAssassin"
SOCKETOWNER="postfix:postfix"
start() {
        echo -n "Starting $DESC: "
        start-stop-daemon --start -b --exec $DAEMON --oknodo --user
spamass-milter -- -r 15 -p $SOCKET
        #chown the socket
        /bin/sleep 5s
        chown $SOCKETOWNER $SOCKET
        echo "${DAEMON}"

        }
stop() {
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --exec $DAEMON --oknodo
        /bin/sleep 5s
        /bin/rm -f $SOCKET
        echo "${DAEMON}"
        RETVAL=0
}
case $1 in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  *)
    echo "Usage: firewall {start|stop|restart}"
    RETVAL=1
esac

exit





reply via email to

[Prev in Thread] Current Thread [Next in Thread]