Rename project to pymodmilter

This commit is contained in:
2020-04-20 11:50:01 +02:00
parent c6e1408732
commit 594d3a466b
6 changed files with 20 additions and 20 deletions

View File

@@ -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.
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/>
## 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"
Any available configuration option can be set in the global section as default instead of in a rule section.

View File

@@ -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.
#
# Comments: use '#' for comment lines and ';' (following a space) for inline comments.

View File

@@ -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.
# Examples:
@@ -13,5 +13,5 @@ SOCKET="inet:8898@127.0.0.1"
# USER="daemon"
# USER="daemon:nobody"
# Optional parameters for pyheader-milter
# Optional parameters for pymodmilter
# MILTER_OPTS=""

View File

@@ -5,7 +5,7 @@ socket="${SOCKET:-}"
milter_opts="${MILTER_OPTS:-}"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/pyheader-milter"
command="/usr/bin/pymodmilter"
command_args="-s ${socket} ${milter_opts}"
command_background=true
start_stop_daemon_args="--user ${user}"

View File

@@ -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
# the Free Software Foundation, either version 3 of the License, or
# (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
# 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 PyHeader-Milter. If not, see <http://www.gnu.org/licenses/>.
# along with PyMod-Milter. If not, see <http://www.gnu.org/licenses/>.
#
__all__ = [
@@ -313,15 +313,15 @@ class HeaderMilter(Milter.Base):
def main():
"Run PyHeader-Milter."
"Run PyMod-Milter."
# parse command line
parser = argparse.ArgumentParser(
description="PyHeader milter daemon",
description="PyMod milter daemon",
formatter_class=lambda prog: argparse.HelpFormatter(
prog, max_help_position=45, width=140))
parser.add_argument(
"-c", "--config", help="Config file to read.",
default="/etc/pyheader-milter.conf")
default="/etc/pymodmilter.conf")
parser.add_argument(
"-s",
"--socket",
@@ -341,7 +341,7 @@ def main():
# setup logging
loglevel = logging.INFO
logname = "pyheader-milter"
logname = "pymodmilter"
syslog_name = logname
if args.debug:
loglevel = logging.DEBUG
@@ -487,7 +487,7 @@ def main():
sysloghandler.setFormatter(formatter)
root_logger.addHandler(sysloghandler)
logger.info("PyHeader-Milter starting")
logger.info("pymodmilter starting")
HeaderMilter.set_rules(rules)
# register milter factory class
@@ -496,11 +496,11 @@ def main():
rc = 0
try:
Milter.runmilter("pyheader-milter", socketname=args.socket, timeout=30)
Milter.runmilter("pymodmilter", socketname=args.socket, timeout=30)
except Milter.milter.error as e:
logger.error(e)
rc = 255
logger.info("PyHeader-Milter terminated")
logger.info("pymodmilter terminated")
sys.exit(rc)

View File

@@ -4,15 +4,15 @@ def read_file(fname):
with open(fname, 'r') as f:
return f.read()
setup(name = "pyheadermilter",
setup(name = "pymodmilter",
version = "0.0.8",
author = "Thomas Oettli",
author_email = "spacefreak@noop.ch",
description = "A pymilter based sendmail/postfix pre-queue filter.",
license = "GPL 3",
keywords = "header milter",
url = "https://github.com/spacefreak86/pyheader-milter",
packages = ["pyheadermilter"],
url = "https://github.com/spacefreak86/pymodmilter",
packages = ["pymodmilter"],
long_description = read_file("README.md"),
long_description_content_type="text/markdown",
classifiers = [
@@ -28,7 +28,7 @@ setup(name = "pyheadermilter",
],
entry_points = {
"console_scripts": [
"pyheader-milter=pyheadermilter:main"
"pymodmilter=pymodmilter:main"
]
},
install_requires = ["pymilter", "netaddr"],