Installation

License

SieveManager 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.

SieveManager 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.

Requirements

SieveManager runs on every Unix-like system (e.g., Linux or macOS) that runs Python ≥ v3.9. It has been tested on Alpine Linux, Debian, Darwin, FreeBSD, NetBSD, and OpenBSD.

Installation from the Python Package Index (PyPI) requires the Package Installer for Python (PIP).

Debian

The package targets Debian ≥ v11 (“bullseye”) and distributions based on Debian ≥ v11 (e.g., versions of Linux Mint, MX Linux, Pop!_OS, Ubuntu, or Zorin released since ca. 2022). It may work on older versions, too.

Add the repository key:

sudo curl -o /etc/apt/trusted.gpg.d/org_codeberg_odkr.asc \
    https://codeberg.org/api/packages/odkr/debian/repository.key

Add the repository:

sudo tee /etc/apt/sources.list.d/org_codeberg_odkr.list <<EOF
deb https://codeberg.org/api/packages/odkr/debian bullseye main
EOF

Update the package index:

sudo apt-get update

Install SieveManager:

sudo apt-get install sievemgr

Python Package Index

Install SieveManager:

pip3 install sievemgr

Note

The PyPI package ships without the manual pages for sievemgr and sieve.cf and the shell completion scripts.

Troubleshooting

The most common reason for pip3 install sievemgr to fail is that PyCA does not offer a pre-compiled wheel of the cryptography module for your system.

Install SieveManager with

pip3 install --no-deps sievemgr

instead.

Danger

SieveManager works witout cryptography. But it will not be able to check whether TLS certificates has been revoked.

Tarball

Preparation

Import my PGP key, so that you can check whether the tarball has been tampered with:

gpg --keyserver keys.openpgp.org --recv-keys 6B06A2E03BE31BE9

Download

Download the tarball:

version="0.8"
baseurl="https://codeberg.org/odkr/sievemgr/releases/download/v$version"
tarball="sievemgr-$version.tgz"
curl --no-clobber -O "$baseurl/$tarball" -O "$baseurl/$tarball.asc"

Check whether the tarball has been tampered with:

gpg --keyserver keys.openpgp.org --recv-keys 6B06A2E03BE31BE9
gpg --verify sievemgr-0.8.asc

Unpack the tarball:

tar xzf sievemgr-0.8.tgz

Go to the package directory to proceed with the installation:

cd sievemgr-0.8

Tip

Subscribe to https://codeberg.org/odkr/sievemgr/releases.rss to be notified about new releases.

Installation

Home directory

Install SieveManager to your home directory:

make userinstall

The manual pages for SieveManager are copied to ~/.local/share/man, the Bash completion script to ~/.local/share/bash-completion/completions, and the Zsh completion script to ~/.local/share/zsh/site-functions.

Virtual environment

Create a virtual environment in /opt/odkr/sievemgr and install SieveManager to that environment:

sudo make venvdir=/opt/odkr/sievemgr venvinstall

Tip

Install SieveManager to /foo and its manual and completion scripts to their standard locations in /usr/local:

sudo make venvdir=/foo prefix=/usr/local venvinstall

Manual

SieveManager can also be installed by being copied into a directory in your PATH:

install -m u=rwx,go=rx sievemgr.py ~/.local/bin/sievemgr

However, the cryptography module is required to check whether a server’s TLS certificate has been revoked and the dnspython module is required to resolve DNS SRV records. So you should install those modules, too:

pip3 install --user cryptography dnspython

De-installation

Uninstall SieveManger:

make uninstall

Note

The cryptography and dnspython modules are only removed if they were installed by make venvinstall.

Troubleshooting

The most common reason for make userinstall and make venvinstall to fail is that PyCA does not offer a pre-compiled wheel of the cryptography module for your system.

Install SieveManager manually instead (see above) and do not install the cryptography module.

Danger

SieveManager works witout cryptography. But it will not be able to check whether TLS certificates has been revoked.

Extras

Bash completion

The Bash completion script should work automatically if bash-completion is installed.

However, it can also be loaded by adding, for example,

source "$HOME/.local/share/bash-completion/completions/sievemgr.bash"

to your .bashrc.

Zsh completion

The Zsh completion script targets Zsh’s modern completion system.

It can be activated by adding, for example,

fpath+=("$HOME/.local/share/zsh/site-functions")

autoload -Uz compinit
compinit

to your .zshrc.