Rename project to pymodmilter
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# pyheader-milter
|
# pymodmilter
|
||||||
A pymilter based sendmail/postfix pre-queue filter with the ability to add, remove and modify e-mail headers.
|
A pymilter based sendmail/postfix pre-queue filter with the ability to add, remove and modify e-mail headers.
|
||||||
|
|
||||||
The project is currently in beta status, but it is already used in a productive enterprise environment which processes about a million e-mails per month.
|
The project is currently in beta status, but it is already used in a productive enterprise environment which processes about a million e-mails per month.
|
||||||
@@ -8,7 +8,7 @@ The project is currently in beta status, but it is already used in a productive
|
|||||||
* netaddr <https://github.com/drkjam/netaddr/>
|
* netaddr <https://github.com/drkjam/netaddr/>
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
The pyheader-milter uses an INI-style configuration file. The sections are described below.
|
The pymodmilter uses an INI-style configuration file. The sections are described below.
|
||||||
|
|
||||||
### Section "global"
|
### Section "global"
|
||||||
Any available configuration option can be set in the global section as default instead of in a rule section.
|
Any available configuration option can be set in the global section as default instead of in a rule section.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# This is an example /etc/pyheader-milter.conf file.
|
# This is an example /etc/pymodmilter.conf file.
|
||||||
# Copy it into place before use.
|
# Copy it into place before use.
|
||||||
#
|
#
|
||||||
# Comments: use '#' for comment lines and ';' (following a space) for inline comments.
|
# Comments: use '#' for comment lines and ';' (following a space) for inline comments.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# /etc/conf.d/pyheader-milter: config file for /etc/init.d/pyheader-milter
|
# /etc/conf.d/pymodmilter: config file for /etc/init.d/pymodmilter
|
||||||
|
|
||||||
# Set the socket used to communicate with the MTA.
|
# Set the socket used to communicate with the MTA.
|
||||||
# Examples:
|
# Examples:
|
||||||
@@ -13,5 +13,5 @@ SOCKET="inet:8898@127.0.0.1"
|
|||||||
# USER="daemon"
|
# USER="daemon"
|
||||||
# USER="daemon:nobody"
|
# USER="daemon:nobody"
|
||||||
|
|
||||||
# Optional parameters for pyheader-milter
|
# Optional parameters for pymodmilter
|
||||||
# MILTER_OPTS=""
|
# MILTER_OPTS=""
|
||||||
@@ -5,7 +5,7 @@ socket="${SOCKET:-}"
|
|||||||
milter_opts="${MILTER_OPTS:-}"
|
milter_opts="${MILTER_OPTS:-}"
|
||||||
|
|
||||||
pidfile="/run/${RC_SVCNAME}.pid"
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
command="/usr/bin/pyheader-milter"
|
command="/usr/bin/pymodmilter"
|
||||||
command_args="-s ${socket} ${milter_opts}"
|
command_args="-s ${socket} ${milter_opts}"
|
||||||
command_background=true
|
command_background=true
|
||||||
start_stop_daemon_args="--user ${user}"
|
start_stop_daemon_args="--user ${user}"
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# PyHeader-Milter is free software: you can redistribute it and/or modify
|
# PyMod-Milter is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# PyHeader-Milter is distributed in the hope that it will be useful,
|
# PyMod-Milter is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with PyHeader-Milter. If not, see <http://www.gnu.org/licenses/>.
|
# along with PyMod-Milter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
@@ -313,15 +313,15 @@ class HeaderMilter(Milter.Base):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"Run PyHeader-Milter."
|
"Run PyMod-Milter."
|
||||||
# parse command line
|
# parse command line
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="PyHeader milter daemon",
|
description="PyMod milter daemon",
|
||||||
formatter_class=lambda prog: argparse.HelpFormatter(
|
formatter_class=lambda prog: argparse.HelpFormatter(
|
||||||
prog, max_help_position=45, width=140))
|
prog, max_help_position=45, width=140))
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-c", "--config", help="Config file to read.",
|
"-c", "--config", help="Config file to read.",
|
||||||
default="/etc/pyheader-milter.conf")
|
default="/etc/pymodmilter.conf")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-s",
|
"-s",
|
||||||
"--socket",
|
"--socket",
|
||||||
@@ -341,7 +341,7 @@ def main():
|
|||||||
|
|
||||||
# setup logging
|
# setup logging
|
||||||
loglevel = logging.INFO
|
loglevel = logging.INFO
|
||||||
logname = "pyheader-milter"
|
logname = "pymodmilter"
|
||||||
syslog_name = logname
|
syslog_name = logname
|
||||||
if args.debug:
|
if args.debug:
|
||||||
loglevel = logging.DEBUG
|
loglevel = logging.DEBUG
|
||||||
@@ -487,7 +487,7 @@ def main():
|
|||||||
sysloghandler.setFormatter(formatter)
|
sysloghandler.setFormatter(formatter)
|
||||||
root_logger.addHandler(sysloghandler)
|
root_logger.addHandler(sysloghandler)
|
||||||
|
|
||||||
logger.info("PyHeader-Milter starting")
|
logger.info("pymodmilter starting")
|
||||||
HeaderMilter.set_rules(rules)
|
HeaderMilter.set_rules(rules)
|
||||||
|
|
||||||
# register milter factory class
|
# register milter factory class
|
||||||
@@ -496,11 +496,11 @@ def main():
|
|||||||
|
|
||||||
rc = 0
|
rc = 0
|
||||||
try:
|
try:
|
||||||
Milter.runmilter("pyheader-milter", socketname=args.socket, timeout=30)
|
Milter.runmilter("pymodmilter", socketname=args.socket, timeout=30)
|
||||||
except Milter.milter.error as e:
|
except Milter.milter.error as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
rc = 255
|
rc = 255
|
||||||
logger.info("PyHeader-Milter terminated")
|
logger.info("pymodmilter terminated")
|
||||||
sys.exit(rc)
|
sys.exit(rc)
|
||||||
|
|
||||||
|
|
||||||
8
setup.py
8
setup.py
@@ -4,15 +4,15 @@ def read_file(fname):
|
|||||||
with open(fname, 'r') as f:
|
with open(fname, 'r') as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
setup(name = "pyheadermilter",
|
setup(name = "pymodmilter",
|
||||||
version = "0.0.8",
|
version = "0.0.8",
|
||||||
author = "Thomas Oettli",
|
author = "Thomas Oettli",
|
||||||
author_email = "spacefreak@noop.ch",
|
author_email = "spacefreak@noop.ch",
|
||||||
description = "A pymilter based sendmail/postfix pre-queue filter.",
|
description = "A pymilter based sendmail/postfix pre-queue filter.",
|
||||||
license = "GPL 3",
|
license = "GPL 3",
|
||||||
keywords = "header milter",
|
keywords = "header milter",
|
||||||
url = "https://github.com/spacefreak86/pyheader-milter",
|
url = "https://github.com/spacefreak86/pymodmilter",
|
||||||
packages = ["pyheadermilter"],
|
packages = ["pymodmilter"],
|
||||||
long_description = read_file("README.md"),
|
long_description = read_file("README.md"),
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
classifiers = [
|
classifiers = [
|
||||||
@@ -28,7 +28,7 @@ setup(name = "pyheadermilter",
|
|||||||
],
|
],
|
||||||
entry_points = {
|
entry_points = {
|
||||||
"console_scripts": [
|
"console_scripts": [
|
||||||
"pyheader-milter=pyheadermilter:main"
|
"pymodmilter=pymodmilter:main"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
install_requires = ["pymilter", "netaddr"],
|
install_requires = ["pymilter", "netaddr"],
|
||||||
|
|||||||
Reference in New Issue
Block a user