Plesk 12 Centos 6 install OpenDKIM

Plesk opendkim

Today i fought with Plesk 12 and Centos 6 to install OpenDKIM with DOMAIN KEY and SPF.

For domain key and spf is simple, just for each domain on plesk directly active it in the setting mail.

OpenDKIM is a service that must be installed on centos directly.
Let’s start!

Install opendkim and opendkim tools:

yum update
wget -P /tmp http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh /tmp/epel-release-6-8.noarch.rpm
rm -f /tmp/epel-release-6-8.noarch.rpm
yum install opendkim opendkim-tools

Now we must to create the directory that can be used than with opendkim for keys generation

mkdir -pv /etc/opendkim/keys
chown -Rv opendkim:opendkim /etc/opendkim
chmod go-rwx /etc/opendkim/*

touch /etc/opendkim/KeyTable
touch /etc/opendkim/SigningTable
touch /etc/opendkim/TrustedHosts

Then to simple generate the key and assign the domain to trusted host and signing table, create a simple script.

Create the file:

/opt/generatedkim.sh

and put in it:


#!/bin/bash
# /opt/generatedkim.sh
die () {
echo >&2 "$@"
exit 1
}

[ “$#” -eq 1 ] || die “1 argument required, $# provided, domain required, ex: ./script example.com”

cwd=`pwd`
opendkim=”/etc/opendkim”
location=”$opendkim/keys/$1″
[ -d “$location” ] && die “There is already a directory in the folder, delete folder if you want to create a new one”

mkdir -p “$location”
cd “$location”
opendkim-genkey -d $1 -s mail
chown opendkim:opendkim *
chown opendkim:opendkim “$location”
chmod u=rw,go-rwx *
echo “$1 $1:mail:$location/mail.private” >> “$opendkim/KeyTable”
echo “*@$1 $1” >> “$opendkim/SigningTable”
echo “$1” >> “$opendkim/TrustedHosts”
echo “mail.$1” >> “$opendkim/TrustedHosts”
echo
echo “Put this in the DNS ZONE for domain: $1”
echo
cat “$location/mail.txt”
echo
cd “$cwd”

Now we must use it to generate the domain keys and dns record:


/opt/generatedkim.sh test.de

Put this in the DNS ZONE for domain: test.de

mail._domainkey IN TXT “v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPzE0GmvFwAQsgcFzopy4zMNWUbL6JM5XIyjBy3bUnANI5axeb
/Lw/GBjUoSFLEiO80Tt8m3A5YrBKcodRQQURYiW6/
YtElhLupHyfcxQhfNLU4z9JUOJKPjcpMZCj0Xv873QgVOl+7U605JdBHSPOx4ybBZwDq68cw9YFYRPmEwIDAQAB” ; —– DKIM key mail for test.de

Create the record dns as the script put out on your domain dns zone.

Remember that if you restart the server you must go up the service of opendkim!!

Thank you to matoski.com

5
Leave a Reply

avatar
5 Comment authors
lightroomSetJustinHakLeonardAcelmJerrymitDonaldTor Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
DonaldTor
Guest
DonaldTor

Pеклама в интернете. http://1541.ru/ Поисковая Оптимизация ( SEO), Реклама и продажи в Pinterest для Etsy, Ebay, Amazon, Notify и др. 220 usd. за месяц +Тысячи Обратных, Вечных ссылок через размещение объявлений на 10-ки тысяч форумов

Jerrymit
Guest
Jerrymit

Joycasino – play best microgaming online casino http://joycasino-com.jp/ – Show more>>>

LeonardAcelm
Guest
LeonardAcelm

Free casinosnigerian Games Nigeria Sports Betting and Online casinosnigerian Platform
http://casinosnigerian.com/ – Click here…

JustinHak
Guest
JustinHak

Добрый день
Кто нибудь знает что это у меня в личном профиле фото голых телок делают, в начале появились женские потом мужские тоже.
Барышни конечно зачет, но кто закачал мне их туда?
Модераторы удаляйте их скорее уже – francescopantisano.it/id794729/foto
Всем пока, жду действий уже!

lightroomSet
Guest
lightroomSet

“https://adobe.com/” – Adobe Lightroom is the most famous copy editing software in compensation photographers, with hundreds of thousands of effects and presets nearby on the internet. You can download Lightroom from Adobe’s website. “https://en.wikipedia.org/wiki/Adobe_Lightroom” – Adobe Lightroom presets help you to redact your photos in register days by means of doing a assignment of the production after you. You can unaffectedly crack out a pre-defined capacity, while keeping your source facsimile and reverting break to it at anytime. You can use: Lightroom Presets for Wedding Photography Lightroom Presets for Baby and Family Photography Lightroom Presets for Headshots Lightroom Presets for… Read more »