21 lines
915 B
Bash
21 lines
915 B
Bash
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
|
|
mkdir -p /etc/opendkim
|
|
mkdir -p /etc/opendkim/keys
|
|
chown -R opendkim:opendkim /etc/opendkim
|
|
chmod go-rw /etc/opendkim/keys
|
|
|
|
echo "*@$domonly default._domainkey.$domonly" >> /etc/opendkim/signing.table
|
|
echo "default._domainkey.$domonly $domonly:default:/etc/opendkim/keys/$domonly/default.private" >> /etc/opendkim/key.table
|
|
echo "127.0.0.1" >> /etc/opendkim/trusted.hosts
|
|
echo "localhost" >> /etc/opendkim/trusted.hosts
|
|
echo "" >> /etc/opendkim/trusted.hosts
|
|
echo "*.$domonly" >> /etc/opendkim/trusted.hosts
|
|
|
|
mkdir -p /etc/opendkim/keys/$domonly
|
|
opendkim-genkey -b $dhparam -d $domonly -D /etc/opendkim/keys/$domonly -s default -v
|
|
chown opendkim:opendkim /etc/opendkim/keys/$domonly/default.private
|
|
|
|
cat /etc/opendkim/keys/$domonly/default.txt
|
|
sleep 3 |