mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Courier pythonfilter
pythonfilter is a framework for developing courierfilter programs in Python. The pythonfilter program itself is a multi-threaded daemon that loads filters as python modules and passes the control and data files from courier to each module in turn. pythonfilter includes several modules that provide utility functions. These modules are found in the "courier" directory. The "config" module provides functions to access or interpret Courier's configuration settings. The "control" module provides functions to interpret Courier's control files. pythonfilter is distributed under the GNU General Public License (GPL), as described in the COPYING file. PR: ports/101862 Submitted by: Milan Obuch
This commit is contained in:
parent
b510d7776d
commit
e74f9da761
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=174489
@ -45,6 +45,7 @@
|
||||
SUBDIR += courier
|
||||
SUBDIR += courier-authlib-vchkpw
|
||||
SUBDIR += courier-imap
|
||||
SUBDIR += courier-pythonfilter
|
||||
SUBDIR += couriergraph
|
||||
SUBDIR += crashecho
|
||||
SUBDIR += crm114
|
||||
|
38
mail/courier-pythonfilter/Makefile
Normal file
38
mail/courier-pythonfilter/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
# New ports collection makefile for: courier-pythonfilter
|
||||
# Date created: Jun 19, 2006
|
||||
# Whom: Milan Obuch
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= courier-pythonfilter
|
||||
PORTVERSION= 0.9
|
||||
CATEGORIES= mail python
|
||||
MASTER_SITES= http://phantom.dragonsdawn.net/~gordon/courier-patches/courier-pythonfilter/
|
||||
|
||||
MAINTAINER= bsd@dino.sk
|
||||
COMMENT= Framework for courier filter development in python
|
||||
|
||||
BUILD_DEPENDS= courier-config:${PORTSDIR}/mail/courier
|
||||
|
||||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS=yes
|
||||
|
||||
MAILOWN= courier
|
||||
MAILGRP= courier
|
||||
MAILUID= 465
|
||||
MAILGID= 465
|
||||
|
||||
LOCALSTATEDIR= /var/spool/courier
|
||||
SCRIPTSDIR= ${PREFIX}/libexec/filters
|
||||
|
||||
post-extract:
|
||||
${MV} ${WRKSRC}/filters/whitelist-auth.py ${WRKSRC}/filters/whitelist_auth.py
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${LOCALSTATEDIR}/pythonfilter
|
||||
${CHOWN} ${MAILOWN}:${MAILGRP} ${LOCALSTATEDIR}/pythonfilter
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
PYDISTUTILS_INSTALLARGS:= ${PYDISTUTILS_INSTALLARGS} --install-scripts=${SCRIPTSDIR}
|
3
mail/courier-pythonfilter/distinfo
Normal file
3
mail/courier-pythonfilter/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (courier-pythonfilter-0.9.tar.gz) = 06d2c901ba6b700298da1c649d2788b9
|
||||
SHA256 (courier-pythonfilter-0.9.tar.gz) = 6840d63817ccae143f2c889d31e91f73a05966db350a7c5472e4859b278c84b3
|
||||
SIZE (courier-pythonfilter-0.9.tar.gz) = 27084
|
11
mail/courier-pythonfilter/files/patch-filters__comeagain.py
Normal file
11
mail/courier-pythonfilter/files/patch-filters__comeagain.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- filters/comeagain.py.orig Mon Dec 13 09:26:13 2004
|
||||
+++ filters/comeagain.py Thu Jul 27 08:34:25 2006
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
# Keep a dictionary of sender/recipient pairs that we've seen before
|
||||
_sendersLock = thread.allocate_lock()
|
||||
-_sendersDir = '/var/state/pythonfilter'
|
||||
+_sendersDir = '/var/spool/courier/pythonfilter'
|
||||
try:
|
||||
_senders = anydbm.open(_sendersDir + '/correspondents', 'c')
|
||||
except:
|
11
mail/courier-pythonfilter/files/patch-filters__dialback.py
Normal file
11
mail/courier-pythonfilter/files/patch-filters__dialback.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- filters/dialback.py.orig Sun Dec 26 00:01:02 2004
|
||||
+++ filters/dialback.py Thu Jul 27 08:33:13 2006
|
||||
@@ -32,7 +32,7 @@
|
||||
# Keep a dictionary of authenticated senders to avoid more work than
|
||||
# required.
|
||||
_sendersLock = thread.allocate_lock()
|
||||
-_sendersDir = '/var/state/pythonfilter'
|
||||
+_sendersDir = '/var/spool/courier/pythonfilter'
|
||||
try:
|
||||
_goodSenders = anydbm.open(_sendersDir + '/goodsenders', 'c')
|
||||
_badSenders = anydbm.open(_sendersDir + '/badsenders', 'c')
|
13
mail/courier-pythonfilter/files/patch-pythonfilter.conf
Normal file
13
mail/courier-pythonfilter/files/patch-pythonfilter.conf
Normal file
@ -0,0 +1,13 @@
|
||||
--- pythonfilter.conf.orig Thu Jul 27 07:44:46 2006
|
||||
+++ pythonfilter.conf Thu Jul 27 07:44:56 2006
|
||||
@@ -11,8 +11,8 @@
|
||||
# whitelist: exempts IP addresses for which you relay from further filtering.
|
||||
whitelist
|
||||
|
||||
-# whitelist-auth: exempts users who authenticate from further filtering.
|
||||
-whitelist-auth
|
||||
+# whitelist_auth: exempts users who authenticate from further filtering.
|
||||
+whitelist_auth
|
||||
|
||||
# spfcheck: checks the sender against SPF records.
|
||||
# Requires: spf - http://www.wayforward.net/spf/
|
9
mail/courier-pythonfilter/files/patch-setup.py
Normal file
9
mail/courier-pythonfilter/files/patch-setup.py
Normal file
@ -0,0 +1,9 @@
|
||||
--- setup.py.orig Mon Mar 13 20:44:45 2006
|
||||
+++ setup.py Wed Jul 26 21:21:34 2006
|
||||
@@ -15,5 +15,5 @@
|
||||
scripts=['pythonfilter'],
|
||||
packages=['courier', 'pythonfilter'],
|
||||
package_dir = {'pythonfilter': 'filters'},
|
||||
- data_files=[('/etc/', ['pythonfilter.conf'])]
|
||||
+ data_files=[('/usr/local/etc/', ['pythonfilter.conf'])]
|
||||
)
|
26
mail/courier-pythonfilter/files/patch-whitelist_auth.py
Normal file
26
mail/courier-pythonfilter/files/patch-whitelist_auth.py
Normal file
@ -0,0 +1,26 @@
|
||||
--- filters/whitelist_auth.py.orig Sun Dec 26 00:01:02 2004
|
||||
+++ filters/whitelist_auth.py Thu Jul 27 07:46:24 2006
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
-# whitelist-auth -- Courier filter which exempts authenticated users from filtering
|
||||
+# whitelist_auth -- Courier filter which exempts authenticated users from filtering
|
||||
# Copyright (C) 2004 Gordon Messmer <gordon@dragonsdawn.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -28,7 +28,7 @@
|
||||
_auth_regex = re.compile(r'\(AUTH: \w* \w*([^)]*)\)\s*by %s' % _hostname)
|
||||
|
||||
# Record in the system log that this filter was initialized.
|
||||
-sys.stderr.write('Initialized the "whitelist-auth" python filter\n')
|
||||
+sys.stderr.write('Initialized the "whitelist_auth" python filter\n')
|
||||
|
||||
|
||||
def checkHeader(header):
|
||||
@@ -105,6 +105,6 @@
|
||||
# is whitelisted, or nothing to indicate that the remaining
|
||||
# filters would be run.
|
||||
if not sys.argv[1:]:
|
||||
- print 'Use: whitelist-auth.py <control file>'
|
||||
+ print 'Use: whitelist_auth.py <control file>'
|
||||
sys.exit(1)
|
||||
print doFilter(sys.argv[1], [])
|
15
mail/courier-pythonfilter/pkg-descr
Normal file
15
mail/courier-pythonfilter/pkg-descr
Normal file
@ -0,0 +1,15 @@
|
||||
Courier pythonfilter
|
||||
|
||||
pythonfilter is a framework for developing courierfilter programs in
|
||||
Python. The pythonfilter program itself is a multi-threaded daemon
|
||||
that loads filters as python modules and passes the control and data
|
||||
files from courier to each module in turn.
|
||||
|
||||
pythonfilter includes several modules that provide utility functions.
|
||||
These modules are found in the "courier" directory. The "config"
|
||||
module provides functions to access or interpret Courier's
|
||||
configuration settings. The "control" module provides functions
|
||||
to interpret Courier's control files.
|
||||
|
||||
pythonfilter is distributed under the GNU General Public License
|
||||
(GPL), as described in the COPYING file.
|
52
mail/courier-pythonfilter/pkg-plist
Normal file
52
mail/courier-pythonfilter/pkg-plist
Normal file
@ -0,0 +1,52 @@
|
||||
etc/pythonfilter.conf
|
||||
libexec/filters/pythonfilter
|
||||
%%PYTHON_SITELIBDIR%%/courier/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/courier/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/courier/__init__.pyo
|
||||
%%PYTHON_SITELIBDIR%%/courier/config.py
|
||||
%%PYTHON_SITELIBDIR%%/courier/config.pyc
|
||||
%%PYTHON_SITELIBDIR%%/courier/config.pyo
|
||||
%%PYTHON_SITELIBDIR%%/courier/control.py
|
||||
%%PYTHON_SITELIBDIR%%/courier/control.pyc
|
||||
%%PYTHON_SITELIBDIR%%/courier/control.pyo
|
||||
%%PYTHON_SITELIBDIR%%/courier/xfilter.py
|
||||
%%PYTHON_SITELIBDIR%%/courier/xfilter.pyc
|
||||
%%PYTHON_SITELIBDIR%%/courier/xfilter.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/__init__.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/attachments.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/attachments.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/attachments.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/clamav.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/clamav.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/clamav.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/comeagain.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/comeagain.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/comeagain.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/debug.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/debug.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/debug.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/dialback.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/dialback.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/dialback.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/noduplicates.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/noduplicates.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/noduplicates.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/nosuccessdsn.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/nosuccessdsn.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/nosuccessdsn.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/ratelimit.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/ratelimit.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/ratelimit.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/spfcheck.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/spfcheck.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/spfcheck.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/whitelist_auth.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/whitelist_auth.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/whitelist_auth.pyo
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/whitelist.py
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/whitelist.pyc
|
||||
%%PYTHON_SITELIBDIR%%/pythonfilter/whitelist.pyo
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/courier
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/pythonfilter
|
Loading…
Reference in New Issue
Block a user