Compare commits

..

2 Commits

Author SHA1 Message Date
juvilius
98d45df08e
Generate dh.pem for dovecot 2023-04-07 17:29:45 +02:00
juvilius
7044cbcc5f
SpamAssasin also needs a directory created 2023-04-07 17:22:54 +02:00

View File

@ -26,6 +26,10 @@ cp -r /usr/share/doc/dovecot/example-config/conf.d /etc/dovecot
mkdir -p /var/lib/dovecot/sieve
mkdir -p /etc/mail/spamassassin/sa-update-keys
chown spamd:spamd /etc/mail/spamassassin/sa-update-keys
chmod 700 /etc/mail/spamassassin/sa-update-keys
#A domain="$(cat /etc/mailname)"
domain="0124816.xyz"
subdom="mail"
@ -146,6 +150,8 @@ mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.backup.conf
echo "Creating Dovecot config..."
openssl dhparam -out /etc/dovecot/dh.pem 4096
echo "# Dovecot config
# Note that in the dovecot conf, you can use:
# %u for username
@ -289,7 +295,7 @@ sed -i '/Socket/s/^#*/#/' /etc/opendkim.conf
grep -q '^Socket\s*inet:12301@localhost' /etc/opendkim.conf || echo 'Socket inet:12301@localhost' >> /etc/opendkim.conf
# OpenDKIM daemon settings, removing previously activated socket.
sed -i '/^SOCKET/d' /etc/opendkim && echo "SOCKET=\"inet:12301@localhost\"" >> /etc/opendkim
sed -i '/^SOCKET/d' /etc/default/opendkim && echo "SOCKET=\"inet:12301@localhost\"" >> /etc/default/opendkim
# Here we add to postconf the needed settings for working with OpenDKIM
echo 'Configuring Postfix with OpenDKIM settings...'