Installation¶
Prerequisites¶
required¶
python (>=3.11)
python-setuptools
postfix
recommended¶
Please check your distributors package list or pypi for the exact name depending on your preferred method of installation.
python-virtualenv (optional, for installation in virtual env)
python-file/libmagic (the file magic bindings) - Without this the attachment checker will only be able to block based on content type/attachment name but not based on the real file content.
Spamassassin daemon (spamd) ( if you don’t have/want this, you need to disable it in the configuration, see below)
Clam antivirus daemon (clamd) ( if you don’t have/want this, you need to disable it in the configuration, see below)
python-BeautifulSoup (optional, used to improve html tag stripping from body searches if available)
other python modules depending on your requirements and plugins enabled, more python dependencies may be needed:
python-sqlalchemy with a backend such as python-mysql/python-MySQLdb
python-dnspython (python-dns is also supported, but dnsypthon is preferred)
python-redis
python-ipaddr
python-spf
python-srs
python-dkim
python-dmarc
python-yaml
python-geoip2
py7zlib
python-rarfile with a backend such as unrar binary or bsdtar
beautifulsoup 4.x
python-libmilter
python-elasticsearch or opensearch-py
Getting and installing Fuglu¶
preparing virtualenv¶
It is recommended to install Fuglu in a virtualenv for separation of Fuglu dependencies from your system python packages.
Use –system-site-packages when creating your virtualenv if you want to use primarily packages provided by your distribution. Omit to install all dependencies yourself. In any case you may have to install some dependencies via pip.
- ::
python3 -m virtualenv –system-site-packages fuglu . fuglu/bin/activate pip install <dependency>
Continue with one of the following installation methods based on your preference.
cloning source from gitlab¶
git clone git@gitlab.com:fumail/fuglu.git
cd fuglu/fuglu
python setup.py install
latest source package from gitlab¶
wget https://gitlab.com/fumail/fuglu/-/archive/master/fuglu-master.tar.gz
tar -xvzf fuglu-master.tar.gz
cd fuglu-master/fuglu/
python setup.py install
latest released package from pypi¶
Warning
Install fuglu via pip is not recommended, please only proceed the following steps if you know how to do it yourself.
pip install fuglu
mkdir /etc/fuglu
cp -r /usr/local/lib/python*/dist-packages/etc/fuglu* /etc/fuglu
mkdir /var/fuglu
chown nobody:nobody /var/fuglu
With this install method, please note that you need to manually copy fuglu config from /usr/local/lib/python<version>/dist-packages/etc/
to /etc/fuglu. More details available in Configuration section.
Also log directory /var/log/fuglu needs to be created manually and granted proper permissions (by default user nobody and group nobody/nogroup).
This is a feature/restriction in PIP and not a bug in the fuglu installer.
Install on FreeBSD¶
FuGlu can be found in the FreeBSD ports repository as mail/py-fuglu
.