mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-16 12:24:50 +02:00
rspamd: add feature for adjusting options with a file parsed by DMS (#3059)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
40e10d755d
commit
bee9e3627d
10 changed files with 448 additions and 95 deletions
|
@ -132,16 +132,31 @@ function _install_dovecot
|
|||
function _install_rspamd
|
||||
{
|
||||
_log 'trace' 'Adding Rspamd package signatures'
|
||||
curl -sSfL https://rspamd.com/apt-stable/gpg.key | gpg --dearmor >/etc/apt/trusted.gpg.d/rspamd.gpg
|
||||
local DEB_FILE='/etc/apt/sources.list.d/rspamd.list'
|
||||
local RSPAMD_PACKAGE_NAME
|
||||
|
||||
echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rspamd.gpg] http://rspamd.com/apt-stable/ bullseye main" \
|
||||
>/etc/apt/sources.list.d/rspamd.list
|
||||
echo "deb-src [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rspamd.gpg] http://rspamd.com/apt-stable/ bullseye main" \
|
||||
>>/etc/apt/sources.list.d/rspamd.list
|
||||
# We try getting the most recent version of Rspamd for aarch64 (from an official source, which
|
||||
# is the backports repository). The version for aarch64 is 3.2; the most recent version for amd64
|
||||
# that we get with the official PPA is 3.4.
|
||||
#
|
||||
# Not removing it later is fine as you have to explicitly opt into installing a backports package
|
||||
# which is not something you could be doing by accident.
|
||||
if [[ $(uname --machine) == 'aarch64' ]]
|
||||
then
|
||||
echo '# Official Rspamd PPA does not support aarch64, so we use the Bullseye backports' >"${DEB_FILE}"
|
||||
echo 'deb [arch=arm64] http://deb.debian.org/debian bullseye-backports main' >>"${DEB_FILE}"
|
||||
RSPAMD_PACKAGE_NAME='rspamd/bullseye-backports'
|
||||
else
|
||||
curl -sSfL https://rspamd.com/apt-stable/gpg.key | gpg --dearmor >/etc/apt/trusted.gpg.d/rspamd.gpg
|
||||
local URL='[arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rspamd.gpg] http://rspamd.com/apt-stable/ bullseye main'
|
||||
echo "deb ${URL}" >"${DEB_FILE}"
|
||||
echo "deb-src ${URL}" >>"${DEB_FILE}"
|
||||
RSPAMD_PACKAGE_NAME='rspamd'
|
||||
fi
|
||||
|
||||
_log 'debug' 'Installing Rspamd'
|
||||
apt-get "${QUIET}" update
|
||||
apt-get "${QUIET}" --no-install-recommends install rspamd redis-server
|
||||
apt-get "${QUIET}" --no-install-recommends install "${RSPAMD_PACKAGE_NAME}" 'redis-server'
|
||||
}
|
||||
|
||||
function _install_fail2ban
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue