OpenDKIM RPM Progress

From: Steve Jenkins <stevejenkins_at_gmail.com>
Date: Fri, 10 Jun 2011 21:05:59 -0700

As I've mentioned before, I'm teaching myself how to package RPMs -
using OpenDKIM as my first project. My goal is to provide i386 and
x86_64 RPMs that could be eventually included in some repos (like
EPEL).

So far (thanks to some help from a few on this list), I've been to do
the simple step of building both necessary RPMs (libopendkim and
opendkim) using the original opendkim.spec file that is provided in
the tarball.

The opendkim.spec currently:

1) Configures with the following before compiling: ./configure
--prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir}
--mandir=%{_mandir} CPPFLAGS="$INCLUDES"

then on Install:

2) Puts a copy of the generic init script (from the tarball's
contrib/init/generic/opendkim) into /etc/init.d/

3) Creates a default /etc/opendkim.conf file with the following contents:

## Basic OpenDKIM config file for verification only
## See opendkim.conf(5) or
/usr/share/doc/opendkim-2.4.0/opendkim.conf.sample for more
PidFile /var/run/opendkim/opendkim.pid
Mode v
Syslog yes
#Umask 002
#UserID opendkim:mail
#Socket local:/var/run/opendkim/opendkim.socket
Socket inet:8891_at_localhost

## After setting Mode to "sv", running
## opendkim-genkey -D /etc/opendkim -s key -d `hostname --domain`
## and putting /etc/opendkim
#Canonicalization relaxed/simple
#Domain example.com # change to domain
#Selector key
#KeyFile /etc/opendkim/key.private

4) Creates the user & group "opendkim:opendkim" and adds the opendkim
user to the "mail" group (in /etc/group)

5) Creates /var/run/opendkim and sets the ownership to opendkim:opendkim

6) Creates an /etc/opendkim dir

7) Runs "opendkim-genkey -D /etc/opendkim -s key -d `hostname
--domain` which creates key.private and key.txt files in the
/etc/opendkim dir and sets the proper ownership permissions for those
files (opendkim:opendkim).

8) Runs chkconfig to start opendkim on boot

I'm asking for feedback about which of those steps should be modified
as I move toward a package that could be made available in repos. Here
are my thoughts:

1) add --enable-stats to the ./configure

2) Use the RedHat specific init script from contrib/init/redhat - with
hard-coded variables as discussed in a previous thread.

3) Really wondering here. Should I make separate config examples for
Postfix vs. Sendmail and include them in the docs? Should this conf
assume they're using Sendmail? Anything in this example config that
doesn't need to be there, or anything that isn't there but should be?

4) No suggestions for this one - I think it works fine.

5) Also think this is fine.

6) Not sure on this one - I personally use /etc/mail/dkim to store
OpenDKIM-related files, with and /etc/mail/dkim/keys/example.com for
each domain's keys.

7) I like generating a test set of keys, but with the dir structure
mentioned above.

8) Also think this is good.

Any feedback is appreciated. Like I said, I'm new to this but would
love to learn. :)

Thanks,

SteveJ
Received on Sat Jun 11 2011 - 04:06:14 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:33:10 PST