DKIM GENERATOR FOR OUTBOUND EFA 3.2.6

Questions and answers about how to do stuff
Post Reply
Alleyviper
Posts: 74
Joined: 16 Oct 2018 05:55
Location: Portugal

DKIM GENERATOR FOR OUTBOUND EFA 3.2.6

Post by Alleyviper » 22 Aug 2019 10:02

This may be usefull for dkim generating from EFA 3.2.6 or EFA 4 Menu
(Only for generating dkim)

Create a file for the interactive script:

Code: Select all

nano dkim-generator.sh
Pass the script below and save the file
#####################################################################################
read -p "Press "y" to setup outbound dkim for domain: " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Enter domain to create dkim":
read domain

mkdir -p /etc/opendkim/keys/$domain
opendkim-genkey -D /etc/opendkim/keys/$domain -d $domain -s default
chown -R opendkim:opendkim /etc/opendkim/keys/$domain
mv /etc/opendkim/keys/$domain/default.private /etc/opendkim/keys/$domain/default
cat /etc/opendkim/keys/$domain/default.txt > dkimlog.txt
cat dkimlog.txt
fi
#####################################################################################

Make the file executable:

Code: Select all

chmod +x dkim-generator.sh
Execute:

Code: Select all

./dkim-generator.sh

Post Reply