diff --git a/MANIFEST.in b/MANIFEST.in
index 89bd49f..f29efd2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
include LICENSE README.md
-recursive-include pymodmilter/docs *
-recursive-include pymodmilter/misc *
+recursive-include pyquarantine/docs *
+recursive-include pyquarantine/misc *
diff --git a/README.md b/README.md
index a349d98..2c5e99f 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,27 @@
-# pymodmilter
+# pyquarantine
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 that processes about a million e-mails per month.
The basic idea is to define rules with conditions and actions which are processed when all conditions are true.
## Dependencies
-Pymodmilter is depending on these python packages, but they are installed automatically if you are working with pip.
-* [pymilter](https://pythonhosted.org/pymilter/)
-* [netaddr](https://github.com/drkjam/netaddr/)
+pyquarantine is depending on these python packages, but they are installed automatically if you are working with pip.
+* [jsonschema](https://github.com/Julian/jsonschema)
+* [pymilter](https://github.com/sdgathman/pymilter)
+* [netaddr](https://github.com/drkjam/netaddr)
+* [peewee](https://github.com/coleifer/peewee)
* [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/)
## Installation
-* Install pymodmilter with pip and copy the example config file.
+* Install pyquarantine with pip and copy the example config file.
```sh
-pip install pymodmilter
-cp /etc/pymodmilter/pymodmilter.conf.example /etc/pymodmilter/pymodmilter.conf
+pip install pyquarantine
+cp /etc/pyquarantine/pyquarantine.conf.example /etc/pyquarantine/pyquarantine.conf
```
-* Modify /etc/pymodmilter/pymodmilter.conf according to your needs.
+* Modify /etc/pyquarantine/pyquarantine.conf according to your needs.
## Configuration options
-Pymodmilter uses a config file in JSON format. The config file has to be JSON valid with the exception of allowed comment lines starting with **#**. The options are described below.
+pyquarantine uses a config file in JSON format. The config file has to be JSON valid with the exception of allowed comment lines starting with **#**. The options are described below.
Rules and actions are processed in the given order.
### Global
diff --git a/pymodmilter/__init__.py b/pyquarantine/__init__.py
similarity index 96%
rename from pymodmilter/__init__.py
rename to pyquarantine/__init__.py
index 34c5d61..c46681b 100644
--- a/pymodmilter/__init__.py
+++ b/pyquarantine/__init__.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = [
@@ -27,9 +27,9 @@ __all__ = [
"whitelist",
"ModifyMilter"]
-__version__ = "1.2.0"
+__version__ = "2.0.0"
-from pymodmilter import _runtime_patches
+from pyquarantine import _runtime_patches
import Milter
import logging
@@ -44,9 +44,9 @@ from email.policy import SMTPUTF8
from io import BytesIO
from netaddr import IPNetwork, AddrFormatError
-from pymodmilter.base import CustomLogger, MilterMessage
-from pymodmilter.base import replace_illegal_chars
-from pymodmilter.rule import Rule
+from pyquarantine.base import CustomLogger, MilterMessage
+from pyquarantine.base import replace_illegal_chars
+from pyquarantine.rule import Rule
class ModifyMilter(Milter.Base):
diff --git a/pymodmilter/_runtime_patches.py b/pyquarantine/_runtime_patches.py
similarity index 97%
rename from pymodmilter/_runtime_patches.py
rename to pyquarantine/_runtime_patches.py
index 4d868ea..aef4656 100644
--- a/pymodmilter/_runtime_patches.py
+++ b/pyquarantine/_runtime_patches.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
import encodings
diff --git a/pymodmilter/action.py b/pyquarantine/action.py
similarity index 87%
rename from pymodmilter/action.py
rename to pyquarantine/action.py
index ce0deda..cb30822 100644
--- a/pymodmilter/action.py
+++ b/pyquarantine/action.py
@@ -1,21 +1,21 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = ["Action"]
-from pymodmilter import modify, notify, storage
-from pymodmilter.conditions import Conditions
+from pyquarantine import modify, notify, storage
+from pyquarantine.conditions import Conditions
class Action:
diff --git a/pymodmilter/base.py b/pyquarantine/base.py
similarity index 91%
rename from pymodmilter/base.py
rename to pyquarantine/base.py
index a88671a..70be625 100644
--- a/pymodmilter/base.py
+++ b/pyquarantine/base.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = [
diff --git a/pymodmilter/cli.py b/pyquarantine/cli.py
similarity index 99%
rename from pymodmilter/cli.py
rename to pyquarantine/cli.py
index 2f7b8c8..d7d733e 100644
--- a/pymodmilter/cli.py
+++ b/pyquarantine/cli.py
@@ -20,8 +20,8 @@ import logging.handlers
import sys
import time
-from pymodmilter.config import get_milter_config
-from pymodmilter import __version__ as version
+from pyquarantine.config import get_milter_config
+from pyquarantine import __version__ as version
def _get_quarantine(quarantines, name):
@@ -316,7 +316,7 @@ def main():
formatter_class=formatter_class)
parser.add_argument(
"-c", "--config", help="Config file to read.",
- default="/etc/pymodmilter/pymodmilter.conf")
+ default="/etc/pyquarantine/pyquarantine.conf")
parser.add_argument(
"-d", "--debug",
help="Log debugging messages.",
diff --git a/pymodmilter/conditions.py b/pyquarantine/conditions.py
similarity index 95%
rename from pymodmilter/conditions.py
rename to pyquarantine/conditions.py
index 9761c2f..3ec4b88 100644
--- a/pymodmilter/conditions.py
+++ b/pyquarantine/conditions.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = ["Conditions"]
@@ -18,8 +18,8 @@ import logging
import re
from netaddr import IPAddress, IPNetwork, AddrFormatError
-from pymodmilter import CustomLogger
-from pymodmilter.whitelist import DatabaseWhitelist
+from pyquarantine import CustomLogger
+from pyquarantine.whitelist import DatabaseWhitelist
class Conditions:
diff --git a/pymodmilter/config.py b/pyquarantine/config.py
similarity index 98%
rename from pymodmilter/config.py
rename to pyquarantine/config.py
index 6b6f336..c729ad3 100644
--- a/pymodmilter/config.py
+++ b/pyquarantine/config.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = [
diff --git a/pymodmilter/docs/pymodmilter.conf.example b/pyquarantine/docs/pyquarantine.conf.example
similarity index 96%
rename from pymodmilter/docs/pymodmilter.conf.example
rename to pyquarantine/docs/pyquarantine.conf.example
index e7e5d02..c062f75 100644
--- a/pymodmilter/docs/pymodmilter.conf.example
+++ b/pyquarantine/docs/pyquarantine.conf.example
@@ -1,4 +1,4 @@
-# This is an example /etc/pymodmilter.conf file.
+# This is an example /etc/pyquarantine/pyquarantine.conf file.
# Copy it into place before use.
#
# The file is in JSON format.
@@ -176,14 +176,14 @@
# Notes: Path to a file which contains the html representation of the disclaimer.
# Value: [ FILE_PATH ]
#
- "html_template": "/etc/pymodmilter/templates/disclaimer_html.template",
+ "html_template": "/etc/pyquarantine/templates/disclaimer_html.template",
# Option: text_template
# Type: String
# Notes: Path to a file which contains the text representation of the disclaimer.
# Value: [ FILE_PATH ]
#
- "text_template": "/etc/pymodmilter/templates/disclaimer_text.template",
+ "text_template": "/etc/pyquarantine/templates/disclaimer_text.template",
# Option: error_policy
# Type: String
diff --git a/pymodmilter/docs/templates/disclaimer_html.template b/pyquarantine/docs/templates/disclaimer_html.template
similarity index 100%
rename from pymodmilter/docs/templates/disclaimer_html.template
rename to pyquarantine/docs/templates/disclaimer_html.template
diff --git a/pymodmilter/docs/templates/disclaimer_text.template b/pyquarantine/docs/templates/disclaimer_text.template
similarity index 100%
rename from pymodmilter/docs/templates/disclaimer_text.template
rename to pyquarantine/docs/templates/disclaimer_text.template
diff --git a/pyquarantine/docs/templates/notification.template b/pyquarantine/docs/templates/notification.template
new file mode 100644
index 0000000..f41a4ad
--- /dev/null
+++ b/pyquarantine/docs/templates/notification.template
@@ -0,0 +1,29 @@
+
+
+ Quarantine notification
+
+
+ | Envelope-From: |
+ {ENVELOPE_FROM} |
+
+
+ | From: |
+ {FROM} |
+
+
+ | Envelope-To: |
+ {ENVELOPE_TO} |
+
+
+ | To: |
+ {TO} |
+
+
+ | Subject: |
+ {SUBJECT} |
+
+
+ Preview of the original e-mail
+ {HTML_TEXT}
+
+
diff --git a/pyquarantine/docs/templates/removed.png b/pyquarantine/docs/templates/removed.png
new file mode 100644
index 0000000..a5081b7
Binary files /dev/null and b/pyquarantine/docs/templates/removed.png differ
diff --git a/pymodmilter/mailer.py b/pyquarantine/mailer.py
similarity index 92%
rename from pymodmilter/mailer.py
rename to pyquarantine/mailer.py
index 51a913c..b5bea6c 100644
--- a/pymodmilter/mailer.py
+++ b/pyquarantine/mailer.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
import logging
diff --git a/pymodmilter/misc/openrc/pymodmilter.confd b/pyquarantine/misc/openrc/pyquarantine-milter.confd
similarity index 56%
rename from pymodmilter/misc/openrc/pymodmilter.confd
rename to pyquarantine/misc/openrc/pyquarantine-milter.confd
index 6c5e71d..277e442 100644
--- a/pymodmilter/misc/openrc/pymodmilter.confd
+++ b/pyquarantine/misc/openrc/pyquarantine-milter.confd
@@ -1,8 +1,8 @@
-# /etc/conf.d/pymodmilter: config file for /etc/init.d/pymodmilter
+# /etc/conf.d/pyquarantine: config file for /etc/init.d/pyquarantine
# Start the daemon as the user. You can optionally append a group name here also.
# USER="daemon"
# USER="daemon:nobody"
-# Optional parameters for pymodmilter
+# Optional parameters for pyquarantine
# MILTER_OPTS=""
diff --git a/pymodmilter/misc/openrc/pymodmilter.initd b/pyquarantine/misc/openrc/pyquarantine-milter.initd
similarity index 95%
rename from pymodmilter/misc/openrc/pymodmilter.initd
rename to pyquarantine/misc/openrc/pyquarantine-milter.initd
index 70160aa..8bf697f 100755
--- a/pymodmilter/misc/openrc/pymodmilter.initd
+++ b/pyquarantine/misc/openrc/pyquarantine-milter.initd
@@ -4,7 +4,7 @@ user=${USER:-daemon}
milter_opts="${MILTER_OPTS:-}"
pidfile="/run/${RC_SVCNAME}.pid"
-command="/usr/bin/pymodmilter"
+command="/usr/bin/pyquarantine-milter"
command_args="${milter_opts}"
command_background=true
command_user="${user}"
diff --git a/pymodmilter/modify.py b/pyquarantine/modify.py
similarity index 97%
rename from pymodmilter/modify.py
rename to pyquarantine/modify.py
index 6cdfac0..f57e460 100644
--- a/pymodmilter/modify.py
+++ b/pyquarantine/modify.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = [
@@ -30,8 +30,8 @@ from copy import copy
from email.message import MIMEPart
from email.policy import SMTPUTF8
-from pymodmilter import replace_illegal_chars
-from pymodmilter.base import CustomLogger
+from pyquarantine import replace_illegal_chars
+from pyquarantine.base import CustomLogger
class AddHeader:
diff --git a/pymodmilter/notify.py b/pyquarantine/notify.py
similarity index 97%
rename from pymodmilter/notify.py
rename to pyquarantine/notify.py
index f1ef95e..56ca4ba 100644
--- a/pymodmilter/notify.py
+++ b/pyquarantine/notify.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = [
@@ -30,8 +30,8 @@ from html import escape
from os.path import basename
from urllib.parse import quote
-from pymodmilter.base import CustomLogger
-from pymodmilter import mailer
+from pyquarantine.base import CustomLogger
+from pyquarantine import mailer
class BaseNotification:
diff --git a/pymodmilter/rule.py b/pyquarantine/rule.py
similarity index 89%
rename from pymodmilter/rule.py
rename to pyquarantine/rule.py
index a596e34..e0e003b 100644
--- a/pymodmilter/rule.py
+++ b/pyquarantine/rule.py
@@ -1,21 +1,21 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = ["Rule"]
-from pymodmilter.action import Action
-from pymodmilter.conditions import Conditions
+from pyquarantine.action import Action
+from pyquarantine.conditions import Conditions
class Rule:
diff --git a/pymodmilter/run.py b/pyquarantine/run.py
similarity index 83%
rename from pymodmilter/run.py
rename to pyquarantine/run.py
index 22548b7..4cbce22 100644
--- a/pymodmilter/run.py
+++ b/pyquarantine/run.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = ["main"]
@@ -20,25 +20,25 @@ import logging
import logging.handlers
import sys
-from pymodmilter import mailer
-from pymodmilter import ModifyMilter
-from pymodmilter import __version__ as version
-from pymodmilter.config import get_milter_config
+from pyquarantine import mailer
+from pyquarantine import ModifyMilter
+from pyquarantine import __version__ as version
+from pyquarantine.config import get_milter_config
def main():
python_version = ".".join([str(v) for v in sys.version_info[0:3]])
python_version = f"{python_version}-{sys.version_info[3]}"
- "Run PyMod-Milter."
+ "Run pyquarantine."
parser = argparse.ArgumentParser(
- description="PyMod milter daemon",
+ description="pyquarantine-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/pymodmilter/pymodmilter.conf")
+ default="/etc/pyquarantine/pyquarantine.conf")
parser.add_argument(
"-s",
@@ -125,10 +125,10 @@ def main():
sysloghandler = logging.handlers.SysLogHandler(
address="/dev/log", facility=logging.handlers.SysLogHandler.LOG_MAIL)
sysloghandler.setFormatter(
- logging.Formatter("pymodmilter: %(message)s"))
+ logging.Formatter("pyquarantine: %(message)s"))
root_logger.addHandler(sysloghandler)
- logger.info("pymodmilter starting")
+ logger.info("pyquarantine-milter starting")
# register milter factory class
Milter.factory = ModifyMilter
@@ -139,13 +139,13 @@ def main():
rc = 0
try:
- Milter.runmilter("pymodmilter", socketname=socket, timeout=600)
+ Milter.runmilter("pyquarantine", socketname=socket, timeout=600)
except Milter.milter.error as e:
logger.error(e)
rc = 255
mailer.queue.put(None)
- logger.info("pymodmilter stopped")
+ logger.info("pyquarantine-milter stopped")
sys.exit(rc)
diff --git a/pymodmilter/storage.py b/pyquarantine/storage.py
similarity index 97%
rename from pymodmilter/storage.py
rename to pyquarantine/storage.py
index 9dd54af..597e2dd 100644
--- a/pymodmilter/storage.py
+++ b/pyquarantine/storage.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = [
@@ -27,10 +27,10 @@ from datetime import datetime
from glob import glob
from time import gmtime
-from pymodmilter.base import CustomLogger
-from pymodmilter.conditions import Conditions
-from pymodmilter.config import ActionConfig
-from pymodmilter.notify import Notify
+from pyquarantine.base import CustomLogger
+from pyquarantine.conditions import Conditions
+from pyquarantine.config import ActionConfig
+from pyquarantine.notify import Notify
class BaseMailStorage:
diff --git a/pymodmilter/whitelist.py b/pyquarantine/whitelist.py
similarity index 97%
rename from pymodmilter/whitelist.py
rename to pyquarantine/whitelist.py
index ca34851..34a923a 100644
--- a/pymodmilter/whitelist.py
+++ b/pyquarantine/whitelist.py
@@ -1,15 +1,15 @@
-# PyMod-Milter is free software: you can redistribute it and/or modify
+# pyquarantine 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.
#
-# PyMod-Milter is distributed in the hope that it will be useful,
+# pyquarantine 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 PyMod-Milter. If not, see .
+# along with pyquarantine. If not, see .
#
__all__ = [
diff --git a/setup.cfg b/setup.cfg
index f3d2f8a..90d059a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,2 @@
[metadata]
-version = attr: pymodmilter.__version__
+version = attr: pyquarantine.__version__
diff --git a/setup.py b/setup.py
index f9d6689..a27fe09 100644
--- a/setup.py
+++ b/setup.py
@@ -4,14 +4,14 @@ def read_file(fname):
with open(fname, 'r') as f:
return f.read()
-setup(name = "pymodmilter",
+setup(name = "pyquarantine",
author = "Thomas Oettli",
author_email = "spacefreak@noop.ch",
description = "A pymilter based sendmail/postfix pre-queue filter.",
license = "GPL 3",
keywords = "header quarantine milter",
- url = "https://github.com/spacefreak86/pymodmilter",
- packages = ["pymodmilter"],
+ url = "https://github.com/spacefreak86/pyquarantine",
+ packages = ["pyquarantine"],
long_description = read_file("README.md"),
long_description_content_type = "text/markdown",
classifiers = [
@@ -28,20 +28,23 @@ setup(name = "pymodmilter",
include_package_data = True,
entry_points = {
"console_scripts": [
- "pymodmilter=pymodmilter.run:main"
+ "pyquarantine-milter=pyquarantine.run:main",
+ "pyquarantine=pyquarantine.run:main",
]
},
data_files = [
(
- "/etc/pymodmilter",
+ "/etc/pyquarantine",
[
- "pymodmilter/docs/pymodmilter.conf.example"
+ "pyquarantine/docs/pyquarantine.conf.example"
]
), (
- "/etc/pymodmilter/templates",
+ "/etc/pyquarantine/templates",
[
- "pymodmilter/docs/templates/disclaimer_html.template",
- "pymodmilter/docs/templates/disclaimer_text.template"
+ "pyquarantine/docs/templates/disclaimer_html.template",
+ "pyquarantine/docs/templates/disclaimer_text.template",
+ "pyquarantine/docs/templates/notification.template",
+ "pyquarantine/docs/templates/removed.png"
]
)
],
diff --git a/test-pymodmilter b/test-pymodmilter
deleted file mode 100755
index fbe25a8..0000000
--- a/test-pymodmilter
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import pymodmilter.run
-
-if __name__ == '__main__':
- sys.exit(
- pymodmilter.run.main()
- )