Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c789d056b2
|
||
|
|
364368e3a5
|
@@ -1,3 +0,0 @@
|
|||||||
include LICENSE README.md
|
|
||||||
recursive-include docs *
|
|
||||||
recursive-include misc *
|
|
||||||
@@ -1,42 +1,50 @@
|
|||||||
# uvscand
|
# uvscand
|
||||||
A python daemon to perform virus scans with uvscan (McAfee) over TCP socket, mainly used in conjunction with the antivirus module of rspamd.
|
A python daemon to perform virus scans with uvscan (McAfee) over TCP socket, mainly used in conjunction with the antivirus module of rspamd.
|
||||||
|
|
||||||
## Developer information
|
|
||||||
Everyone who wants to improve or extend this project is very welcome.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
git clone https://github.com/spacefreak86/uvscand
|
|
||||||
cd uvscand
|
```bash
|
||||||
python3 setup.py build
|
git clone https://github.com/spacefreak86/uvscand
|
||||||
python3 setup.py install
|
cd uvscand
|
||||||
|
|
||||||
cp docs/uvscand.conf /etc/
|
# build and install uvscand package
|
||||||
|
python3 -m build
|
||||||
cat << 'EOF'>> /etc/systemd/system/uvscand.service
|
python3 -m pip install .
|
||||||
[Unit]
|
|
||||||
Description=uvscand Service
|
# copy config file
|
||||||
After=multi-user.target
|
cp docs/uvscand.conf /etc/
|
||||||
[Service]
|
|
||||||
Type=simple
|
# install systemd service
|
||||||
Restart=always
|
cat << 'EOF'>> /etc/systemd/system/uvscand.service
|
||||||
ExecStart=/usr/bin/python3 /usr/local/bin/uvscand
|
[Unit]
|
||||||
[Install]
|
Description=uvscand Service
|
||||||
WantedBy=multi-user.target
|
After=multi-user.target
|
||||||
EOF
|
[Service]
|
||||||
|
Type=simple
|
||||||
systemctl restart uvscand
|
Restart=always
|
||||||
systemctl status uvscand
|
ExecStart=/usr/bin/python3 /usr/local/bin/uvscand
|
||||||
systemctl enable uvscand
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
cat << 'EOF'>> /etc/rspamd/local.d/antivirus.conf
|
EOF
|
||||||
uvscan {
|
|
||||||
scan_mime_parts = true;
|
systemctl restart uvscand
|
||||||
scan_text_mime = true;
|
systemctl status uvscand
|
||||||
scan_image_mime = true;
|
systemctl enable uvscand
|
||||||
type = "clamav";
|
|
||||||
symbol = "MCAFEE_VIRUS";
|
cat <<'EOF' >>/etc/rspamd/local.d/antivirus.conf
|
||||||
servers = "127.0.0.1:10060";
|
uvscan {
|
||||||
action = "reject";
|
scan_mime_parts = true;
|
||||||
}
|
scan_text_mime = true;
|
||||||
EOF
|
scan_image_mime = true;
|
||||||
systemctl restart rspamd
|
type = "clamav";
|
||||||
|
symbol = "MCAFEE_VIRUS";
|
||||||
|
servers = "127.0.0.1:10060";
|
||||||
|
action = "reject";
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
systemctl restart rspamd
|
||||||
|
```
|
||||||
|
|
||||||
|
## Developer information
|
||||||
|
|
||||||
|
Everyone who wants to improve or extend this project is very welcome.
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
[tool.setuptools.packages.find]
|
||||||
|
include = ["uvscand"]
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "uvscand"
|
||||||
|
version = "0.0.6"
|
||||||
|
requires-python = ">=3.11"
|
||||||
|
authors = [
|
||||||
|
{name = "Thomas Oettli", email = "spacefreak@noop.ch"}
|
||||||
|
]
|
||||||
|
maintainers = [
|
||||||
|
{name = "Thomas Oettli", email = "spacefreak@noop.ch"}
|
||||||
|
]
|
||||||
|
description = "A python daemon to perform virus scans with uvscan (McAfee) over TCP socket."
|
||||||
|
readme = "README.md"
|
||||||
|
license = "GPL-3.0-only"
|
||||||
|
keywords = ["uvscan", "virus", "rspamd", "mail"]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 4 - Beta",
|
||||||
|
"Intended Audience :: System Administrators",
|
||||||
|
"Programming Language :: Python :: 3"
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
uvscand = "uvscand:main"
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
from setuptools import setup
|
|
||||||
|
|
||||||
def read_file(fname):
|
|
||||||
with open(fname, 'r') as f:
|
|
||||||
return f.read()
|
|
||||||
|
|
||||||
setup(name = "uvscand",
|
|
||||||
version = "0.0.5",
|
|
||||||
author = "Thomas Oettli",
|
|
||||||
author_email = "spacefreak@noop.ch",
|
|
||||||
description = "A python daemon to perform virus scans with uvscan (McAfee) over TCP socket.",
|
|
||||||
license = "GPL 3",
|
|
||||||
keywords = "rspamd uvscan",
|
|
||||||
url = "https://github.com/spacefreak86/uvscand",
|
|
||||||
packages = ["uvscand"],
|
|
||||||
long_description = read_file("README.md"),
|
|
||||||
classifiers = [
|
|
||||||
# 3 - Alpha
|
|
||||||
# 4 - Beta
|
|
||||||
# 5 - Production/Stable
|
|
||||||
"Development Status :: 3 - Alpha",
|
|
||||||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
|
||||||
"Operating System :: OS Independent",
|
|
||||||
"Programming Language :: Python",
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Topic :: Communications :: Email :: Virus"
|
|
||||||
],
|
|
||||||
entry_points = {
|
|
||||||
"console_scripts": [
|
|
||||||
"uvscand=uvscand:main"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
python_requires = ">=3.7"
|
|
||||||
)
|
|
||||||
+1
-1
@@ -236,7 +236,7 @@ def main():
|
|||||||
AIO.config = config
|
AIO.config = config
|
||||||
|
|
||||||
# start uvscan workers
|
# start uvscan workers
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.new_event_loop()
|
||||||
workers = [loop.create_task(uvscan_worker(AIO.queue)) for _ in range(args.maxprocs)]
|
workers = [loop.create_task(uvscan_worker(AIO.queue)) for _ in range(args.maxprocs)]
|
||||||
|
|
||||||
# start server
|
# start server
|
||||||
|
|||||||
Reference in New Issue
Block a user