summaryrefslogtreecommitdiff
path: root/mail-mta/sendmail
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /mail-mta/sendmail
reinit the tree, so we can have metadata
Diffstat (limited to 'mail-mta/sendmail')
-rw-r--r--mail-mta/sendmail/Manifest17
-rw-r--r--mail-mta/sendmail/files/libmilter-sharedlib.patch55
-rw-r--r--mail-mta/sendmail/files/sendmail25
-rw-r--r--mail-mta/sendmail/files/sendmail-8.14.5+db-5.0.patch13
-rw-r--r--mail-mta/sendmail/files/sendmail-8.14.6-build-system.patch211
-rw-r--r--mail-mta/sendmail/files/sendmail-delivered_hdr.patch10
-rw-r--r--mail-mta/sendmail/files/sendmail-procmail.mc12
-rw-r--r--mail-mta/sendmail/files/sendmail-starttls-multi-crl.patch20
-rw-r--r--mail-mta/sendmail/files/sendmail.mc-r111
-rw-r--r--mail-mta/sendmail/files/sendmail.service15
-rw-r--r--mail-mta/sendmail/files/site.config.m416
-rw-r--r--mail-mta/sendmail/files/sm-client.service14
-rw-r--r--mail-mta/sendmail/metadata.xml8
-rw-r--r--mail-mta/sendmail/sendmail-8.14.9-r1.ebuild205
-rw-r--r--mail-mta/sendmail/sendmail-8.14.9.ebuild202
15 files changed, 834 insertions, 0 deletions
diff --git a/mail-mta/sendmail/Manifest b/mail-mta/sendmail/Manifest
new file mode 100644
index 000000000000..2cffaa41878a
--- /dev/null
+++ b/mail-mta/sendmail/Manifest
@@ -0,0 +1,17 @@
+AUX libmilter-sharedlib.patch 2843 SHA256 3a753b0881fe622814b471ee5f9037905c7cc3ed08ef74908464ab5307e59d5a SHA512 31c36b57739946c1b9c7c85307fe5c53c45d7f8cbf427a0f2248db8b74871a6f5a30ef1af524915821aeca54310d28272bcd0a587cb918192214fa5c30e4a8da WHIRLPOOL 1ee6cdbee9e32e66c5836d7a296f741476d4cf03625dd4409ecdaba5001063e11b1f6f3d3b07e8150563641eaa78ff336759e278782f04bcab75d2dc73a10e8f
+AUX sendmail 595 SHA256 102e312ecdd06be2426f9d3de55ccfac60aca2eda8cadd8c634b6ae0ef35c5e8 SHA512 0a1611eeec33a7d7eecff75ed6c8f70abf0d6d8cf4a5242f084da0d4139e0e871239e9893a53782e5dab80c4386c62d96ec03839fc98a497e697fce1f7a149aa WHIRLPOOL 0d7ca7ee89b86935c33882eacb0625edc345151b0616d029eaefee7053eae1c3b86f78a3588da682951036aecc8aae3cf7d83d48c85f1b7cc93a16603b1b6813
+AUX sendmail-8.14.5+db-5.0.patch 432 SHA256 8de05f83c7d6fd287e965666f7b4c502fb0e00dc872a0c83ff48b0a83735f9a6 SHA512 f9df3b0560a0620a9875f6e85b1ea0866879aafd3475efa47539f41f4b54a34fe91c752a067fb62634cb71ad09c44b8408bdacddf3d5c47545b49c618eb005ec WHIRLPOOL 4f3fcaf7b123caba5cf2a13a243bbdc6f7a69d69088107c829a96a4c274137fdac13143a12a1c8ea92ce7cf3013e5fbd66e586ffdf08f16e1ced429fcf28826c
+AUX sendmail-8.14.6-build-system.patch 12909 SHA256 ca489d3b4c305a3e28ab0b6034484d0eac9ea84e1a89354d5903aca3ae8083cc SHA512 0e03b7cfd7f3002a36fed2fca60240314bac175a502ca9bda8397e7ad07e26faf8d3437bbdcdb9cda4dbc6b4917ca0ed1b5c9126ad246044dc7da8ce3ad70b54 WHIRLPOOL 026c355b31666b8e67887ab4da0411cbcbbe96373da434f25238888b68c1942a0e588c8540fc5b5069d3422556058cc53d1b924ee7811202ab6b514c00c8c147
+AUX sendmail-delivered_hdr.patch 341 SHA256 bfe354d1047c66ea857e56cb374f583eb779c8f4ccc92ea766e916ec358cd77c SHA512 1e97ca1b32e6cbb69fe08d4e1c5dee0763ef874537448e60129f71f82bc92c78fc5d9e124568d21188b6e6e2186a1a3c9f1362b0d0734f7e12e2272643238254 WHIRLPOOL 60e858808e7df43aa0da536921052931cbcfab754bdc979b2e56556879c4e4416c45aaa38bce7affc4a0a7fe9fb519d2f0a2ecc8ee93db81e5101413c7b20e11
+AUX sendmail-procmail.mc 295 SHA256 6972193f47b4d91221a9082e33670059c41439794efbfa9f7cc6efe8dba77ef6 SHA512 eb693fb91acdc3cbc4601d517119300f238c20e86dc0dbc137a209ce56bd5bf7d7a8c9848a143daf932be487d919004da994ba2dbd7494ea5be6e08929549d58 WHIRLPOOL ba9478d4e618f9a8405b3d8a5413cba853d142f5a161f8fe580f53e08e20eb74bd92ebd95e63cea6dfc82b0b1b0c5aecfba18b8220b4d3c4d9a4108433a54433
+AUX sendmail-starttls-multi-crl.patch 643 SHA256 9cfbc3f9049c6380693854cd1f3af95ec24f02db7116939b808751acaed1f313 SHA512 3028c9aca8b1f69d911b8fa78027acc949b1584fdb5be514ee71cb2860658ed1a13ee964696a93af3e9999c7f02526c046455d8740129d3eea546c272df24bd2 WHIRLPOOL 986b36c2c5f1d297d3a8df409b045e940d61d09db5f6dcf927fd6e429aa8593a6db64757a12531306b320e9a23dbb4d69bfec9952ab597a241cbd11c70e611c1
+AUX sendmail.mc-r1 285 SHA256 a26043f1b06f27eaa6238a696cf23e16b593128ebe086fed40b87c61865b1ac7 SHA512 f197572f4004cd1f9de4c423d1d5ded382535b9643b32aa8dc03889cdf76bf918702a77a20edde5f2d19276ca7ec473cac5db01c42b0833cda950cfc11cbbf41 WHIRLPOOL 8d32f1a88ca995b272c54696bf3af2fe218b0d6998dd80897fbf256d852091a6f89f1030d0806191fd649bcb5513813354823b917c9a680d61c8b7fdc411f28f
+AUX sendmail.service 353 SHA256 8238af44ac0baa8c39d38a047933c3dc66a015b7f93254b2e1033d0d211aa933 SHA512 3bf4d502c965c56c7d421b1a1b68ab49d42f61d7227bf91d56c527ed1ae1a604aead35a6b774f6e534e9b014f3f6d1e53c00c349df1f2b90a81f70b5d5948012 WHIRLPOOL e28c138c60cf68deda558ec433314ff1a698c761c88a35e0917db371437f35016c3414c73185bd58467bdee1b3d1f6e7da7307e3c350761e331d6e410c6a5fe8
+AUX site.config.m4 564 SHA256 3a7d586f8dfc24f7ed53621c04374aeca91153ded80cf17411ce417a45aade44 SHA512 82d9bbb233e6ffbcef411f8a8184b47aea27f3dc0b41ace053e0107e05a5fe6929d9dd76d3d1baf0ce43be78dc46f40888ad0c93e4f126f6ce0c0372007a262d WHIRLPOOL 3eb5169eda91a67e62fd6ece0bb69bb9dbe3f7e210a40242a172a7b3e80952713170882f89ddbb1c49b261cdefce05992c61417560e6df9e7f0860a97cb5c0bb
+AUX sm-client.service 418 SHA256 c70560eb85b32895dcb36fd398b3066a39597e2def33e1eead4f55f3059c82d6 SHA512 26e5a64790fd7106e45de0f4dfafb3b648094953bd1831a223ca7c60b7cb75b673fb554b426a6aa0e7dc200a134fd042b4ecc6795641cfddd82bd04e4c7ea324 WHIRLPOOL e6b176381beb18fc240154696d8056b1483a2ff97bb7d012bece388087dcb16adf2db3b626a717b001cea8ffe8cb81e527e2174ecd463ed452fd68e2ad96e12f
+DIST sendmail.8.14.9.tar.gz 2114293 SHA256 f5a497151abd8f341cca0736c3f9bd703d574d93146b2989689dff6d7a445d75 SHA512 a541fe687e9967fb87f2f6c6263ecc698aac42c6a52e81e7ee556f0c3d719b9c996dfccf10cc2e0e5c6d03dd8d3ce79b856b78ca049dd47665e38c77763fa424 WHIRLPOOL c1b290d66d9397bbe8041cd17cfc1fbc205c9d5439d89ee59c339e3febe605d964e7a50482101edec8f0b9cd6df38138e489869a5404dbfc2b7ba57dbeef1c55
+EBUILD sendmail-8.14.9-r1.ebuild 7110 SHA256 038b3adf4ec687a1ad666fe001f49d627ce75cf5def21b9b4bb1ac9b577083d6 SHA512 3392d8cc6f5370958a22055cd403c9730b17e28a2388bb87264edbd264ddf117ca1c43a3623ba70126542dd63cfe5a611a3a6c1bfc15fda4dc4a3a2bc08f8652 WHIRLPOOL 128bd32471729311abf0d9bd4003a30f83cb3f3ca6099c850bdfc4c38fe951cafbca73dac4253a38e42932d1916a5eee3966d2789e20cb66504cca8c5a730be4
+EBUILD sendmail-8.14.9.ebuild 7038 SHA256 a36aa4a7502d629ec81e9714f4fe3907c1294a845261684feaa8c6eeb4449356 SHA512 bb29cee737f08e55e672315ac0dfa26d660dcbdf2dec2b6cd648596449ff837be654890c14f68fd13612d3d799ea084af3bd55a514ab5c67ef0ae4ba9273ced2 WHIRLPOOL f73a6bad4857e9db19ccd26ca387870a9776e7cecaac108c39d328253e2a530a0f874ae5c11f98791970bc7e030c68328b7eb66db4ee5dd2674f51649245b039
+MISC ChangeLog 3043 SHA256 d90830b1f29106f8ddba1c0a5cbd9b892b4360df0449237a5ce7f5dadde8a2f2 SHA512 1b3fd8a43c6729c3567f53d4b6919743189aeec8fc4df97f6693eb6adf6d28cb34b3e388aae03d88e50fbe5547560e7162d1d38031631268ead25fdc80654e82 WHIRLPOOL 916a6c4e69ec6917112783059d0e84c020c6004e63770568b0bfde1fdaea41ee9f24c3bd3f3eb8810a0801c0723f807fe33581f26de00161a9a0a5990fa39fa8
+MISC ChangeLog-2015 26755 SHA256 bf440575028af352c0b34015b6e6352e1257064883d728af69618d6cff2b8a17 SHA512 bb22f00ae2f27725bda3fd1a93c929c545042ba83351735a4be76d2e105b76972b789be0a1b39ee80631355b5592162ed4449935231bd023a7ca54ede4919e79 WHIRLPOOL e847db3f6fbf380268abd2299a7b7c5ac453592982aeca9cb0d6b2169790614028079821f1b9b977b7d706c8071367fa4e9e4848ae4a33988444bcc65209525f
+MISC metadata.xml 244 SHA256 856e819659934229aa18649e0c783b9714fa33065cb5113e7b667ed68392b39a SHA512 0e856f808459b6d83c6eaeee418d87d85385968a39e6c1871a0eb76c04b533bbba16996a6f18613b7c550da90c76843bd01237be9b9f290394048e904535653c WHIRLPOOL 2aa292ef66863766df8920a2ebd497218854f9a41724cdef1d63a93c94620fbea641a688af2bb374673773dd5b1b8afff80867c974f49d5600991ab44f9b8752
diff --git a/mail-mta/sendmail/files/libmilter-sharedlib.patch b/mail-mta/sendmail/files/libmilter-sharedlib.patch
new file mode 100644
index 000000000000..43ec78612190
--- /dev/null
+++ b/mail-mta/sendmail/files/libmilter-sharedlib.patch
@@ -0,0 +1,55 @@
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4 sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4 1970-01-01 01:00:00.000000000 +0100
++++ sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4 2009-08-22 21:51:10.000000000 +0200
+@@ -0,0 +1,39 @@
++divert(-1)
++#
++# Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
++# All rights reserved.
++#
++# By using this file, you agree to the terms and conditions set
++# forth in the LICENSE file which can be found at the top level of
++# the sendmail distribution.
++#
++#
++# Definitions for Makefile construction for sendmail
++#
++divert(0)dnl
++include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/links.m4')dnl
++bldLIST_PUSH_ITEM(`bldC_PRODUCTS', bldCURRENT_PRODUCT)dnl
++bldPUSH_TARGET(bldCURRENT_PRODUCT`.so' bldCURRENT_PRODUCT`.a')dnl
++bldPUSH_INSTALL_TARGET(`install-'bldCURRENT_PRODUCT)dnl
++bldPUSH_CLEAN_TARGET(bldCURRENT_PRODUCT`-clean')dnl
++
++include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
++divert(bldTARGETS_SECTION)
++bldCURRENT_PRODUCT.so: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
++ ${CCLINK} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so -Wl,confSONAME,bldCURRENT_PRODUCT.so.${MILTER_SOVER} ${bldCURRENT_PRODUCT`OBJS'} -lc ${LIBS}
++bldCURRENT_PRODUCT.a: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
++ ${AR} ${AROPTS} bldCURRENT_PRODUCT.a ${bldCURRENT_PRODUCT`OBJS'}
++ ${RANLIB} ${RANLIBOPTS} bldCURRENT_PRODUCT.a
++ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
++
++install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so bldCURRENT_PRODUCT.a
++ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}" ]; then confMKDIR -p "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}"; else :; fi ')
++ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${UBINMODE} bldCURRENT_PRODUCT.so "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so.${MILTER_SOVER}"
++ ${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.${MILTER_SOVER} "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so"
++ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a "${DESTDIR}${LIBDIR}"')
++
++bldCURRENT_PRODUCT-clean:
++ rm -f ${OBJS} bldCURRENT_PRODUCT.so bldCURRENT_PRODUCT.a ${MANPAGES}
++
++divert(0)
++COPTS+= confCCOPTS_SO
+diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
+--- sendmail-8.14.3.orig/libmilter/Makefile.m4 2008-04-08 07:23:44.000000000 +0200
++++ sendmail-8.14.3/libmilter/Makefile.m4 2009-08-22 21:53:35.000000000 +0200
+@@ -9,7 +9,7 @@
+ SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
+ PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
+
+-bldPRODUCT_START(`library', `libmilter')
++bldPRODUCT_START(`milterlibrary', `libmilter')
+ define(`bldINSTALLABLE', `true')
+ define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
+ APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
diff --git a/mail-mta/sendmail/files/sendmail b/mail-mta/sendmail/files/sendmail
new file mode 100644
index 000000000000..0f6d62da6085
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use dns logger antivirus
+ provide mta
+}
+
+start() {
+ ebegin "Starting sendmail"
+ /usr/bin/newaliases > /dev/null 2>&1
+ (cd /var/spool/mqueue; rm -f xf*)
+ /usr/sbin/sendmail ${SENDMAIL_OPTS} > /dev/null 2>&1
+ /usr/sbin/sendmail ${CLIENTMQUEUE_OPTS} > /dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sendmail"
+ kill ${KILL_OPTS} `head -n 1 /var/run/sendmail.pid`
+ kill ${KILL_OPTS} `head -n 1 /var/spool/clientmqueue/sm-client.pid`
+ eend $?
+}
diff --git a/mail-mta/sendmail/files/sendmail-8.14.5+db-5.0.patch b/mail-mta/sendmail/files/sendmail-8.14.5+db-5.0.patch
new file mode 100644
index 000000000000..99ecbe081674
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail-8.14.5+db-5.0.patch
@@ -0,0 +1,13 @@
+Index: sendmail-8.14.4/include/sm/bdb.h
+===================================================================
+--- sendmail-8.14.4.orig/include/sm/bdb.h
++++ sendmail-8.14.4/include/sm/bdb.h
+@@ -19,7 +19,7 @@
+ # define DB_VERSION_MAJOR 1
+ # endif /* ! DB_VERSION_MAJOR */
+
+-# if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
++# if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR >= 5
+
+ # define DBTXN NULL ,
+
diff --git a/mail-mta/sendmail/files/sendmail-8.14.6-build-system.patch b/mail-mta/sendmail/files/sendmail-8.14.6-build-system.patch
new file mode 100644
index 000000000000..3348e921926c
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail-8.14.6-build-system.patch
@@ -0,0 +1,211 @@
+diff -Nru sendmail-8.14.3.orig/cf/cf/Makefile sendmail-8.14.3/cf/cf/Makefile
+--- sendmail-8.14.3.orig/cf/cf/Makefile 2005-06-14 04:16:34.000000000 +0200
++++ sendmail-8.14.3/cf/cf/Makefile 2009-09-20 10:55:50.000000000 +0200
+@@ -80,10 +80,10 @@
+ install-cf: install-sendmail-cf install-submit-cf
+
+ install-sendmail-cf: $(CF).cf
+- $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf
++ $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf "${DESTDIR}$(MAILDIR)/sendmail.cf"
+
+ install-submit-cf: $(SUBMIT).cf
+- $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf
++ $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf "${DESTDIR}$(MAILDIR)/submit.cf"
+
+ depend:
+
+diff -Nru sendmail-8.14.6.orig/devtools/M4/UNIX/defines.m4 sendmail-8.14.6/devtools/M4/UNIX/defines.m4
+--- sendmail-8.14.6.orig/devtools/M4/UNIX/defines.m4 2012-01-21 00:07:08.000000000 +0000
++++ sendmail-8.14.6/devtools/M4/UNIX/defines.m4 2012-12-27 08:13:15.792214375 +0000
+@@ -26,7 +26,7 @@
+ CCLINK = ifdef(`confCCLINK', `confCCLINK', `confCC')
+ # Linker for libraries
+ LD= ifdef(`confLD', `confLD', `confCC')
+-LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
++LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
+ LDOPTS_SO= ${LDOPTS} ifdef(`confLDOPTS_SO', `confLDOPTS_SO', `-shared')
+
+ # Shell
+@@ -71,7 +71,7 @@
+ LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS')
+
+ # libraries required on your system
+-LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST')
++LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
+
+ # location of sendmail binary (usually /usr/sbin or /usr/lib)
+ BINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 sendmail-8.14.3/devtools/M4/UNIX/executable.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 2006-10-06 07:44:44.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/executable.m4 2009-09-20 10:50:36.000000000 +0200
+@@ -30,12 +30,12 @@
+
+ ifdef(`bldNO_INSTALL', ,
+ `install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT ifdef(`bldTARGET_INST_DEP', `bldTARGET_INST_DEP')
+- ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'BINDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'BINDIR}; else :; fi ')
+- ${INSTALL} -c -o ${bldBIN_TYPE`'BINOWN} -g ${bldBIN_TYPE`'BINGRP} -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${bldINSTALL_DIR`'BINDIR}
++ ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${bldINSTALL_DIR`'BINDIR}" ]; then confMKDIR -p "${DESTDIR}${bldINSTALL_DIR`'BINDIR}"; else :; fi ')
++ ${INSTALL} -c -o ${bldBIN_TYPE`'BINOWN} -g ${bldBIN_TYPE`'BINGRP} -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT "${DESTDIR}${bldINSTALL_DIR`'BINDIR}"
+ ifdef(`bldTARGET_LINKS', `bldMAKE_TARGET_LINKS(${bldINSTALL_DIR`'BINDIR}/bldCURRENT_PRODUCT, ${bldCURRENT_PRODUCT`'TARGET_LINKS})')')
+
+ strip-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT
+- ${STRIP} ${STRIPOPTS} ${DESTDIR}${bldINSTALL_DIR`'BINDIR}`'/bldCURRENT_PRODUCT
++ ${STRIP} ${STRIPOPTS} "${DESTDIR}${bldINSTALL_DIR`'BINDIR}`'/bldCURRENT_PRODUCT"
+
+ bldCURRENT_PRODUCT-clean:
+ rm -f ${OBJS} bldCURRENT_PRODUCT ${MANPAGES}
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 sendmail-8.14.3/devtools/M4/UNIX/library.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 2006-09-06 00:56:53.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/library.m4 2009-09-20 10:50:36.000000000 +0200
+@@ -27,8 +27,8 @@
+ ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
+
+ install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a
+-ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ')
+- ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}')
++ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${LIBDIR}" ]; then confMKDIR -p "${DESTDIR}${LIBDIR}"; else :; fi ')
++ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a "${DESTDIR}${LIBDIR}"')
+
+ bldCURRENT_PRODUCT-clean:
+ rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
+--- sendmail-8.14.6.orig/devtools/M4/UNIX/manpage.m4 2012-01-21 00:07:08.000000000 +0000
++++ sendmail-8.14.6/devtools/M4/UNIX/manpage.m4 2012-12-27 08:28:52.617502447 +0000
+@@ -68,11 +68,11 @@
+ ifdef(`confNO_MAN_INSTALL', `divert(-1)', `dnl')
+ define(`bldMAN_INSTALL_CMD',
+ `ifdef(`confDONT_INSTALL_CATMAN', `dnl',
+-` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}; else :; fi ')
+- ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'')
++` ifdef(`confMKDIR', `if [ ! -d "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}" ]; then confMKDIR -p "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}"; else :; fi ')
++ ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}''")
+ ifdef(`confINSTALL_RAWMAN',
+-` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}; else :; fi ')
+- ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'', `dnl')'
++` ifdef(`confMKDIR', `if [ ! -d "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'" ]; then confMKDIR -p "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'"; else :; fi ')
++ ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}''", `dnl')'
+ )dnl
+ bldFOREACH(`bldMAN_INSTALL_CMD(', `bldMAN_PAGES')
+ ifdef(`confNO_MAN_INSTALL', `divert(0)', `dnl')
+diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
+--- sendmail-8.14.3.orig/libmilter/Makefile.m4 2008-04-08 07:23:44.000000000 +0200
++++ sendmail-8.14.3/libmilter/Makefile.m4 2009-09-20 10:50:36.000000000 +0200
+@@ -32,9 +32,9 @@
+ MFAPI= ${SRCDIR}/inc`'lude/libmilter/mfapi.h
+ MFDEF= ${SRCDIR}/inc`'lude/libmilter/mfdef.h
+ install-mfapi: ${MFAPI}
+- if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi
+- ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h
+- ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h
++ if [ ! -d "${DESTDIR}${INCLUDEDIR}/libmilter" ]; then mkdir -p "${DESTDIR}${INCLUDEDIR}/libmilter"; else :; fi
++ ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} "${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h"
++ ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} "${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h"
+ divert(0)
+
+ bldFINISH
+diff -Nru sendmail-8.14.3.orig/mail.local/Makefile.m4 sendmail-8.14.3/mail.local/Makefile.m4
+--- sendmail-8.14.3.orig/mail.local/Makefile.m4 2006-06-28 23:08:02.000000000 +0200
++++ sendmail-8.14.3/mail.local/Makefile.m4 2009-09-20 10:56:24.000000000 +0200
+@@ -30,7 +30,7 @@
+ force-install: install-mail.local ifdef(`confNO_MAN_BUILD',, `install-docs')
+
+ install-mail.local: mail.local
+- ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} mail.local ${DESTDIR}${EBINDIR}
++ ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} mail.local "${DESTDIR}${EBINDIR}"
+ divert
+
+ bldFINISH
+diff -Nru sendmail-8.14.3.orig/rmail/Makefile.m4 sendmail-8.14.3/rmail/Makefile.m4
+--- sendmail-8.14.3.orig/rmail/Makefile.m4 2006-06-28 23:08:04.000000000 +0200
++++ sendmail-8.14.3/rmail/Makefile.m4 2009-09-20 10:55:29.000000000 +0200
+@@ -31,7 +31,7 @@
+ force-install: install-rmail ifdef(`confNO_MAN_BUILD',, `install-docs')
+
+ install-rmail: rmail
+- ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} rmail ${DESTDIR}${UBINDIR}
++ ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} rmail "${DESTDIR}${UBINDIR}"
+ divert
+
+ bldFINISH
+diff -Nru sendmail-8.14.3.orig/sendmail/Makefile.m4 sendmail-8.14.3/sendmail/Makefile.m4
+--- sendmail-8.14.3.orig/sendmail/Makefile.m4.orig 2008-03-27 17:13:33.000000000 +0100
++++ sendmail-8.14.3/sendmail/Makefile.m4 2009-09-20 11:07:24.000000000 +0200
+@@ -14,9 +14,9 @@
+
+ dnl hack: /etc/mail is not defined as "location of .cf" in the build system
+ define(`bldTARGET_INST_DEP', ifdef(`confINST_DEP', `confINST_DEP',
+-`${DESTDIR}/etc/mail/submit.cf ${DESTDIR}${MSPQ}'))dnl
++`"${DESTDIR}/etc/mail/submit.cf" "${DESTDIR}${MSPQ}"'))dnl
+ define(`bldTARGET_LINKS', ifdef(`confLINKS', `confLINKS',
+-`${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat')
++`"${DESTDIR}${UBINDIR}/newaliases" "${DESTDIR}${UBINDIR}/mailq" "${DESTDIR}${UBINDIR}/hoststat" "${DESTDIR}${UBINDIR}/purgestat"')
+ )dnl
+
+ # location of sendmail statistics file (usually /etc/mail/ or /var/log)
+@@ -43,21 +43,21 @@
+ statistics:
+ ${CP} /dev/null statistics
+
+-${DESTDIR}/etc/mail/submit.cf:
++"${DESTDIR}/etc/mail/submit.cf":
+ @echo "Please read INSTALL if anything fails while installing the binary."
+ @echo "${DESTDIR}/etc/mail/submit.cf will be installed now."
+ cd ${SRCDIR}/cf/cf && make install-submit-cf
+
+ MSPQ=ifdef(`confMSP_QUEUE_DIR', `confMSP_QUEUE_DIR', `/var/spool/clientmqueue')
+
+-${DESTDIR}${MSPQ}:
++"${DESTDIR}${MSPQ}":
+ @echo "Please read INSTALL if anything fails while installing the binary."
+ @echo "You must have setup a new user ${MSPQOWN} and a new group ${GBINGRP}"
+ @echo "as explained in sendmail/SECURITY."
+- mkdir -p ${DESTDIR}${MSPQ}
+- chown ${MSPQOWN} ${DESTDIR}${MSPQ}
+- chgrp ${GBINGRP} ${DESTDIR}${MSPQ}
+- chmod 0770 ${DESTDIR}${MSPQ}
++ mkdir -p "${DESTDIR}${MSPQ}"
++ chown ${MSPQOWN} "${DESTDIR}${MSPQ}"
++ chgrp ${GBINGRP} "${DESTDIR}${MSPQ}"
++ chmod 0770 "${DESTDIR}${MSPQ}"
+
+ divert(0)
+
+@@ -68,30 +68,30 @@
+ divert(bldTARGETS_SECTION)
+
+ install-set-user-id: bldCURRENT_PRODUCT ifdef(`confNO_HELPFILE_INSTALL',, `install-hf') ifdef(`confNO_STATISTICS_INSTALL',, `install-st') ifdef(`confNO_MAN_BUILD',, `install-docs')
+- ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}
++ ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT "${DESTDIR}${M`'BINDIR}"
+ for i in ${sendmailTARGET_LINKS}; do \
+ rm -f $$i; \
+ ${LN} ${LNOPTS} ${M`'BINDIR}/sendmail $$i; \
+ done
+
+-define(`confMTA_LINKS', `${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat')
++define(`confMTA_LINKS', `"${DESTDIR}${UBINDIR}/newaliases" "${DESTDIR}${UBINDIR}/mailq" "${DESTDIR}${UBINDIR}/hoststat" "${DESTDIR}${UBINDIR}/purgestat"')
+ install-sm-mta: bldCURRENT_PRODUCT
+- ${INSTALL} -c -o ${M`'BINOWN} -g ${M`'BINGRP} -m ${M`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}/sm-mta
++ ${INSTALL} -c -o ${M`'BINOWN} -g ${M`'BINGRP} -m ${M`'BINMODE} bldCURRENT_PRODUCT "${DESTDIR}${M`'BINDIR}/sm-mta"
+ for i in confMTA_LINKS; do \
+ rm -f $$i; \
+ ${LN} ${LNOPTS} ${M`'BINDIR}/sm-mta $$i; \
+ done
+
+ install-hf:
+- if [ ! -d ${DESTDIR}${HFDIR} ]; then mkdir -p ${DESTDIR}${HFDIR}; else :; fi
+- ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m 444 helpfile ${DESTDIR}${HFFILE}
++ if [ ! -d "${DESTDIR}${HFDIR}" ]; then mkdir -p "${DESTDIR}${HFDIR}"; else :; fi
++ ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m 444 helpfile "${DESTDIR}${HFFILE}"
+
+ install-st: statistics
+- if [ ! -d ${DESTDIR}${STDIR} ]; then mkdir -p ${DESTDIR}${STDIR}; else :; fi
+- ${INSTALL} -c -o ${SBINOWN} -g ${UBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${STPATH}
++ if [ ! -d "${DESTDIR}${STDIR}" ]; then mkdir -p "${DESTDIR}${STDIR}"; else :; fi
++ ${INSTALL} -c -o ${SBINOWN} -g ${UBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics "${DESTDIR}${STPATH}"
+
+-install-submit-st: statistics ${DESTDIR}${MSPQ}
+- ${INSTALL} -c -o ${MSPQOWN} -g ${GBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${MSPQ}/${MSPSTFILE}
++install-submit-st: statistics "${DESTDIR}${MSPQ}"
++ ${INSTALL} -c -o ${MSPQOWN} -g ${GBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics "${DESTDIR}${MSPQ}/${MSPSTFILE}"
+
+ divert(0)
+ bldPRODUCT_END
diff --git a/mail-mta/sendmail/files/sendmail-delivered_hdr.patch b/mail-mta/sendmail/files/sendmail-delivered_hdr.patch
new file mode 100644
index 000000000000..6837fed1c46d
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail-delivered_hdr.patch
@@ -0,0 +1,10 @@
+--- sendmail/conf.c.orig 2004-07-14 21:54:23.000000000 +0000
++++ sendmail/conf.c 2004-12-06 15:22:05.000000000 +0000
+@@ -117,6 +117,7 @@
+ { "content-length", H_ACHECK, NULL },
+ { "subject", H_ENCODABLE, NULL },
+ { "x-authentication-warning", H_FORCE, NULL },
++ { "delivered-to", H_FORCE, NULL },
+
+ { NULL, 0, NULL }
+ };
diff --git a/mail-mta/sendmail/files/sendmail-procmail.mc b/mail-mta/sendmail/files/sendmail-procmail.mc
new file mode 100644
index 000000000000..af994ae33ad0
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail-procmail.mc
@@ -0,0 +1,12 @@
+divert(-1)
+divert(0)dnl
+include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
+VERSIONID(`$Id$')dnl
+OSTYPE(linux)dnl
+DOMAIN(generic)dnl
+FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
+FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
+FEATURE(`local_procmail')dnl
+MAILER(local)dnl
+MAILER(smtp)dnl
+MAILER(procmail)dnl
diff --git a/mail-mta/sendmail/files/sendmail-starttls-multi-crl.patch b/mail-mta/sendmail/files/sendmail-starttls-multi-crl.patch
new file mode 100644
index 000000000000..8d93817d07da
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail-starttls-multi-crl.patch
@@ -0,0 +1,20 @@
+Bug #354611
+--- sendmail/tls.c.orig 2010-05-26 21:54:30.000000000 -0600
++++ sendmail/tls.c 2010-05-26 21:54:36.000000000 -0600
+@@ -723,11 +723,12 @@
+ {
+ if (BIO_read_filename(crl_file, CRLFile) >= 0)
+ {
+- crl = PEM_read_bio_X509_CRL(crl_file, NULL,
+- NULL, NULL);
++ while((crl = PEM_read_bio_X509_CRL(crl_file, NULL, NULL, NULL)))
++ {
++ X509_STORE_add_crl(store, crl);
++ X509_CRL_free(crl);
++ }
+ BIO_free(crl_file);
+- X509_STORE_add_crl(store, crl);
+- X509_CRL_free(crl);
+ X509_STORE_set_flags(store,
+ X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL);
+ X509_STORE_set_verify_cb_func(store,
diff --git a/mail-mta/sendmail/files/sendmail.mc-r1 b/mail-mta/sendmail/files/sendmail.mc-r1
new file mode 100644
index 000000000000..dbc09b02bc74
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail.mc-r1
@@ -0,0 +1,11 @@
+divert(-1)
+divert(0)dnl
+include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
+VERSIONID(`$Id$')dnl
+OSTYPE(linux)dnl
+DOMAIN(generic)dnl
+FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
+FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
+define(`confTRUSTED_USER', `smmsp')dnl
+MAILER(local)dnl
+MAILER(smtp)dnl
diff --git a/mail-mta/sendmail/files/sendmail.service b/mail-mta/sendmail/files/sendmail.service
new file mode 100644
index 000000000000..1aeb769ececc
--- /dev/null
+++ b/mail-mta/sendmail/files/sendmail.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Sendmail Mail Transport Agent
+After=syslog.target network.target
+Wants=sm-client.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/sendmail.pid
+ExecStartPre=-/usr/bin/newaliases
+ExecStartPre=-/bin/rm -f /var/spool/mqueue/xf*
+ExecStart=/usr/sbin/sendmail -bd -q30m -L sm-mta
+
+[Install]
+WantedBy=multi-user.target
+Also=sm-client.service
diff --git a/mail-mta/sendmail/files/site.config.m4 b/mail-mta/sendmail/files/site.config.m4
new file mode 100644
index 000000000000..a9e0883a9b00
--- /dev/null
+++ b/mail-mta/sendmail/files/site.config.m4
@@ -0,0 +1,16 @@
+define(`confCCOPTS', `@@confCCOPTS@@')
+define(`confMAPDEF', `@@confMAPDEF@@')
+define(`confENVDEF', `@@confENVDEF@@')
+define(`confLIBS', `@@confLIBS@@')
+define(`confSTDIO_TYPE', `portable')
+define(`confLDOPTS', `-Wl,-z,now @@confLDOPTS@@')
+define(`confLDOPTS_SO', `-shared')
+define(`confCCOPTS_SO', `-fPIC')
+define(`confCC', `@@confCC@@')
+define(`confMANOWN', `root')
+define(`confMANGRP', `root')
+define(`confMANMODE', `644')
+define(`confMAN1SRC', `1')
+define(`confMAN5SRC', `5')
+define(`confMAN8SRC', `8')
+APPENDDEF(`conf_sendmail_LIBS', `@@conf_sendmail_LIBS@@')
diff --git a/mail-mta/sendmail/files/sm-client.service b/mail-mta/sendmail/files/sm-client.service
new file mode 100644
index 000000000000..4937c132914d
--- /dev/null
+++ b/mail-mta/sendmail/files/sm-client.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Sendmail Mail Transport Client
+After=syslog.target network.target sendmail.service
+BindTo=sendmail.service
+
+[Service]
+Type=forking
+PIDFile=/var/spool/clientmqueue/sm-client.pid
+ExecStartPre=/bin/touch /var/spool/clientmqueue/sm-client.pid
+ExecStartPre=/bin/chown smmsp:smmsp /var/spool/clientmqueue/sm-client.pid
+ExecStart=/usr/sbin/sendmail -Ac -q30m -L sm-cm
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mail-mta/sendmail/metadata.xml b/mail-mta/sendmail/metadata.xml
new file mode 100644
index 000000000000..1c3bc7b3fcef
--- /dev/null
+++ b/mail-mta/sendmail/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>net-mail@gentoo.org</email>
+ <name>Net-Mail</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/mail-mta/sendmail/sendmail-8.14.9-r1.ebuild b/mail-mta/sendmail/sendmail-8.14.9-r1.ebuild
new file mode 100644
index 000000000000..01104843e2bd
--- /dev/null
+++ b/mail-mta/sendmail/sendmail-8.14.9-r1.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="Widely-used Mail Transport Agent (MTA)"
+HOMEPAGE="http://www.sendmail.org/"
+SRC_URI="ftp://ftp.sendmail.org/pub/${PN}/${PN}.${PV}.tar.gz"
+
+LICENSE="Sendmail GPL-2" # GPL-2 is here for initscript
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="ssl ldap libressl sasl tcpd mbox ipv6 nis sockets"
+
+DEPEND="net-mail/mailbase
+ sys-devel/m4
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.10 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ ldap? ( net-nds/openldap )
+ >=sys-libs/db-3.2
+ !net-mail/vacation
+ "
+RDEPEND="${DEPEND}
+ >=net-mail/mailbase-0.00
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta]
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/postfix
+ !mail-mta/opensmtpd
+ !mail-mta/qmail-ldap
+ !<mail-mta/ssmtp-2.64-r2
+ !>=mail-mta/ssmtp-2.64-r2[mta]"
+
+PDEPEND="!mbox? ( mail-filter/procmail )"
+
+# libmilter library is part of sendmail, but it does not share the version number with it.
+# In order to find the right libmilter version number, check SMFI_VERSION definition
+# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
+# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
+LIBMILTER_VER=1.0.2
+
+pkg_setup() {
+ enewgroup smmsp 209
+ enewuser smmsp 209 -1 /var/spool/mqueue smmsp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/"${PN}"-8.14.6-build-system.patch
+ epatch "${FILESDIR}"/sendmail-delivered_hdr.patch
+ epatch "${FILESDIR}"/libmilter-sharedlib.patch
+ epatch "${FILESDIR}"/"${PN}"-8.14.5+db-5.0.patch
+ epatch "${FILESDIR}"/sendmail-starttls-multi-crl.patch
+
+ local confCC="$(tc-getCC)"
+ local confCCOPTS="${CFLAGS}"
+ local confLDOPTS="${LDFLAGS}"
+ local confMAPDEF="-DMAP_REGEX"
+ local conf_sendmail_LIBS=""
+ use sasl && confLIBS="${confLIBS} -lsasl2" \
+ && confENVDEF="${confENVDEF} -DSASL=2" \
+ && confCCOPTS="${confCCOPTS} -I/usr/include/sasl" \
+ && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lsasl2"
+ use tcpd && confENVDEF="${confENVDEF} -DTCPWRAPPERS" \
+ && confLIBS="${confLIBS} -lwrap"
+ use ssl && confENVDEF="${confENVDEF} -DSTARTTLS -D_FFR_DEAL_WITH_ERROR_SSL" \
+ && confENVDEF="${confENVDEF} -D_FFR_TLS_1" \
+ && confLIBS="${confLIBS} -lssl -lcrypto" \
+ && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lssl -lcrypto"
+ use ldap && confMAPDEF="${confMAPDEF} -DLDAPMAP" \
+ && confLIBS="${confLIBS} -lldap -llber"
+ use ipv6 && confENVDEF="${confENVDEF} -DNETINET6"
+ use nis && confENVDEF="${confENVDEF} -DNIS"
+ use sockets && confENVDEF="${confENVDEF} -DSOCKETMAP"
+ sed -e "s:@@confCCOPTS@@:${confCCOPTS}:" \
+ -e "s/@@confLDOPTS@@/${confLDOPTS}/" \
+ -e "s/@@confCC@@/${confCC}/" \
+ -e "s/@@confMAPDEF@@/${confMAPDEF}/" \
+ -e "s/@@confENVDEF@@/${confENVDEF}/" \
+ -e "s/@@confLIBS@@/${confLIBS}/" \
+ -e "s/@@conf_sendmail_LIBS@@/${conf_sendmail_LIBS}/" \
+ "${FILESDIR}"/site.config.m4 > devtools/Site/site.config.m4
+}
+
+src_compile() {
+ sh Build AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "compilation failed in main Build script"
+ pushd libmilter
+ sh Build AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" MILTER_SOVER=${LIBMILTER_VER} || die "libmilter compilation failed"
+ popd
+}
+
+src_install () {
+ local MY_LIBDIR=/usr/$(get_libdir)
+ local MY_OBJDIR="obj.`uname -s`.`uname -r`.`uname -m`"
+ dodir /usr/bin ${MY_LIBDIR} /usr/include/libmilter
+ dodir /usr/share/man/man{1,5,8} /usr/sbin /var/log /usr/share/sendmail-cf
+ dodir /var/spool/{mqueue,clientmqueue} /etc/conf.d
+ keepdir /var/spool/{clientmqueue,mqueue}
+ for dir in libsmutil sendmail mailstats praliases smrsh makemap vacation editmap
+ do
+ make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+ MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+ LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+ MSPQOWN=root CFOWN=root CFGRP=root \
+ install -C "${MY_OBJDIR}/${dir}" \
+ || die "install failed"
+ done
+ for dir in rmail mail.local
+ do
+ make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+ MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+ LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+ MSPQOWN=root CFOWN=root CFGRP=root \
+ force-install -C "${MY_OBJDIR}/${dir}" \
+ || die "install failed"
+ done
+
+ make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+ MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+ LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+ MSPQOWN=root CFOWN=root CFGRP=root \
+ MILTER_SOVER=${LIBMILTER_VER} \
+ install -C "${MY_OBJDIR}/libmilter" \
+ || die "install failed"
+
+ fowners root:smmsp /usr/sbin/sendmail
+ fperms 2555 /usr/sbin/sendmail
+ fowners smmsp:smmsp /var/spool/clientmqueue
+ fperms 770 /var/spool/clientmqueue
+ fperms 700 /var/spool/mqueue
+ dosym /usr/sbin/makemap /usr/bin/makemap
+ dodoc FAQ KNOWNBUGS README RELEASE_NOTES doc/op/op.ps
+ newdoc sendmail/README README.sendmail
+ newdoc sendmail/SECURITY SECURITY
+ newdoc sendmail/TUNING TUNING
+ newdoc smrsh/README README.smrsh
+ newdoc libmilter/README README.libmilter
+
+ newdoc cf/README README.cf
+ newdoc cf/cf/README README.install-cf
+ cp -pPR cf/* "${D}"/usr/share/sendmail-cf
+
+ docinto contrib
+ dodoc contrib/*
+
+ insinto /etc/mail
+ if use mbox
+ then
+ newins "${FILESDIR}"/sendmail.mc-r1 sendmail.mc
+ else
+ newins "${FILESDIR}"/sendmail-procmail.mc sendmail.mc
+ fi
+ m4 "${D}"/usr/share/sendmail-cf/m4/cf.m4 "${D}"/etc/mail/sendmail.mc \
+ > "${D}"/etc/mail/sendmail.cf
+ echo "include(\`/usr/share/sendmail-cf/m4/cf.m4')dnl" \
+ > "${D}"/etc/mail/submit.mc
+ cat "${D}"/usr/share/sendmail-cf/cf/submit.mc >> "${D}"/etc/mail/submit.mc
+ echo "# local-host-names - include all aliases for your machine here" \
+ > "${D}"/etc/mail/local-host-names
+ cat <<- EOF > "${D}"/etc/mail/trusted-users
+ # trusted-users - users that can send mail as others without a warning
+ # apache, mailman, majordomo, uucp are good candidates
+ EOF
+ cat <<- EOF > "${D}"/etc/mail/access
+ # Check the /usr/share/doc/sendmail/README.cf file for a description
+ # of the format of this file. (search for access_db in that file)
+ # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
+ # package.
+ #
+
+ EOF
+ cat <<- EOF > "${D}"/etc/conf.d/sendmail
+ # Config file for /etc/init.d/sendmail
+ # add start-up options here
+ SENDMAIL_OPTS="-bd -q30m -L sm-mta" # default daemon mode
+ CLIENTMQUEUE_OPTS="-Ac -q30m -L sm-cm" # clientmqueue
+ KILL_OPTS="" # add -9/-15/your favorite evil SIG level here
+
+ EOF
+ if use sasl; then
+ dodir /etc/sasl2
+ cat <<- EOF > "${D}"/etc/sasl2/Sendmail.conf
+ pwcheck_method: saslauthd
+ mech_list: PLAIN LOGIN
+
+ EOF
+ fi
+
+ doinitd "${FILESDIR}"/sendmail
+ systemd_dounit "${FILESDIR}"/sendmail.service
+ systemd_dounit "${FILESDIR}"/sm-client.service
+
+ keepdir /usr/adm/sm.bin
+}
diff --git a/mail-mta/sendmail/sendmail-8.14.9.ebuild b/mail-mta/sendmail/sendmail-8.14.9.ebuild
new file mode 100644
index 000000000000..d356bfab013b
--- /dev/null
+++ b/mail-mta/sendmail/sendmail-8.14.9.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="Widely-used Mail Transport Agent (MTA)"
+HOMEPAGE="http://www.sendmail.org/"
+SRC_URI="ftp://ftp.sendmail.org/pub/${PN}/${PN}.${PV}.tar.gz"
+
+LICENSE="Sendmail GPL-2" # GPL-2 is here for initscript
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="ssl ldap sasl tcpd mbox ipv6 nis sockets"
+
+DEPEND="net-mail/mailbase
+ sys-devel/m4
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.10 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ ssl? ( dev-libs/openssl )
+ ldap? ( net-nds/openldap )
+ >=sys-libs/db-3.2
+ !net-mail/vacation
+ "
+RDEPEND="${DEPEND}
+ >=net-mail/mailbase-0.00
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta]
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/postfix
+ !mail-mta/opensmtpd
+ !mail-mta/qmail-ldap
+ !<mail-mta/ssmtp-2.64-r2
+ !>=mail-mta/ssmtp-2.64-r2[mta]"
+
+PDEPEND="!mbox? ( mail-filter/procmail )"
+
+# libmilter library is part of sendmail, but it does not share the version number with it.
+# In order to find the right libmilter version number, check SMFI_VERSION definition
+# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
+# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
+LIBMILTER_VER=1.0.2
+
+pkg_setup() {
+ enewgroup smmsp 209
+ enewuser smmsp 209 -1 /var/spool/mqueue smmsp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/"${PN}"-8.14.6-build-system.patch
+ epatch "${FILESDIR}"/sendmail-delivered_hdr.patch
+ epatch "${FILESDIR}"/libmilter-sharedlib.patch
+ epatch "${FILESDIR}"/"${PN}"-8.14.5+db-5.0.patch
+ epatch "${FILESDIR}"/sendmail-starttls-multi-crl.patch
+
+ local confCC="$(tc-getCC)"
+ local confCCOPTS="${CFLAGS}"
+ local confLDOPTS="${LDFLAGS}"
+ local confMAPDEF="-DMAP_REGEX"
+ local conf_sendmail_LIBS=""
+ use sasl && confLIBS="${confLIBS} -lsasl2" \
+ && confENVDEF="${confENVDEF} -DSASL=2" \
+ && confCCOPTS="${confCCOPTS} -I/usr/include/sasl" \
+ && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lsasl2"
+ use tcpd && confENVDEF="${confENVDEF} -DTCPWRAPPERS" \
+ && confLIBS="${confLIBS} -lwrap"
+ use ssl && confENVDEF="${confENVDEF} -DSTARTTLS -D_FFR_DEAL_WITH_ERROR_SSL" \
+ && confENVDEF="${confENVDEF} -D_FFR_TLS_1" \
+ && confLIBS="${confLIBS} -lssl -lcrypto" \
+ && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lssl -lcrypto"
+ use ldap && confMAPDEF="${confMAPDEF} -DLDAPMAP" \
+ && confLIBS="${confLIBS} -lldap -llber"
+ use ipv6 && confENVDEF="${confENVDEF} -DNETINET6"
+ use nis && confENVDEF="${confENVDEF} -DNIS"
+ use sockets && confENVDEF="${confENVDEF} -DSOCKETMAP"
+ sed -e "s:@@confCCOPTS@@:${confCCOPTS}:" \
+ -e "s/@@confLDOPTS@@/${confLDOPTS}/" \
+ -e "s/@@confCC@@/${confCC}/" \
+ -e "s/@@confMAPDEF@@/${confMAPDEF}/" \
+ -e "s/@@confENVDEF@@/${confENVDEF}/" \
+ -e "s/@@confLIBS@@/${confLIBS}/" \
+ -e "s/@@conf_sendmail_LIBS@@/${conf_sendmail_LIBS}/" \
+ "${FILESDIR}"/site.config.m4 > devtools/Site/site.config.m4
+}
+
+src_compile() {
+ sh Build AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "compilation failed in main Build script"
+ pushd libmilter
+ sh Build AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" MILTER_SOVER=${LIBMILTER_VER} || die "libmilter compilation failed"
+ popd
+}
+
+src_install () {
+ local MY_LIBDIR=/usr/$(get_libdir)
+ local MY_OBJDIR="obj.`uname -s`.`uname -r`.`uname -m`"
+ dodir /usr/bin ${MY_LIBDIR} /usr/include/libmilter
+ dodir /usr/share/man/man{1,5,8} /usr/sbin /var/log /usr/share/sendmail-cf
+ dodir /var/spool/{mqueue,clientmqueue} /etc/conf.d
+ keepdir /var/spool/{clientmqueue,mqueue}
+ for dir in libsmutil sendmail mailstats praliases smrsh makemap vacation editmap
+ do
+ make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+ MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+ LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+ MSPQOWN=root CFOWN=root CFGRP=root \
+ install -C "${MY_OBJDIR}/${dir}" \
+ || die "install failed"
+ done
+ for dir in rmail mail.local
+ do
+ make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+ MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+ LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+ MSPQOWN=root CFOWN=root CFGRP=root \
+ force-install -C "${MY_OBJDIR}/${dir}" \
+ || die "install failed"
+ done
+
+ make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+ MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+ LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+ MSPQOWN=root CFOWN=root CFGRP=root \
+ MILTER_SOVER=${LIBMILTER_VER} \
+ install -C "${MY_OBJDIR}/libmilter" \
+ || die "install failed"
+
+ fowners root:smmsp /usr/sbin/sendmail
+ fperms 2555 /usr/sbin/sendmail
+ fowners smmsp:smmsp /var/spool/clientmqueue
+ fperms 770 /var/spool/clientmqueue
+ fperms 700 /var/spool/mqueue
+ dosym /usr/sbin/makemap /usr/bin/makemap
+ dodoc FAQ KNOWNBUGS README RELEASE_NOTES doc/op/op.ps
+ newdoc sendmail/README README.sendmail
+ newdoc sendmail/SECURITY SECURITY
+ newdoc sendmail/TUNING TUNING
+ newdoc smrsh/README README.smrsh
+ newdoc libmilter/README README.libmilter
+
+ newdoc cf/README README.cf
+ newdoc cf/cf/README README.install-cf
+ cp -pPR cf/* "${D}"/usr/share/sendmail-cf
+
+ docinto contrib
+ dodoc contrib/*
+
+ insinto /etc/mail
+ if use mbox
+ then
+ newins "${FILESDIR}"/sendmail.mc-r1 sendmail.mc
+ else
+ newins "${FILESDIR}"/sendmail-procmail.mc sendmail.mc
+ fi
+ m4 "${D}"/usr/share/sendmail-cf/m4/cf.m4 "${D}"/etc/mail/sendmail.mc \
+ > "${D}"/etc/mail/sendmail.cf
+ echo "include(\`/usr/share/sendmail-cf/m4/cf.m4')dnl" \
+ > "${D}"/etc/mail/submit.mc
+ cat "${D}"/usr/share/sendmail-cf/cf/submit.mc >> "${D}"/etc/mail/submit.mc
+ echo "# local-host-names - include all aliases for your machine here" \
+ > "${D}"/etc/mail/local-host-names
+ cat <<- EOF > "${D}"/etc/mail/trusted-users
+ # trusted-users - users that can send mail as others without a warning
+ # apache, mailman, majordomo, uucp are good candidates
+ EOF
+ cat <<- EOF > "${D}"/etc/mail/access
+ # Check the /usr/share/doc/sendmail/README.cf file for a description
+ # of the format of this file. (search for access_db in that file)
+ # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
+ # package.
+ #
+
+ EOF
+ cat <<- EOF > "${D}"/etc/conf.d/sendmail
+ # Config file for /etc/init.d/sendmail
+ # add start-up options here
+ SENDMAIL_OPTS="-bd -q30m -L sm-mta" # default daemon mode
+ CLIENTMQUEUE_OPTS="-Ac -q30m -L sm-cm" # clientmqueue
+ KILL_OPTS="" # add -9/-15/your favorite evil SIG level here
+
+ EOF
+ if use sasl; then
+ dodir /etc/sasl2
+ cat <<- EOF > "${D}"/etc/sasl2/Sendmail.conf
+ pwcheck_method: saslauthd
+ mech_list: PLAIN LOGIN
+
+ EOF
+ fi
+
+ doinitd "${FILESDIR}"/sendmail
+ systemd_dounit "${FILESDIR}"/sendmail.service
+ systemd_dounit "${FILESDIR}"/sm-client.service
+
+ keepdir /usr/adm/sm.bin
+}