[Python-apps-commits] r9266 - in packages/pymilter-milters/trunk/debian (16 files)
kitterman at users.alioth.debian.org
kitterman at users.alioth.debian.org
Sat Nov 24 02:55:17 UTC 2012
Date: Saturday, November 24, 2012 @ 02:55:16
Author: kitterman
Revision: 9266
* New upstream release
- Refresh patch
- Updated debian/copyright
* Add new dkim-milter-python binary for new DKIM milter
- Add to debian/control and replicate the package configuration used for
spf-milter-python
- Added debian/patches/dkim-milter-debian-config.patch
* Added status of proc support to spf-milter-python init script
* Bump standards version to 3.9.4 without further change
Added:
packages/pymilter-milters/trunk/debian/dkim-milter
packages/pymilter-milters/trunk/debian/dkim-milter-python.dirs
packages/pymilter-milters/trunk/debian/dkim-milter-python.init
packages/pymilter-milters/trunk/debian/dkim-milter-python.install
packages/pymilter-milters/trunk/debian/dkim-milter-python.links
packages/pymilter-milters/trunk/debian/dkim-milter-python.lintian-overrides
packages/pymilter-milters/trunk/debian/dkim-milter-python.manpages
packages/pymilter-milters/trunk/debian/dkim-milter-python.postinst
packages/pymilter-milters/trunk/debian/dkim-milter-python.postrm
packages/pymilter-milters/trunk/debian/dkim-milter.1
Modified:
packages/pymilter-milters/trunk/debian/changelog
packages/pymilter-milters/trunk/debian/control
packages/pymilter-milters/trunk/debian/copyright
packages/pymilter-milters/trunk/debian/patches/series
packages/pymilter-milters/trunk/debian/patches/spfmilter-debian-config.patch
packages/pymilter-milters/trunk/debian/spf-milter-python.init
Modified: packages/pymilter-milters/trunk/debian/changelog
===================================================================
--- packages/pymilter-milters/trunk/debian/changelog 2012-11-20 21:44:16 UTC (rev 9265)
+++ packages/pymilter-milters/trunk/debian/changelog 2012-11-24 02:55:16 UTC (rev 9266)
@@ -1,3 +1,17 @@
+pymilter-milters (0.8.17-1) experimental; urgency=low
+
+ * New upstream release
+ - Refresh patch
+ - Updated debian/copyright
+ * Add new dkim-milter-python binary for new DKIM milter
+ - Add to debian/control and replicate the package configuration used for
+ spf-milter-python
+ - Added debian/patches/dkim-milter-debian-config.patch
+ * Added status of proc support to spf-milter-python init script
+ * Bump standards version to 3.9.4 without further change
+
+ -- Scott Kitterman <scott at kitterman.com> Fri, 23 Nov 2012 19:40:29 -0500
+
pymilter-milters (0.8.13-6) unstable; urgency=low
* start-stop-daemon --start --chuid $USER instead of root (Closes: #617642)
Modified: packages/pymilter-milters/trunk/debian/control
===================================================================
--- packages/pymilter-milters/trunk/debian/control 2012-11-20 21:44:16 UTC (rev 9265)
+++ packages/pymilter-milters/trunk/debian/control 2012-11-24 02:55:16 UTC (rev 9266)
@@ -4,7 +4,7 @@
Maintainer: Scott Kitterman <scott at kitterman.com>
Uploaders: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
Build-Depends: debhelper (>= 7.3.16), quilt (>= 0.46-7)
-Standards-Version: 3.9.1
+Standards-Version: 3.9.4
Homepage: http://sourceforge.net/projects/pymilter/
Vcs-Svn: svn://svn.debian.org/python-apps/packages/pymilter-milters/trunk/
Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/pymilter-milters/
@@ -18,3 +18,14 @@
Rejection policy is configured via sendmail access file. Updated for RFC 4408
compliance.
+Package: dkim-milter-python
+Architecture: all
+Depends: python, ${misc:Depends}, python-milter (>= 0.9.3), python-dkim (>= 0.4),
+ python-authres (>= 0.2), lsb-base, adduser
+Suggests: postfix (>= 2.3) | sendmail (>= 8.13)
+Description: Domain Keys Identified Mail Milter for Sendmail and Postfix
+ A simple Python mail filter for creating and verifying Domain Keys Identified
+ Mail (DKIM) signatures. While not as featureful as some other
+ implementations, like opendkim, because it is written in Python, it is a
+ good choice for experimentation and customization.
+
Modified: packages/pymilter-milters/trunk/debian/copyright
===================================================================
--- packages/pymilter-milters/trunk/debian/copyright 2012-11-20 21:44:16 UTC (rev 9265)
+++ packages/pymilter-milters/trunk/debian/copyright 2012-11-24 02:55:16 UTC (rev 9266)
@@ -38,6 +38,18 @@
they are requested to be sent to <dredd at megacity.org> for inclusion in future
versions
+Files in doc/ are under the GNU Free Documentation License Version 1.3
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+On Debian systems, the complete text of the GFD v1.3 can be found here:
+/usr/share/common-licenses/GFDL-1.3
+
The Debian packaging is © 2007 - 2010 Scott Kitterman <scott at kitterman.com>
and is licensed under the GPL version 2 or later. See above.
Added: packages/pymilter-milters/trunk/debian/dkim-milter
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,4 @@
+#! /bin/sh
+exec /usr/bin/dkim-milter.py &
+echo $! >/var/run/dkim-milter-python/dkim-milter.pid
+
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.dirs
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.dirs (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.dirs 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,2 @@
+/var/log/dkim-milter-python/save
+
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.init
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.init (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.init 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,132 @@
+#! /bin/sh
+#
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels at cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock at gnu.ai.mit.edu>.
+#
+# Version: @(#)skeleton 1.9 26-Feb-2001 miquels at cistron.nl
+#
+### BEGIN INIT INFO
+# Provides: dkim-milter dkim-milter-python
+# Required-Start: $remote_fs $syslog $network $time
+# Required-Stop: $remote_fs $syslog $network
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: dkim-milter-python
+# Description: Python DKIM Milter for Sendmail and Postfix
+### END INIT INFO
+prefix="/usr"
+exec_prefix=${prefix}
+sysconfdir="/etc/dkim-milter-python"
+bindir="${exec_prefix}/bin/"
+RUNDIR="/var/run/dkim-milter-python"
+DAEMON=${bindir}/dkim-milter
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:
+NAME=dkim-milter
+DESC="Python DKIM Milter"
+USER=dkim-milter-python
+GROUP=dkim-milter-python
+SOCKET=$RUNDIR/spfmiltersock
+
+test -x $DAEMON || exit 0
+
+# Include dkim-python-milter defaults if available
+if [ -f /etc/default/dkim-milter-python ] ; then
+ . /etc/default/dkim-milter-python
+fi
+
+set -e
+
+. /lib/lsb/init-functions
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ # Create the run directory if it doesn't exist
+ if [ ! -d $RUNDIR ]; then
+ install -o $USER -g $GROUP -m 755 -d $RUNDIR || return 2
+ fi
+
+ # Clean up stale sockets
+ if [ -f $RUNDIR/$NAME.pid ]; then
+ pid=`cat $RUNDIR/$NAME.pid`
+ if ! ps -C $DAEMON -s $pid >/dev/null; then
+ rm $RUNDIR/$NAME.pid
+ # UNIX sockets may be specified with or without the
+ # local: prefix; handle both
+ t=`echo $SOCKET | cut -d: -f1`
+ s=`echo $SOCKET | cut -d: -f2`
+ if [ -e $s -a -S $s ]; then
+ if [ "$t" = "$s" -o "$t" = "local" ]; then
+ rm $s
+ fi
+ fi
+ fi
+ fi
+
+ start-stop-daemon --start --chuid $USER --background --quiet --pidfile \
+ $RUNDIR/$NAME.pid --exec $DAEMON
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ if [ -f $RUNDIR/$NAME.pid ]; then
+ start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid
+ rm $RUNDIR/$NAME.pid
+ #echo $SOCKET
+ if [ -e $SOCKET ]; then
+ rm $SOCKET
+ fi
+ fi
+ echo "$NAME."
+ ;;
+ force-reload)
+ echo -n "Force reloading $DESC: "
+ if [ -f $RUNDIR/$NAME.pid ]; then
+ start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid
+ rm $RUNDIR/$NAME.pid
+ #echo $SOCKET
+ if [ -e $SOCKET ]; then
+ rm $SOCKET
+ fi
+ fi
+ sleep 1
+ start-stop-daemon --start --chuid $USER --background --quiet --pidfile \
+ $RUNDIR/$NAME.pid --exec $DAEMON
+ echo "$NAME."
+ ;;
+ restart)
+ echo "Restarting $DESC: "
+ echo -n "Stopping $DESC: "
+ if [ -f $RUNDIR/$NAME.pid ]; then
+ start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid
+ rm $RUNDIR/$NAME.pid
+ #echo $SOCKET
+ if [ -e $SOCKET ]; then
+ rm $SOCKET
+ fi
+ fi
+ echo "$NAME."
+ sleep 1
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --chuid $USER --background --quiet --pidfile \
+ $RUNDIR/$NAME.pid --exec $DAEMON
+ echo "$NAME."
+ ;;
+ status)
+ status_of_proc -p /var/run/dkim-milter-python/dkim-milter.pid /usr/bin/dkim-milter.py dkim-milter.py
+ ;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|force-reload|restart|}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.install
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.install (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.install 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,3 @@
+dkim-milter.py usr/bin/
+debian/dkim-milter usr/bin/
+dkim-milter.cfg etc/dkim-milter-python
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.links
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.links (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.links 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1 @@
+usr/share/man/man1/dkim-milter.1.gz usr/share/man/man1/dkim-milter.py.1.gz
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.lintian-overrides
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.lintian-overrides (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.lintian-overrides 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,4 @@
+# This package will not be rewritten in another language as being in Python is
+# a core part of the package, so the language extension will not be a problem.
+dkim-milter-python: script-with-language-extension usr/bin/dkim-milter.py
+
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.manpages
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.manpages (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.manpages 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,2 @@
+debian/dkim-milter.1
+
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.postinst
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.postinst (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.postinst 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+ if ! id -u dkim-milter-python >/dev/null 2>&1; then
+ adduser --quiet --system --group --home /var/run/dkim-milter-python dkim-milter-python
+ elif [ -n "$2" ]; then
+ addgroup --quiet --system dkim-milter-python
+ usermod -g dkim-milter-python dkim-milter-python
+ fi
+ chown -R dkim-milter-python:dkim-milter-python /var/log/dkim-milter-python
+fi
+
+#DEBHELPER#
+
+exit 0
+
Added: packages/pymilter-milters/trunk/debian/dkim-milter-python.postrm
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter-python.postrm (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter-python.postrm 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "purge" ] ; then
+ for dir in /etc/dkim-milter-python/ /var/log/dkim-milter-python; do
+ if [ -d "$dir" ]; then
+ rmdir "$dir" --ignore-fail-on-non-empty || true
+ fi
+ done
+fi
+
+
+#DEBHELPER#
+
+exit 0
+
Added: packages/pymilter-milters/trunk/debian/dkim-milter.1
===================================================================
--- packages/pymilter-milters/trunk/debian/dkim-milter.1 (rev 0)
+++ packages/pymilter-milters/trunk/debian/dkim-milter.1 2012-11-24 02:55:16 UTC (rev 9266)
@@ -0,0 +1,160 @@
+\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.\"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "dkim\-milter 1"
+.TH dkim\-milter 1 "2012-11-22"
+.SH "NAME"
+spfmilter \- pure-Python DKIM milter
+.SH "VERSION"
+.IX Header "VERSION"
+0\.8\.17
+
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+
+This is a simple milter for DKIM signing and verification written in Python.
+
+DKIM is an emsil authentication technlogy. For more information about DKIM,
+please see http://www.dkim.org/.
+
+.SH "USAGE"
+.IX Header "USAGE"
+
+To use this with sendmail, add the following to sendmail.cf:
+
+O InputMailFilters=%s
+X%s, S=local:%s
+
+See the sendmail README for libmilter.
+
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+This version of \fBdkim\-milter\fR was written by Stuart Gathman <stuart at bmsi.com>.
+.PP
+This man-page was created by Scott Kitterman <scott at kitterman.com>.
Modified: packages/pymilter-milters/trunk/debian/patches/series
===================================================================
--- packages/pymilter-milters/trunk/debian/patches/series 2012-11-20 21:44:16 UTC (rev 9265)
+++ packages/pymilter-milters/trunk/debian/patches/series 2012-11-24 02:55:16 UTC (rev 9266)
@@ -1 +1,2 @@
spfmilter-debian-config.patch
+dkim-milter-debian-config.patch
Modified: packages/pymilter-milters/trunk/debian/patches/spfmilter-debian-config.patch
===================================================================
--- packages/pymilter-milters/trunk/debian/patches/spfmilter-debian-config.patch 2012-11-20 21:44:16 UTC (rev 9265)
+++ packages/pymilter-milters/trunk/debian/patches/spfmilter-debian-config.patch 2012-11-24 02:55:16 UTC (rev 9266)
@@ -1,9 +1,9 @@
This is a distro patch to integrate spf-milter-python properly in Debian and
derived systems. It has not gone, and does not need to go, upstream.
-Index: pymilter-milters-0.8.13/spfmilter.cfg
+Index: pymilter-milters-0.8.17/spfmilter.cfg
===================================================================
---- pymilter-milters-0.8.13.orig/spfmilter.cfg 2010-06-25 09:48:57.297393452 -0400
-+++ pymilter-milters-0.8.13/spfmilter.cfg 2010-06-25 09:49:10.028395235 -0400
+--- pymilter-milters-0.8.17.orig/spfmilter.cfg 2012-11-23 19:49:21.078373071 -0500
++++ pymilter-milters-0.8.17/spfmilter.cfg 2012-11-23 19:49:25.066372968 -0500
@@ -1,6 +1,6 @@
[milter]
# The socket used to communicate with sendmail
@@ -12,10 +12,10 @@
# Name of the milter given to sendmail
name = pyspffilter
# Trusted relays such as secondary MXes that should not have SPF checked.
-Index: pymilter-milters-0.8.13/spfmilter.py
+Index: pymilter-milters-0.8.17/spfmilter.py
===================================================================
---- pymilter-milters-0.8.13.orig/spfmilter.py 2010-06-25 09:49:01.156394811 -0400
-+++ pymilter-milters-0.8.13/spfmilter.py 2010-06-25 09:49:10.032395674 -0400
+--- pymilter-milters-0.8.17.orig/spfmilter.py 2012-11-23 19:49:21.078373071 -0500
++++ pymilter-milters-0.8.17/spfmilter.py 2012-11-23 19:49:25.066372968 -0500
@@ -1,3 +1,4 @@
+#!/usr/bin/python
# A simple SPF milter.
@@ -30,28 +30,27 @@
import Milter
import spf
import syslog
-@@ -231,16 +234,16 @@
+@@ -267,16 +270,14 @@
Milter.factory = spfMilter
Milter.set_flags(Milter.CHGHDRS + Milter.ADDHDRS)
global config
- config = read_config(['spfmilter.cfg','/etc/mail/spfmilter.cfg'])
-+ config = read_config(['spfmilter.cfg','/etc/spf-milter-python/spfmilter.cfg'])
++ config = read_config(['spfmilter.cfg','/etc/mail//etc/spf-milter-python/spfmilter.cfg'])
miltername = config.miltername
socketname = config.socketname
- print """To use this with sendmail, add the following to sendmail.cf:
-+ ownpid = os.getpid()
-+ if not os.path.isfile('/var/run/spf-milter-python/spfmilter.pid'):
-+ pidfile = open('/var/run/spf-milter-python/spfmilter.pid',mode='w+',buffsize=-1)
-+ pidfile.write(ownpid)
-+ pidfile.flush()
-+ pidfile.close()
-
+-
-O InputMailFilters=%s
-X%s, S=local:%s
-
-See the sendmail README for libmilter.
-sample spfmilter startup""" % (miltername,miltername,socketname)
++ ownpid = os.getpid()
++ if not os.path.isfile('/var/run/spf-milter-python/spfmilter.pid'):
++ pidfile = open('/var/run/spf-milter-python/spfmilter.pid',mode='w+')
++ pidfile.write(ownpid)
++ pidfile.flush()
++ pidfile.close()
sys.stdout.flush()
- Milter.runmilter("pyspffilter",socketname,240)
+ Milter.runmilter(miltername,socketname,240)
- print "sample spfmilter shutdown"
-+
Modified: packages/pymilter-milters/trunk/debian/spf-milter-python.init
===================================================================
--- packages/pymilter-milters/trunk/debian/spf-milter-python.init 2012-11-20 21:44:16 UTC (rev 9265)
+++ packages/pymilter-milters/trunk/debian/spf-milter-python.init 2012-11-24 02:55:16 UTC (rev 9266)
@@ -118,6 +118,10 @@
$RUNDIR/$NAME.pid --exec $DAEMON
echo "$NAME."
;;
+
+ status)
+ status_of_proc -p /var/run/spf-milter-python/spfmilter.pid /usr/bin/spfmilter.py spfmilter.py
+ ;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|force-reload|restart|}" >&2
More information about the Python-apps-commits
mailing list