diff options
author | Eray Aslan <eras@gentoo.org> | 2013-03-01 10:58:28 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2013-03-01 10:58:28 +0000 |
commit | 082609121834810fe75abd488951680992c69ddb (patch) | |
tree | 9fe9bfccab8046fb52c375af7e4896e42e1bbef4 /mail-filter | |
parent | dev-libs/igraph: Swap DEPEND/RDEPEND, thanks Mr_Bones spotting this mistake (diff) | |
download | historical-082609121834810fe75abd488951680992c69ddb.tar.gz historical-082609121834810fe75abd488951680992c69ddb.tar.bz2 historical-082609121834810fe75abd488951680992c69ddb.zip |
Fix building with older versions of libdb
Package-Manager: portage-2.2.0_alpha163/cvs/Linux x86_64
Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/opendkim/ChangeLog | 8 | ||||
-rw-r--r-- | mail-filter/opendkim/Manifest | 30 | ||||
-rw-r--r-- | mail-filter/opendkim/files/opendkim-2.8.0-berkeleydb.patch | 72 | ||||
-rw-r--r-- | mail-filter/opendkim/opendkim-2.8.0-r1.ebuild | 194 |
4 files changed, 289 insertions, 15 deletions
diff --git a/mail-filter/opendkim/ChangeLog b/mail-filter/opendkim/ChangeLog index f5392c6f3006..93bdaa009208 100644 --- a/mail-filter/opendkim/ChangeLog +++ b/mail-filter/opendkim/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-filter/opendkim # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.61 2013/02/26 09:04:38 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.62 2013/03/01 10:58:25 eras Exp $ + +*opendkim-2.8.0-r1 (01 Mar 2013) + + 01 Mar 2013; Eray Aslan <eras@gentoo.org> + +files/opendkim-2.8.0-berkeleydb.patch, +opendkim-2.8.0-r1.ebuild: + Fix building with older versions of libdb *opendkim-2.8.0 (26 Feb 2013) diff --git a/mail-filter/opendkim/Manifest b/mail-filter/opendkim/Manifest index 090aed8910a9..38bb0447d6fa 100644 --- a/mail-filter/opendkim/Manifest +++ b/mail-filter/opendkim/Manifest @@ -3,29 +3,31 @@ Hash: SHA256 AUX opendkim-2.7.4-DisableCryptoInit.patch 3747 SHA256 83c0fac5ed1393cdfda695637f337a2a43bcd45476f11ed7db1bc422a080f421 SHA512 c8c352a56150cf0e8a2ce4b0020c03d60da1e8c184e830b325348e1e9272df8634e014a4ae6b62d4c8c596d855ecdf163eb4c09104e31084d1643364bcf093f8 WHIRLPOOL d6ad3a4ea0c2ba7b41d06750beb3fb19dd26f29f44f1ffc6855e93f8a5e8af631c35c9b782d32a7fcb83361e881ea6dffb22d59035d9b3148cf39b37ee62f1db AUX opendkim-2.7.4-bsd.patch 18006 SHA256 a4cfb4d26dc7d27134f66f7b1e78b40f6c0c77f3986af787001c094c4734f95f SHA512 9ee24d02d2662b2898dd073b7ec882889fe9568d2afca8751c6ad6c68af60523d77ca79557f540607a68cb159bf0df7266122ed8fe3a3b67ca4e578b325b4892 WHIRLPOOL 8408536bd7fd080eedc99b3b133562d5049a63a61420b5a38759237dce09af8ab257f524152ca870de18c13113b6370bc5c0f8fe06fc43d89101ecbcfbb157e9 +AUX opendkim-2.8.0-berkeleydb.patch 2134 SHA256 3e8152cef5a9f9d158620d8f6d27b266eec86ba3fa0b524a0a4c13b62a71fb68 SHA512 944ef9375ad219f5cb7bcfc415cde13b4bf17f94667f3dc705d0e2fdd641ed65cbffd7b03efd9ee71e15f0a7ff6b37e569d10e0ed951660ccb2a5c5a28579d48 WHIRLPOOL 041768e49bfd078f8228f8dd66a508dce964df579d8ce63701cf74c08559f780b9af4dadd6643b90776c5985b0ec220f444efa7a548f8b08c2f6d46192ffc5d7 AUX opendkim-2.8.0-unbreak_upgrade.patch 1042 SHA256 5c115fa185bc9a64fe847599e2c0fa8d4d2925f4b2dbdef1e88769195c79046d SHA512 b415fe2f05dd16489ac59038ab15b22c77da23fe1bc3b5fc82883186b4e2b44855f546fbc1128109e84b1c19ed868cffed66c72fd4600c66c27ce4f9363b44a2 WHIRLPOOL 6304af7e66862da3c215455273d486aa4f67ae0777209e92e1c81b9537722850699fdd8c167e95412abfb2143eefcb88ff3c58c4cfc380994e27e9c41deee8e8 AUX opendkim-unbreak_upgrade.patch 1050 SHA256 6518b34662ca366a4616ca1135d5cc529b62dd6b921d2b0074ba8fabedfbd739 SHA512 01755ba0675d19c6b1d582c502479ae843dccadc712e4af5e66fd63a333241cdd5e29fb1856020967faee5bbe454784745747c54c0994b216b7aaba340bc9107 WHIRLPOOL 6a0b6f9ebdc2a5b06a3a2b1ddd75adfe8e6109cf346ad3387718152e307db107c052b66fab7590a054a0977504f5eb705eca7e7c9d5d62c86f97d216b0d25366 AUX opendkim.init.r3 1545 SHA256 63f316ef776ad1a9fe87cff7748fac4574c2355b6205e3ef21285ddb84c8cb33 SHA512 c28b93f230b65ba483302dbb0f6cba0d8b2cf29cce0309521e67f6aa0e4c041b0dd69eaca8152d6b0b1b02dbe1ff9634fef0840856c8e192f17a1c24ffac7166 WHIRLPOOL f42cb79de47d2fdac26ef4a45132e996640da824aadaf0c3e66182160e941322ff78a37c18a32ca50efb0bb4fbf11b622a1ce5931146c47a06156c256d568b81 DIST opendkim-2.7.4.tar.gz 1158496 SHA256 fa66f7ca52dd3fa94cd869e8fe9e8f849ab83d6a32a8d4ed3cf18b06b4584e76 SHA512 f897cea21832355cac5421a96a906f67aaff1bcc0ceb5e027c73845d7c0cd27ec12862a826534b01339571533cba061b86e1a1bad91c405488bada729e2846cb WHIRLPOOL afe329829211cedacc7d27b5a4d03469e1fe8935cabc0b51158a69862ef993d6438499a206628dafc31c7904b9b95d1eeb31edf6583249cf54396793af68bdbc DIST opendkim-2.8.0.tar.gz 1175377 SHA256 a7b369b2182031d53257cbbac7ed99d70b00ebc442dfb832dc7d78d5d7b0c31c SHA512 35730e100307e5bdca9fd1c79e13371bd46e73b6a97f7244edaa4fe1bc693a0825ed2bab349155af11d472da7e0635e558f1c755468efdddeef073b3abc0041b WHIRLPOOL a85a69e31eef3eb4e37cc5c6285ef189367d4d4e3ceef6966ccde008d99d897ca862950316cec9e42ad0566fc9814e2cbd6a9f7dbfc2fdc2cf6909bfd83699b8 EBUILD opendkim-2.7.4-r1.ebuild 6135 SHA256 8254b24c351dd750cad24c36622e0ced17bdf5eff0fc3407f068c28c92c7a816 SHA512 da2633e235431cdf6f496a07bdfde3435878120c7c3e838cf2766920197a54ba62ceb8bb4ed3dc1f936911768ac3c1f10c727bb9e1dfda21a888a3857ecf087f WHIRLPOOL 01df0472e302dda26923157c311ff6aaf90d78e4ca295ead74983ed063cc02868977ea47c918efdd1e8757bfdcb08001864ee4163c85bdee93c6f58fe6f1c5f6 +EBUILD opendkim-2.8.0-r1.ebuild 6198 SHA256 03687582317507bc7ebe711dbcf1262531b7622b8ee856a4beac432d1d8e8b83 SHA512 8707024a6fd283a8aa6278cbbbaf78d4ec4632197ccb4f7a2dad5dc2a2b91282a55e26adc3aea4c02621c203d823f0e24089c2e7d7cf1c7f4d1ed33d76bd165f WHIRLPOOL 5eaeb92acc9884e4f19b15485527452e2d377292ddcbf1cad07a5c408f3ef4e885f35d2805e0c6467a3486c506c4e51e44a5d26ab96f32abfc8042ba089f5403 EBUILD opendkim-2.8.0.ebuild 6144 SHA256 95556dda451ef7676e445bd75824b28ea52e9aa47b1ab69cf2bb1038053e5ac6 SHA512 d532de8f9f4d595bada1169f139904f7946f22a4fbd4ee37b910af336a338b015d0ad560e73bb2bfd22ad78ca6a78e391f8b71cc9a554a3bbee6c6429f01b43b WHIRLPOOL a2406e9bf001dd0fbd1c10a32ab44e0d071e54baad1e8973ad858f69ca3b28c6f7dc288a6bc3c9fd3726c3296713deb01cc00e77f3341b1e7ace2e42b449b824 -MISC ChangeLog 11267 SHA256 6f2e9daf82146a8f090be89c0247a60c61fc51ba46b2392975a683bac5da8465 SHA512 ea022995d4f65bc5b60d2d058c6368d71f7b754afbe79b25b94cd4a33bf930837eac9e1fe2870b4fbeacda4025dbfc10053fd454e8d38c1c2b0784aec9dfe596 WHIRLPOOL cf4e99ea87890270431e99a4268916c99cd6cec872f2b37f1608276c0f9a6fae191dc3ec1605244babfc6f5b6d1ed6c44c2ce483c6cf86e0a43f308b078df2fd +MISC ChangeLog 11459 SHA256 ab6202beb6c46787d2fdaa874ac0424447c0ba3dcf7dcbd392c81101c9130805 SHA512 fd2445cc9c54e56774cd00dc623d5e41cb216be4a3f9c9dfbc56a63d912938caf1f9269debe0d801557803fe475534450948ff1c26436719460a5f3466ab8b19 WHIRLPOOL 1d6be5539ab2489dbf815045f6242308b9298a58a3c09b1950f7ae4f9ed52bb23c2705f3ed8b588ae55b59f00eefcca9ee4f7c178d7f57e4ed894dbd0076d16c MISC metadata.xml 1325 SHA256 5c79e487583ffa41f2823235e61232f84c1ac18ef41b1b71150f8d32f76b82eb SHA512 ae25f27a0c0cc5c3460b150f3eb6369e34b3051984b58da6a81847b5e90edc62e91fdd8f0d428576ef73614db095dc3a415237cccc1cc3cc806f9d99ff588df5 WHIRLPOOL d8b1221d484e12c31d76a20e8a7e6e0d033e16884e7dd14f657d4383f24f8f9294bc51dea4f512896a4183f9299c2faef31e7540d95c418000245090a3a0cdfe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJRLHqyAAoJEHfx8XVYajsfu7UP/1R35zbYsETZUNwXFPoNeQUh -xRcCOSH8vqCmv9tllRDt85T2A0TexwasXaUyZxDACuwBAcRmGaYRrJYdDay43RDb -BFEyuBm+/CyBSC24iZKFNQvxrtvw62Se3RmdzPsZlyrktxNTKipHfvnkq9L1atN1 -ahoe89i/h0Wxk93m87S79zcuTdclRXkg2AmySStu9dDi4Wxe1Ann8R4IIGZEvfc8 -TSRDR+PYZ4TJ8mHPdmm7u0DNl4qMc6Q4bl0wzz5fukTYadrpYOVHGW9Id7lqWxGf -gF4zJqPGzZ48ctznApUMvBlusj7PuUvsfFPkLpXxijmoYHi4OMqHg6pgc06LBvzt -Og/iUFo+5PvFSf7BC21ULuRks19uCyVHgF0UtoKVpDTRO3Cr5yHLVDV9ZmP7FHKb -tq+jJKkkUK2P3xjUEBQovVq4TuW/L1dfQgf3Kbzh9YcrPnIEey5J3Ozsz/w9ED/y -NZwvhQNJek0y45PyYw+nCvUR+prTV4v13/xyObhW8rLZzdQ9Rk0YDF5tQS//C555 -I/VU3Wrm3GXrFOK95tg6M0lJ1+0UbMzXapswEkYwLOhtPN2A5OQFDjmjSjlhLgzc -DbcrcZD+tJkLKR4DhuZwV3cCeyvvRBzLfAKmoDZpGbQorbpWVJDsXwjVwWZiCkVF -cQGXp0S6gALuy8K0e8b0 -=/IkY +iQIcBAEBCAAGBQJRMInTAAoJEHfx8XVYajsf6H4P/2RCkjlIT5NikxeklOxVzGwd +vWTW+k+XXPZuCopfAcT/4bhqPCyDg0mZE6aic7UIh30NelJk6SeFWJNuSwhaEknY +zvjGKQG03rG8hTrCCmiNpXRyqVhPAwID5RrLR4XUZJo+1lvobX+b7rcL5T1d+i0Y +kGeZDSWYIAutXPsWRYZ45k4eEo1aw+sLFtbDhR8HevkuMExrtAyKNt15Lo4IXB+3 +CCaXsYbh8eRQyjSplV2GgM+SQdVEZO57/zAfPmHt9XxBXLCgyJrqJOEfK07t7iwZ +qvXZV1LJ9xX2weaQw3i+w2HhZsiGqUVugwTkUMZ2gCGiWc670r9T/nUHgjkM1hmQ +9jmXF+IGD8cnHNbPsSYaYw9IkHF4t76ZYgVU9JCPeRWR4EDpDBeapgVj6KV95Ocy +H6ghy7mbdzWvXJtbD8P340loGB/1JF3wM1dr0tkiZ2rO5z5W+vbHdVlSZX6vVtaT ++9Uhsn/IyHya82GVOupdxA36RlsJ0WYFcqcWOop68sPk1BH4Xrk1pD5t+WijCqjv +AxC24X8bH2ECK1PwdY5khJcgv5fERPnbYC+i8E6uL3pIuzjEZQq0rzb7MskH57BH +qq/JSPR13yjK3a+8dgInPIMWI6TO4LLBdS/g51znEj9XtwL6KLztm/1x++jeEWqS +a86w+kUPXUENcktP4Zll +=AVn0 -----END PGP SIGNATURE----- diff --git a/mail-filter/opendkim/files/opendkim-2.8.0-berkeleydb.patch b/mail-filter/opendkim/files/opendkim-2.8.0-berkeleydb.patch new file mode 100644 index 000000000000..6e3eac272500 --- /dev/null +++ b/mail-filter/opendkim/files/opendkim-2.8.0-berkeleydb.patch @@ -0,0 +1,72 @@ +diff --git a/RELEASE_NOTES b/RELEASE_NOTES +index 1233905..2567a63 100644 +--- a/RELEASE_NOTES ++++ b/RELEASE_NOTES +@@ -3,6 +3,10 @@ + This listing shows the versions of the OpenDKIM package, the date of + release, and a summary of the changes in that release. + ++2.8.1 2013/0?/?? ++ BUILD: Fix build for versions of libdb between 3.1 and 4.6. ++ Problem noted by John Wood. ++ + 2.8.0 2013/02/25 + Feature request #SF2964383: Add DKIM_LIBFLAGS_STRICTRESIGN, which + inhibits signing of a handle tagged for resigning when the +diff --git a/configure.ac b/configure.ac +index ff018de..64d567a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -14,7 +14,7 @@ AC_PREREQ(2.61) + # + m4_define([VERSION_RELEASE], 2) + m4_define([VERSION_MAJOR_REV], 8) +-m4_define([VERSION_MINOR_REV], 0) ++m4_define([VERSION_MINOR_REV], 1) + m4_define([VERSION_PATCH], 0) + + # +diff --git a/libopendkim/dkim-cache.c b/libopendkim/dkim-cache.c +index 1bb10e8..c43cc0c 100644 +--- a/libopendkim/dkim-cache.c ++++ b/libopendkim/dkim-cache.c +@@ -508,7 +508,13 @@ dkim_cache_stats(DB *db, u_int *queries, u_int *hits, u_int *expired, + #if DB_VERSION_CHECK(2,0,0) + DB_HASH_STAT *sp; + ++# if DB_VERSION_CHECK(4,3,0) + if (db->stat(db, NULL, (void *) &sp, 0) != 0) ++# elif DB_VERSION_CHECK(4,0,0) ++ if (db->stat(db, (void *) &sp, 0) != 0) ++# else /* DB_VERSION_CHECK(4,0,0) */ ++ if (db->stat(db, (void *) &sp, NULL, 0) != 0) ++# endif /* DB_VERSION_CHECK(4,0,0) */ + { + *keys = (u_int) -1; + } +diff --git a/libopendkim/tests/t-test49.c b/libopendkim/tests/t-test49.c +index e54cb37..318ad8a 100644 +--- a/libopendkim/tests/t-test49.c ++++ b/libopendkim/tests/t-test49.c +@@ -53,7 +53,7 @@ main(int argc, char **argv) + + int status; + int err; +- u_int s1, s2, s3; ++ u_int s1, s2, s3, s4; + size_t buflen; + DB *cache; + char buf[BUFRSZ + 1]; +@@ -99,10 +99,11 @@ main(int argc, char **argv) + assert(status == 1); + + printf("--- retrieve cache stats\n"); +- dkim_cache_stats(&s1, &s2, &s3); ++ dkim_cache_stats(cache, &s1, &s2, &s3, &s4, FALSE); + assert(s1 == 3); + assert(s2 == 1); + assert(s3 == 1); ++ assert(s4 == 0); + + dkim_cache_close(cache); + #endif /* ! QUERY_CACHE */ diff --git a/mail-filter/opendkim/opendkim-2.8.0-r1.ebuild b/mail-filter/opendkim/opendkim-2.8.0-r1.ebuild new file mode 100644 index 000000000000..7f5db05e604d --- /dev/null +++ b/mail-filter/opendkim/opendkim-2.8.0-r1.ebuild @@ -0,0 +1,194 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-2.8.0-r1.ebuild,v 1.1 2013/03/01 10:58:25 eras Exp $ + +EAPI=5 +inherit eutils db-use autotools user + +# for betas +#MY_P=${P/_b/.B} +#S=${WORKDIR}/${PN}-2.8.0 +#SRC_URI="mirror://sourceforge/opendkim/${MY_P}.tar.gz" + +DESCRIPTION="A milter-based application to provide DKIM signing and verification" +HOMEPAGE="http://opendkim.org" +SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz" + +LICENSE="Sendmail-Open-Source BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+berkdb gnutls ldap lua opendbx poll sasl +ssl static-libs unbound" + +DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail ) + dev-libs/libbsd + ssl? ( >=dev-libs/openssl-0.9.8 ) + berkdb? ( >=sys-libs/db-3.2 ) + opendbx? ( >=dev-db/opendbx-1.4.0 ) + lua? ( dev-lang/lua ) + ldap? ( net-nds/openldap ) + sasl? ( dev-libs/cyrus-sasl ) + unbound? ( >=net-dns/unbound-1.4.1 net-dns/dnssec-root ) + !unbound? ( net-libs/ldns ) + gnutls? ( >=net-libs/gnutls-2.11.7 )" + +RDEPEND="${DEPEND} + sys-process/psmisc" + +REQUIRED_USE="sasl? ( ldap )" + +pkg_setup() { + enewgroup milter + # mail-milter/spamass-milter creates milter user with this home directory + # For consistency reasons, milter user must be created here with this home directory + # even though this package doesn't need a home directory for this user (#280571) + enewuser milter -1 -1 /var/lib/milter milter +} + +src_prepare() { + sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \ + -e 's:/var/db/opendkim:/var/lib/opendkim:g' \ + -e 's:/etc/mail:/etc/opendkim:g' \ + -e 's:mailnull:milter:g' \ + -e 's:^#[[:space:]]*PidFile.*:PidFile /var/run/opendkim/opendkim.pid:' \ + opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \ + stats/opendkim-reportstats || die + + sed -i -e 's:dist_doc_DATA:dist_html_DATA:' libopendkim/docs/Makefile.am \ + || die + + # don't go over the sock length and fail + sed -i -e '/^sock/s/t-sign-ss-macro-value-file.sock/t-s-s-m-v-f.sock/' \ + opendkim/tests/t-sign-ss-macro-value-file.lua || die + + epatch "${FILESDIR}/${PN}-2.8.0-unbreak_upgrade.patch" + epatch "${FILESDIR}/${PN}-2.8.0-berkeleydb.patch" + eautoreconf +} + +src_configure() { + local myconf + if use berkdb ; then + myconf=$(db_includedir) + myconf="--with-db-incdir=${myconf#-I}" + myconf+=" --enable-popauth" + myconf+=" --enable-query_cache" + myconf+=" --enable-stats" + fi + if use unbound; then + myconf+=" --with-unbound" + else + myconf+=" --with-ldns" + fi + if use ldap; then + myconf+=" $(use_with sasl)" + fi + econf \ + $(use_with berkdb db) \ + $(use_with opendbx odbx) \ + $(use_with lua) \ + $(use_enable lua rbl) \ + $(use_with ldap openldap) \ + $(use_enable poll) \ + $(use_enable static-libs static) \ + $(use_with gnutls) \ + ${myconf} \ + --docdir=/usr/share/doc/${PF} \ + --htmldir=/usr/share/doc/${PF}/html \ + --enable-filter \ + --enable-adsp_lists \ + --enable-dkim_reputation \ + --enable-identity_header \ + --enable-rate_limit \ + --enable-redirect \ + --enable-resign \ + --enable-replace_rules \ + --enable-default_sender \ + --enable-sender_macro \ + --enable-vbr \ + --disable-rpath \ + --disable-live-testing \ + --with-test-socket=/tmp/opendkim-S +} + +src_install() { + emake DESTDIR="${D}" install + + dosbin stats/opendkim-reportstats + newinitd "${FILESDIR}/opendkim.init.r3" opendkim + dodir /etc/opendkim /var/lib/opendkim + fowners milter:milter /var/lib/opendkim + + # default configuration + if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then + grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \ + > "${D}"/etc/opendkim/opendkim.conf + if use unbound; then + echo TrustedAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf + fi + echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf + if use berkdb; then + echo Statistics /var/lib/opendkim/stats.dat >> \ + "${D}"/etc/opendkim/opendkim.conf + fi + fi + + use static-libs || find "${D}" -name "*.la" -delete +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSION} ]]; then + elog "If you want to sign your mail messages and need some help" + elog "please run:" + elog " emerge --config ${CATEGORY}/${PN}" + elog "It will help you create your key and give you hints on how" + elog "to configure your DNS and MTA." + + ewarn "Make sure your MTA has r/w access to the socket file." + ewarn "This can be done either by setting UMask to 002 and adding MTA's user" + ewarn "to milter group or you can simply set UMask to 000." + fi +} + +pkg_config() { + local selector keysize pubkey + + read -p "Enter the selector name (default ${HOSTNAME}): " selector + [[ -n "${selector}" ]] || selector=${HOSTNAME} + if [[ -z "${selector}" ]]; then + eerror "Oddly enough, you don't have a HOSTNAME." + return 1 + fi + if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then + ewarn "The private key for this selector already exists." + else + keysize=1024 + # generate the private and public keys + opendkim-genkey -b ${keysize} -D "${ROOT}"etc/opendkim/ \ + -s ${selector} -d '(your domain)' && \ + chown milter:milter \ + "${ROOT}"etc/opendkim/"${selector}".private || \ + { eerror "Failed to create private and public keys." ; return 1; } + chmod go-r "${ROOT}"etc/opendkim/"${selector}".private + fi + + # opendkim selector configuration + echo + einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:" + einfo " Keyfile /etc/opendkim/${selector}.private" + einfo " Selector ${selector}" + + # MTA configuration + echo + einfo "If you are using Postfix, add following lines to your main.cf:" + einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock" + einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock" + einfo " and read http://www.postfix.org/MILTER_README.html" + + # DNS configuration + einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:" + cat "${ROOT}"etc/opendkim/${selector}.txt + einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:" + einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text" + einfo + einfo "Also look at the ADSP http://tools.ietf.org/html/rfc5617" +} |