One method to encrypt your outgoing e-mails is to use https://github.com/infertux/zeyple. The procedure is also described in the English Linux Magazine and the German Linux-Magazin.
For the script to run you need to install also the python-is-python3 package. Otherwise, Python will not be found by the script. So the corresponding command during installation should read
As a side note, gnupg and sudo were already installed on my machine.
Deviating from the process described in the above docs I wanted to add a locally stored public key. This works by copying the public key (.asc file) onto the server to a location where the zeyple user has read access, and add it as follows (adjust paths and filenames accordingly):
Also, OMV auto-generates the Postfix config files (there is a corresponding header in them), so the standard installation process will not survive a re-creation of /etc/postfix/master.cf and /etc/postfix/main.cf. Instead, you need to add a config file to /srv/salt/omv/deploy/postfix/, e.g. 50zeyple.sls with the following contents:
zeyple_append_postfix_master:
file.append:
- name: "/etc/postfix/master.cf"
- text: |
zeyple unix - n n - - pipe
user=zeyple argv=/usr/local/bin/zeyple.py ${recipient}
localhost:10026 inet n - n - 10 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8,[::1]/128
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
zeyple_append_postfix_main:
file.append:
- name: "/etc/postfix/main.cf"
- text: |
content_filter = zeyple
Display More
(copied from https://github.com/infertux/zeyple/blob/master/INSTALL.md).
Then re-create the Postfix configuration files and re-start Postfix:
I noted that zeyple's config file location announced in the linux magazine articles does not correspond to the location expected by the script (and given in the script's installation procedure). So depending on where you store zeyple's configuration file you may also need to modify the Python script itself. To do so, in function load_configuration() change line os.path.join('/etc/', filename), accordingly, e.g. to os.path.join('/etc/zeyple/', filename),.
For me that was all it needed. A subsequently sent test message (on the web interface at System / Notification / Settings) was encrypted.