mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Update Rmilter configuration to fix dkim signing.
This commit is contained in:
parent
81915150b2
commit
1c2de37f63
3 changed files with 41 additions and 9 deletions
|
@ -7,8 +7,14 @@ do_pre_regen() {
|
|||
|
||||
cd /usr/share/yunohost/templates/rmilter
|
||||
|
||||
# Install main configuration
|
||||
install -D -m 644 rmilter.conf \
|
||||
"${pending_dir}/etc/rmilter.conf"
|
||||
|
||||
# Install DKIM specific configuration
|
||||
install -D -m 644 ynh_dkim.conf \
|
||||
"${pending_dir}/etc/rmilter.conf.d/ynh_dkim.conf"
|
||||
|
||||
# Remove old socket file (we stopped using it, since rspamd 1.3.1)
|
||||
# Regen-conf system need an empty file to delete it
|
||||
install -D -m 644 /dev/null \
|
||||
|
@ -21,8 +27,9 @@ do_post_regen() {
|
|||
# retrieve variables
|
||||
domain_list=$(sudo yunohost domain list --output-as plain --quiet)
|
||||
|
||||
# create DKIM directory
|
||||
# create DKIM directory with proper permission
|
||||
sudo mkdir -p /etc/dkim
|
||||
sudo chown _rmilter /etc/dkim
|
||||
|
||||
# create DKIM key for domains
|
||||
for domain in $domain_list; do
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
# systemd-specific settings for rmilter
|
||||
|
||||
# DKIM signing
|
||||
# Defined before including /etc/rmilter.conf.common because rmilter seems to be
|
||||
# unable to override dkim{} settings, even if it's already defined in
|
||||
# /etc/rmilter.conf.d/ynh_dkim.conf
|
||||
dkim {
|
||||
enable = true;
|
||||
domain {
|
||||
key = /etc/dkim;
|
||||
domain = "*";
|
||||
selector = "mail";
|
||||
};
|
||||
header_canon = relaxed;
|
||||
body_canon = relaxed;
|
||||
sign_alg = sha256;
|
||||
};
|
||||
|
||||
.include /etc/rmilter.conf.common
|
||||
|
||||
# pidfile - path to pid file
|
||||
|
@ -7,11 +23,6 @@ pidfile = /run/rmilter/rmilter.pid;
|
|||
|
||||
bind_socket = unix:/var/spool/postfix/run/rmilter/rmilter.sock;
|
||||
|
||||
# DKIM signing
|
||||
dkim {
|
||||
domain {
|
||||
key = /etc/dkim;
|
||||
domain = "*";
|
||||
selector = "mail";
|
||||
};
|
||||
};
|
||||
# include user's configuration
|
||||
.try_include /etc/rmilter.conf.local
|
||||
.try_include /etc/rmilter.conf.d/*.conf
|
||||
|
|
14
data/templates/rmilter/ynh_dkim.conf
Normal file
14
data/templates/rmilter/ynh_dkim.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
# DKIM signing
|
||||
# Note that DKIM signing should be done by rspamd in the near future
|
||||
# See https://github.com/vstakhov/rmilter/issues/174
|
||||
dkim {
|
||||
enable = true;
|
||||
domain {
|
||||
key = /etc/dkim;
|
||||
domain = "*";
|
||||
selector = "mail";
|
||||
};
|
||||
header_canon = relaxed;
|
||||
body_canon = relaxed;
|
||||
sign_alg = sha256;
|
||||
};
|
Loading…
Add table
Reference in a new issue