Page 1 of 4

install opendkim

Posted: 2019/10/27 03:41:52
by young_nandy
Hello,

how to install opendkim on centos 8? I have searched everywhere but never found it. is there another solution to opendkim?

Re: install opendkim

Posted: 2019/10/27 08:07:24
by nouvo09
what says

dnf repolist ?

Re: install opendkim

Posted: 2019/10/27 11:21:24
by young_nandy
nouvo09 wrote:
2019/10/27 08:07:24
what says

dnf repolist ?
not a solution

Re: install opendkim

Posted: 2019/10/27 14:51:30
by TrevorH
You'll need to request the package via a bz on bugzilla.redhat.com in the Fedora EPEL section. OpenDKIM is an EPEL package.

Re: install opendkim

Posted: 2019/10/27 15:04:29
by young_nandy
TrevorH wrote:
2019/10/27 14:51:30
You'll need to request the package via a bz on bugzilla.redhat.com in the Fedora EPEL section. OpenDKIM is an EPEL package.
someone already asked ( https://bugzilla.redhat.com/show_bug.cgi?id=1754540 )

Re: install opendkim

Posted: 2019/10/27 16:22:46
by nouvo09
young_nandy wrote:
2019/10/27 11:21:24
nouvo09 wrote:
2019/10/27 08:07:24
what says

dnf repolist ?
not a solution
It was just to know if the epel-repo was already enabled.

Re: install opendkim

Posted: 2019/10/28 08:22:39
by KernelOops
unfortunately, opendkim is not available for centos 8, because epel-8 did not create a package for it.

please open a bug report and request it. Go to https://bugzilla.redhat.com/, create a new bug report under product Fedora EPEL.

Re: install opendkim

Posted: 2019/12/27 21:45:30
by alexsr
Here are instructions how to compile opendkim on CentOS 8.
I compiled it and using it in production CentOS 8 more than 6 weeks.

dnf config-manager --set-enabled PowerTools
yum install openssl-devel
yum install libbsd-devel
yum install libdb-devel
yum install libmemcached-devel
yum install tre-devel
yum install patch
yum install sendmail-milter-devel

wget "https://dl.fedoraproject.org/pub/epel/7 ... l7.src.rpm"
rpm2cpio opendkim-2.11.0-0.1.el7.src.rpm | cpio -idv
tar zxvf opendkim-2.11.0.Alpha0.tar.gz
cd opendkim-2.11.0
patch -p1 < ../opendkim.ticket35+37.patch

./configure --disable-reprrd --disable-static --disable-silent-rules --disable-live-testing --enable-db_handle_pools --enable-query_cache --with-libmemcached --with-tre --with-openldap --with-openssl --with-sasl --sysconfdir=/etc --prefix=/usr/local --localstatedir=/var

make
make install


groupadd opendkim
useradd -g opendkim -s /sbin/nologin opendkim

cd /var/run
mkdir opendkim

chown opendkim:opendkim /var/run/opendkim
chmod go-rwx /var/run/opendkim

find /etc/opendkim -exec chown opendkim:opendkim {} \;
find /etc/opendkim -exec chmod go-rwx {} \;

create file (content bellow): /lib/systemd/system/opendkim.service

Code: Select all

# If you are using OpenDKIM with SQL datasets it might be necessary to start OpenDKIM after the database servers.
# For example, if using both MariaDB and PostgreSQL, change "After=" in the "[Unit]" section to:
# After=network.target nss-lookup.target syslog.target mariadb.service postgresql.service

[Unit]
Description=DomainKeys Identified Mail (DKIM) Milter
Documentation=man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html
After=network.target nss-lookup.target syslog.target

[Service]
Type=forking
PIDFile=/var/run/opendkim/opendkim.pid
EnvironmentFile=-/etc/sysconfig/opendkim
ExecStart=/usr/local/sbin/opendkim $OPTIONS
ExecReload=/bin/kill -USR1 $MAINPID
User=opendkim
Group=opendkim

[Install]
WantedBy=multi-user.target

create file (content bellow): /usr/lib/tmpfiles.d/opendkim.conf

Code: Select all

d /run/opendkim   700 opendkim opendkim
systemctl start opendkim
systemctl enable opendkim


Code: Select all

[root@localhost opendkim-2.11.0]# opendkim -V
opendkim: OpenDKIM Filter v2.11.0
	Compiled with OpenSSL 1.1.1 FIPS  11 Sep 2018
	SMFI_VERSION 0x1000001
	libmilter version 1.0.1
	Supported signing algorithms:
		rsa-sha1
		rsa-sha256
	Supported canonicalization algorithms:
		relaxed
		simple
	Active code options:
		QUERY_CACHE
		USE_DB
		USE_LDAP
	libopendkim 2.11.0: query_cache

Re: install opendkim

Posted: 2019/12/28 07:37:10
by KernelOops
just a word of warning, opendkim has had a horrible development history, it has been abandoned by its owner and does not receive regular fixes for the reported bugs.

There is a good alternative: dkimpy and dkimpy-milter but there are no CentOS packages, but its an active project with all the needed features, including support for ed25519 signatures.

Re: install opendkim

Posted: 2019/12/28 12:37:22
by young_nandy
alexsr wrote:
2019/12/27 21:45:30
Here are instructions how to compile opendkim on CentOS 8.
I compiled it and using it in production successfully more than 6 weeks.

dnf config-manager --set-enabled PowerTools
yum install openssl-devel
yum install libbsd-devel
yum install libdb-devel
yum install libmemcached-devel
yum install tre-devel
yum install patch
yum install sendmail-milter-devel

wget "https://dl.fedoraproject.org/pub/epel/7 ... l7.src.rpm"
rpm2cpio opendkim-2.11.0-0.1.el7.src.rpm | cpio -idv
tar zxvf opendkim-2.11.0.Alpha0.tar.gz
cd opendkim-2.11.0
patch -p1 < ../opendkim.ticket35+37.patch

./configure --disable-reprrd --disable-static --disable-silent-rules --disable-live-testing --enable-db_handle_pools --enable-query_cache --with-libmemcached --with-tre --with-openldap --with-openssl --with-sasl --sysconfdir=/etc --prefix=/usr/local --localstatedir=/var

make
make install

Code: Select all

[root@localhost opendkim-2.11.0]# opendkim -V
opendkim: OpenDKIM Filter v2.11.0
	Compiled with OpenSSL 1.1.1 FIPS  11 Sep 2018
	SMFI_VERSION 0x1000001
	libmilter version 1.0.1
	Supported signing algorithms:
		rsa-sha1
		rsa-sha256
	Supported canonicalization algorithms:
		relaxed
		simple
	Active code options:
		QUERY_CACHE
		USE_DB
		USE_LDAP
	libopendkim 2.11.0: query_cache

thank you for sharing. if I see this version for centos 7? but can it be configured with centos 8 ??