Update 'config/dkim/opendkim.sh'

This commit is contained in:
b.waal
2019-10-17 12:12:32 +02:00
parent 084c7e709c
commit fce127f006

View File

@@ -1,3 +1,9 @@
#!/bin/bash
##----------------------------##
# OpenDKIM Configuration #
##----------------------------##
gpasswd -a postfix opendkim gpasswd -a postfix opendkim
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/beta/config/dkim/opendkim.conf -O /etc/opendkim.conf wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/beta/config/dkim/opendkim.conf -O /etc/opendkim.conf
@@ -17,5 +23,15 @@ mkdir -p /etc/opendkim/keys/$domonly
opendkim-genkey -b $dhparam -d $domonly -D /etc/opendkim/keys/$domonly -s default -v opendkim-genkey -b $dhparam -d $domonly -D /etc/opendkim/keys/$domonly -s default -v
chown opendkim:opendkim /etc/opendkim/keys/$domonly/default.private chown opendkim:opendkim /etc/opendkim/keys/$domonly/default.private
cat /etc/opendkim/keys/$domonly/default.txt ##---------------------------##
sleep 3 # Postfix Configuration #
##---------------------------##
mkdir -p /var/spool/postfix/opendkim
chown opendkim:postfix /var/spool/postfix/opendkim
echo "# Milter configuration" >> /etc/postfix/main.cf
echo "milter_default_action = accept" >> /etc/postfix/main.cf
echo "milter_protocol = 6" >> /etc/postfix/main.cf
echo "smtpd_milters = local:/opendkim/opendkim.sock" >> /etc/postfix/main.cf
echo 'non_smtpd_milters = $smtpd_milters' >> /etc/postfix/main.cf