DKIM enabling on Postfix Server

#rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

(Copy this repo file from local PC and install accordingly. Also check for proxy
connection whether enabled)

#yum install opendkim

#yum install opendkim-tools

#cd /etc/opendkim/keys/

#ls

#mkdir “Domain_Name”

#cd “Domain_Name”/

#ls

#opendkim-genkey -r -d “Domain_Name” -b 2048

#chown opendkim:opendkim /etc/opendkim/keys/ -R

#vim /etc/opendkim.conf

KeyTable
/etc/opendkim/KeyTable
SigningTable refile:/etc/opendkim/SigningTable
ExternalIgnoreList
refile:/etc/opendkim/TrustedHosts
InternalHosts refile:/etc/opendkim/TrustedHosts

#ls

#vim /etc/opendkim/KeyTable

default._domainkey.”Domain_Name”
“Domain_Name”:default:/etc/opendkim/keys/”Domain_Name”/default.private

#vim /etc/opendkim/SigningTable

*@”Domain_Name” default._domainkey.”Domain_Name”

#vim /etc/opendkim/TrustedHosts

127.0.0.1
10.X.X.X
*.”Domain_Name”

#vim /etc/postfix/main.cf (Do all entries at the EOF)

transport_maps = hash:/etc/postfix/transport
smtp_connect_timeout = 120s
smtp_sasl_password_maps = hash:/etc/postfix/passwd
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated
reject_unauth_destination
header_checks = regexp:/etc/postfix/header_checks

smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept

#systemctl restart postfix.service

#systemctl restart opendkim.service

#systemctl status opendkim.service

#opendkim-testkey -d “Domain_Name” -s default -vv