diff --git a/.gitignore b/.gitignore index b032315..ebe7439 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /sendmail.8.14.?.tar.gz /sendmail.8.15.1.tar.gz +/sendmail.8.15.2.tar.gz diff --git a/sendmail-8.14.9-pid.patch b/sendmail-8.14.9-pid.patch index 45ab34f..6d76959 100644 --- a/sendmail-8.14.9-pid.patch +++ b/sendmail-8.14.9-pid.patch @@ -16,5 +16,5 @@ +dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl +FEATURE(`use_ct_file')dnl dnl - dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1] + dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:0:0:0:0:0:0:0:1] FEATURE(`msp', `[127.0.0.1]')dnl diff --git a/sendmail-8.15.1-ipv6-bad-helo.patch b/sendmail-8.15.1-ipv6-bad-helo.patch deleted file mode 100644 index afd8ad0..0000000 --- a/sendmail-8.15.1-ipv6-bad-helo.patch +++ /dev/null @@ -1,17 +0,0 @@ -Patch by Robert Scheck for sendmail >= 8.15.1 which ensures that the -loopback IPv6 address is handled the same way like the IPv4 one. However since sendmail >= 8.15.1 -uncompressed IPv6 addresses are used by default thus the previously used IPv6:::1 gets changed to -now IPv6:0:0:0:0:0:0:0:1 (if not compiled with -DIPV6_FULL=0 for the prior format). For further -information see also: - -- https://bugzilla.redhat.com/show_bug.cgi?id=549217 -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618570 - ---- sendmail-8.15.1/cf/feature/block_bad_helo.m4 2014-03-24 15:29:09.000000000 +0100 -+++ sendmail-8.15.1/cf/feature/block_bad_helo.m4.ipv6-bad-helo 2015-03-20 01:22:42.000000000 +0100 -@@ -16,3 +16,5 @@ - define(`_BLOCK_BAD_HELO_', `')dnl - RELAY_DOMAIN(`127.0.0.1')dnl - LOCAL_DOMAIN(`[127.0.0.1]')dnl -+RELAY_DOMAIN(`IPv6:0:0:0:0:0:0:0:1')dnl -+LOCAL_DOMAIN(`[IPv6:0:0:0:0:0:0:0:1]')dnl diff --git a/sendmail-8.15.1-localdomain.patch b/sendmail-8.15.1-localdomain.patch deleted file mode 100644 index e41d028..0000000 --- a/sendmail-8.15.1-localdomain.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cf/m4/proto.m4 b/cf/m4/proto.m4 -index 3bc4c77..74e62b5 100644 ---- a/cf/m4/proto.m4 -+++ b/cf/m4/proto.m4 -@@ -1891,6 +1891,8 @@ R<@> < $* @ [127.0.0.1] > - $: < ? $&{client_name} > < $1 @ [127.0.0.1] > - R<@> < $* @ localhost.$m > - $: < ? $&{client_name} > < $1 @ localhost.$m > -+R<@> < $* @ localhost.localdomain > -+ $: < ? $&{client_name} > < $1 @ localhost.localdomain > - ifdef(`_NO_UUCP_', `dnl', - `R<@> < $* @ localhost.UUCP > - $: < ? $&{client_name} > < $1 @ localhost.UUCP >') diff --git a/sendmail-8.15.1-qos.patch b/sendmail-8.15.1-qos.patch deleted file mode 100644 index ca54cf7..0000000 --- a/sendmail-8.15.1-qos.patch +++ /dev/null @@ -1,246 +0,0 @@ -diff --git a/cf/cf/submit.mc b/cf/cf/submit.mc -index ac19210..d180a09 100644 ---- a/cf/cf/submit.mc -+++ b/cf/cf/submit.mc -@@ -22,6 +22,8 @@ define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining - define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet - define(`confTIME_ZONE', `USE_TZ')dnl - define(`confDONT_INIT_GROUPS', `True')dnl -+dnl # If you're operating in a DSCP/RFC-4594 environment with QoS -+dnl define(`confINET_QOS', `AF11')dnl - define(`confPID_FILE', `/run/sm-client.pid')dnl - dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl - FEATURE(`use_ct_file')dnl -diff --git a/cf/m4/proto.m4 b/cf/m4/proto.m4 -index 74e62b5..8a412eb 100644 ---- a/cf/m4/proto.m4 -+++ b/cf/m4/proto.m4 -@@ -251,6 +251,9 @@ _OPTION(SevenBitInput, `confSEVEN_BIT_INPUT', `False') - # 8-bit data handling - _OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', `pass8') - -+# DSCP marking of traffic (IP_TOS) -+_OPTION(InetQoS, `confINET_QOS', `none') -+ - # wait for alias file rebuild (default units: minutes) - _OPTION(AliasWait, `confALIAS_WAIT', `5m') - -diff --git a/sendmail/conf.c b/sendmail/conf.c -index 760150f..47283e9 100644 ---- a/sendmail/conf.c -+++ b/sendmail/conf.c -@@ -6427,6 +6427,10 @@ char *FFRCompileOptions[] = - #if _FFR_QF_PARANOIA - "_FFR_QF_PARANOIA", - #endif -+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) -+ /* QoS */ -+ "_FFR_QOS", -+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ - #if _FFR_QUEUE_GROUP_SORTORDER - /* Allow QueueSortOrder per queue group. */ - /* XXX: Still need to actually use qgrp->qg_sortorder */ -diff --git a/sendmail/daemon.c b/sendmail/daemon.c -index 7fe819f..83c888b 100644 ---- a/sendmail/daemon.c -+++ b/sendmail/daemon.c -@@ -104,6 +104,10 @@ static int NDaemons = 0; /* actual number of daemons */ - - static time_t NextDiskSpaceCheck = 0; - -+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) -+int InetQoS = 0; /* none by default */ -+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ -+ - /* - ** GETREQUESTS -- open mail IPC port and get requests. - ** -@@ -1139,6 +1143,16 @@ opendaemonsocket(d, firsttime) - (void) setsockopt(d->d_socket, SOL_SOCKET, - SO_KEEPALIVE, (char *)&on, sizeof(on)); - -+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) -+ if (InetQoS != 0x00 -+ && (d->d_addr.sa.sa_family == AF_INET -+ || (d->d_addr.sin6.sin6_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(d->d_addr.sin6.sin6_addr.s6_addr32)))) { -+ if (setsockopt(d->d_socket, SOL_IP, -+ IP_TOS, (char *)&InetQoS, sizeof(InetQoS)) < 0) -+ syserr("opendaemonsock: daemon %s: setsockopt(IP_TOS)", d->d_name); -+ } -+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ -+ - #ifdef SO_RCVBUF - if (d->d_tcprcvbufsize > 0) - { -@@ -2571,6 +2585,16 @@ gothostent: - return EX_TEMPFAIL; - } - -+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) -+ if (InetQoS != 0x00 -+ && (family == AF_INET -+ || (family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(addr.sin6.sin6_addr.s6_addr32)))) -+ { -+ if (setsockopt(s, SOL_IP, IP_TOS, -+ (char *)&InetQoS, sizeof(InetQoS)) < 0) -+ syserr("makeconnection: setsockopt(IP_TOS)"); -+ } -+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ - #ifdef SO_SNDBUF - if (ClientSettings[family].d_tcpsndbufsize > 0) - { -diff --git a/sendmail/readcf.c b/sendmail/readcf.c -index 9768c45..6a04f3f 100644 ---- a/sendmail/readcf.c -+++ b/sendmail/readcf.c -@@ -18,6 +18,7 @@ SM_RCSID("@(#)$Id: readcf.c,v 8.692 2013-11-22 20:51:56 ca Exp $") - - #if NETINET || NETINET6 - # include -+# include - #endif /* NETINET || NETINET6 */ - - -@@ -2453,8 +2454,8 @@ static struct optioninfo - # define O_RCPTTHROTDELAY 0xe6 - { "BadRcptThrottleDelay", O_RCPTTHROTDELAY, OI_SAFE }, - #endif /* _FFR_RCPTTHROTDELAY */ --#if 0 && _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) --# define O_INETQOS 0xe7 /* reserved for FFR_QOS */ -+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) -+# define O_INETQOS 0xe7 - { "InetQoS", O_INETQOS, OI_NONE }, - #endif - #if STARTTLS && _FFR_FIPSMODE -@@ -2594,6 +2595,77 @@ static struct ssl_options - }; - #endif /* STARTTLS */ - -+#ifdef O_INETQOS -+static struct qosmap -+{ -+ char *name; /* name of the setting */ -+ int value; /* corresponding setsockopt() value */ -+} QoSMap[] = { -+#ifdef IPTOS_CLASS_CS0 -+ { "CS0", IPTOS_CLASS_CS0 }, -+#endif -+#ifdef IPTOS_CLASS_CS1 -+ { "CS1", IPTOS_CLASS_CS1 }, -+#endif -+#ifdef IPTOS_DSCP_AF11 -+ { "AF11", IPTOS_DSCP_AF11 }, -+#endif -+#ifdef IPTOS_DSCP_AF12 -+ { "AF12", IPTOS_DSCP_AF12 }, -+#endif -+#ifdef IPTOS_DSCP_AF13 -+ { "AF13", IPTOS_DSCP_AF13 }, -+#endif -+#ifdef IPTOS_CLASS_CS2 -+ { "CS2", IPTOS_CLASS_CS2 }, -+#endif -+#ifdef IPTOS_DSCP_AF21 -+ { "AF21", IPTOS_DSCP_AF21 }, -+#endif -+#ifdef IPTOS_DSCP_AF22 -+ { "AF22", IPTOS_DSCP_AF22 }, -+#endif -+#ifdef IPTOS_DSCP_AF23 -+ { "AF23", IPTOS_DSCP_AF23 }, -+#endif -+#ifdef IPTOS_CLASS_CS3 -+ { "CS3", IPTOS_CLASS_CS3 }, -+#endif -+#ifdef IPTOS_DSCP_AF31 -+ { "AF31", IPTOS_DSCP_AF31 }, -+#endif -+#ifdef IPTOS_DSCP_AF32 -+ { "AF32", IPTOS_DSCP_AF32 }, -+#endif -+#ifdef IPTOS_DSCP_AF33 -+ { "AF33", IPTOS_DSCP_AF33 }, -+#endif -+#ifdef IPTOS_CLASS_CS4 -+ { "CS4", IPTOS_CLASS_CS4 }, -+#endif -+#ifdef IPTOS_DSCP_AF41 -+ { "AF41", IPTOS_DSCP_AF41 }, -+#endif -+#ifdef IPTOS_DSCP_AF42 -+ { "AF42", IPTOS_DSCP_AF42 }, -+#endif -+#ifdef IPTOS_DSCP_AF43 -+ { "AF43", IPTOS_DSCP_AF43 }, -+#endif -+#ifdef IPTOS_CLASS_CS5 -+ { "CS5", IPTOS_CLASS_CS5 }, -+#endif -+#ifdef IPTOS_CLASS_CS6 -+ { "CS6", IPTOS_CLASS_CS6 }, -+#endif -+#ifdef IPTOS_CLASS_CS7 -+ { "CS7", IPTOS_CLASS_CS7 }, -+#endif -+ { "none", 0x00 }, -+ { NULL, 0 } -+}; -+#endif -+ - - # define CANONIFY(val) - -@@ -4278,6 +4350,33 @@ setoption(opt, val, safe, sticky, e) - break; - #endif - -+#ifdef O_INETQOS -+ case O_INETQOS: -+ { -+ struct qosmap *qmp; -+ InetQoS = -1; -+ -+ for (qmp = QoSMap; qmp->name != NULL; ++qmp) { -+ if (!strcmp(val, qmp->name)) { -+ InetQoS = qmp->value; -+ break; -+ } -+ } -+ -+ /* -+ ** we could allow writing it as a hex value, but -+ ** we don't at this time. -+ **/ -+ if (qmp->name == NULL) { -+ (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, -+ "Warning: Option: %s unknown parameter '%s'\n", -+ OPTNAME, val); -+ break; -+ } -+ break; -+ } -+#endif -+ - default: - if (tTd(37, 1)) - { -diff --git a/sendmail/sendmail.h b/sendmail/sendmail.h -index e61f299..0e21b00 100644 ---- a/sendmail/sendmail.h -+++ b/sendmail/sendmail.h -@@ -2531,7 +2531,14 @@ EXTERN struct termescape TermEscape; /* terminal escape codes */ - EXTERN SOCKADDR ConnectOnlyTo; /* override connection address (for testing) */ - EXTERN SOCKADDR RealHostAddr; /* address of host we are talking to */ - extern const SM_EXC_TYPE_T EtypeQuickAbort; /* type of a QuickAbort exception */ -- -+#if _FFR_QOS -+# if !defined(SOL_IP) && defined(IPPROTO_IP) -+# define SOL_IP IPPROTO_IP -+# endif -+# if defined(SOL_IP) && defined(IP_TOS) -+EXTERN int InetQoS; /* QoS mapping */ -+# endif -+#endif - - EXTERN int ConnectionRateWindowSize; - #if STARTTLS && USE_OPENSSL_ENGINE diff --git a/sendmail-8.15.1-switchfile.patch b/sendmail-8.15.1-switchfile.patch deleted file mode 100644 index f49f31c..0000000 --- a/sendmail-8.15.1-switchfile.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sendmail/conf.c b/sendmail/conf.c -index 9520bd8..760150f 100644 ---- a/sendmail/conf.c -+++ b/sendmail/conf.c -@@ -983,7 +983,7 @@ switch_map_find(service, maptype, mapreturn) - if (p != NULL) - *p = '\0'; - #ifndef SM_NSSWITCH_DELIMS --# define SM_NSSWITCH_DELIMS " \t" -+# define SM_NSSWITCH_DELIMS " \t:" - #endif /* SM_NSSWITCH_DELIMS */ - p = strpbrk(buf, SM_NSSWITCH_DELIMS); - if (p != NULL) diff --git a/sendmail-8.15.2-localdomain.patch b/sendmail-8.15.2-localdomain.patch new file mode 100644 index 0000000..36ec981 --- /dev/null +++ b/sendmail-8.15.2-localdomain.patch @@ -0,0 +1,13 @@ +diff --git a/cf/m4/proto.m4 b/cf/m4/proto.m4 +index 696bf36..5a5963b 100644 +--- a/cf/m4/proto.m4 ++++ b/cf/m4/proto.m4 +@@ -1898,6 +1898,8 @@ R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > + R<@> < $* @ localhost.$m > + $: < ? $&{client_name} > < $1 @ localhost.$m > ++R<@> < $* @ localhost.localdomain > ++ $: < ? $&{client_name} > < $1 @ localhost.localdomain > + ifdef(`_NO_UUCP_', `dnl', + `R<@> < $* @ localhost.UUCP > + $: < ? $&{client_name} > < $1 @ localhost.UUCP >') diff --git a/sendmail-8.15.2-qos.patch b/sendmail-8.15.2-qos.patch new file mode 100644 index 0000000..c0b8b6a --- /dev/null +++ b/sendmail-8.15.2-qos.patch @@ -0,0 +1,246 @@ +diff --git a/cf/cf/submit.mc b/cf/cf/submit.mc +index b9dfb16..cb325cc 100644 +--- a/cf/cf/submit.mc ++++ b/cf/cf/submit.mc +@@ -22,6 +22,8 @@ define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining + define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet + define(`confTIME_ZONE', `USE_TZ')dnl + define(`confDONT_INIT_GROUPS', `True')dnl ++dnl # If you're operating in a DSCP/RFC-4594 environment with QoS ++dnl define(`confINET_QOS', `AF11')dnl + define(`confPID_FILE', `/run/sm-client.pid')dnl + dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl + FEATURE(`use_ct_file')dnl +diff --git a/cf/m4/proto.m4 b/cf/m4/proto.m4 +index 5a5963b..0df3416 100644 +--- a/cf/m4/proto.m4 ++++ b/cf/m4/proto.m4 +@@ -251,6 +251,9 @@ _OPTION(SevenBitInput, `confSEVEN_BIT_INPUT', `False') + # 8-bit data handling + _OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', `pass8') + ++# DSCP marking of traffic (IP_TOS) ++_OPTION(InetQoS, `confINET_QOS', `none') ++ + # wait for alias file rebuild (default units: minutes) + _OPTION(AliasWait, `confALIAS_WAIT', `5m') + +diff --git a/sendmail/conf.c b/sendmail/conf.c +index cbb9c76..1b55533 100644 +--- a/sendmail/conf.c ++++ b/sendmail/conf.c +@@ -6430,6 +6430,10 @@ char *FFRCompileOptions[] = + #if _FFR_QF_PARANOIA + "_FFR_QF_PARANOIA", + #endif ++#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) ++ /* QoS */ ++ "_FFR_QOS", ++#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ + #if _FFR_QUEUE_GROUP_SORTORDER + /* Allow QueueSortOrder per queue group. */ + /* XXX: Still need to actually use qgrp->qg_sortorder */ +diff --git a/sendmail/daemon.c b/sendmail/daemon.c +index 4288365..86fe319 100644 +--- a/sendmail/daemon.c ++++ b/sendmail/daemon.c +@@ -104,6 +104,10 @@ static int NDaemons = 0; /* actual number of daemons */ + + static time_t NextDiskSpaceCheck = 0; + ++#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) ++int InetQoS = 0; /* none by default */ ++#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ ++ + /* + ** GETREQUESTS -- open mail IPC port and get requests. + ** +@@ -1139,6 +1143,16 @@ opendaemonsocket(d, firsttime) + (void) setsockopt(d->d_socket, SOL_SOCKET, + SO_KEEPALIVE, (char *)&on, sizeof(on)); + ++#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) ++ if (InetQoS != 0x00 ++ && (d->d_addr.sa.sa_family == AF_INET ++ || (d->d_addr.sin6.sin6_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(d->d_addr.sin6.sin6_addr.s6_addr32)))) { ++ if (setsockopt(d->d_socket, SOL_IP, ++ IP_TOS, (char *)&InetQoS, sizeof(InetQoS)) < 0) ++ syserr("opendaemonsock: daemon %s: setsockopt(IP_TOS)", d->d_name); ++ } ++#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ ++ + #ifdef SO_RCVBUF + if (d->d_tcprcvbufsize > 0) + { +@@ -2571,6 +2585,16 @@ gothostent: + return EX_TEMPFAIL; + } + ++#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) ++ if (InetQoS != 0x00 ++ && (family == AF_INET ++ || (family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(addr.sin6.sin6_addr.s6_addr32)))) ++ { ++ if (setsockopt(s, SOL_IP, IP_TOS, ++ (char *)&InetQoS, sizeof(InetQoS)) < 0) ++ syserr("makeconnection: setsockopt(IP_TOS)"); ++ } ++#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */ + #ifdef SO_SNDBUF + if (ClientSettings[family].d_tcpsndbufsize > 0) + { +diff --git a/sendmail/readcf.c b/sendmail/readcf.c +index 2b0fbf7..86892f5 100644 +--- a/sendmail/readcf.c ++++ b/sendmail/readcf.c +@@ -18,6 +18,7 @@ SM_RCSID("@(#)$Id: readcf.c,v 8.692 2013-11-22 20:51:56 ca Exp $") + + #if NETINET || NETINET6 + # include ++# include + #endif /* NETINET || NETINET6 */ + + +@@ -2888,8 +2889,8 @@ static struct optioninfo + # define O_RCPTTHROTDELAY 0xe6 + { "BadRcptThrottleDelay", O_RCPTTHROTDELAY, OI_SAFE }, + #endif /* _FFR_RCPTTHROTDELAY */ +-#if 0 && _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) +-# define O_INETQOS 0xe7 /* reserved for FFR_QOS */ ++#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) ++# define O_INETQOS 0xe7 + { "InetQoS", O_INETQOS, OI_NONE }, + #endif + #if STARTTLS && _FFR_FIPSMODE +@@ -2914,6 +2915,77 @@ static struct optioninfo + { NULL, '\0', OI_NONE } + }; + ++#ifdef O_INETQOS ++static struct qosmap ++{ ++ char *name; /* name of the setting */ ++ int value; /* corresponding setsockopt() value */ ++} QoSMap[] = { ++#ifdef IPTOS_CLASS_CS0 ++ { "CS0", IPTOS_CLASS_CS0 }, ++#endif ++#ifdef IPTOS_CLASS_CS1 ++ { "CS1", IPTOS_CLASS_CS1 }, ++#endif ++#ifdef IPTOS_DSCP_AF11 ++ { "AF11", IPTOS_DSCP_AF11 }, ++#endif ++#ifdef IPTOS_DSCP_AF12 ++ { "AF12", IPTOS_DSCP_AF12 }, ++#endif ++#ifdef IPTOS_DSCP_AF13 ++ { "AF13", IPTOS_DSCP_AF13 }, ++#endif ++#ifdef IPTOS_CLASS_CS2 ++ { "CS2", IPTOS_CLASS_CS2 }, ++#endif ++#ifdef IPTOS_DSCP_AF21 ++ { "AF21", IPTOS_DSCP_AF21 }, ++#endif ++#ifdef IPTOS_DSCP_AF22 ++ { "AF22", IPTOS_DSCP_AF22 }, ++#endif ++#ifdef IPTOS_DSCP_AF23 ++ { "AF23", IPTOS_DSCP_AF23 }, ++#endif ++#ifdef IPTOS_CLASS_CS3 ++ { "CS3", IPTOS_CLASS_CS3 }, ++#endif ++#ifdef IPTOS_DSCP_AF31 ++ { "AF31", IPTOS_DSCP_AF31 }, ++#endif ++#ifdef IPTOS_DSCP_AF32 ++ { "AF32", IPTOS_DSCP_AF32 }, ++#endif ++#ifdef IPTOS_DSCP_AF33 ++ { "AF33", IPTOS_DSCP_AF33 }, ++#endif ++#ifdef IPTOS_CLASS_CS4 ++ { "CS4", IPTOS_CLASS_CS4 }, ++#endif ++#ifdef IPTOS_DSCP_AF41 ++ { "AF41", IPTOS_DSCP_AF41 }, ++#endif ++#ifdef IPTOS_DSCP_AF42 ++ { "AF42", IPTOS_DSCP_AF42 }, ++#endif ++#ifdef IPTOS_DSCP_AF43 ++ { "AF43", IPTOS_DSCP_AF43 }, ++#endif ++#ifdef IPTOS_CLASS_CS5 ++ { "CS5", IPTOS_CLASS_CS5 }, ++#endif ++#ifdef IPTOS_CLASS_CS6 ++ { "CS6", IPTOS_CLASS_CS6 }, ++#endif ++#ifdef IPTOS_CLASS_CS7 ++ { "CS7", IPTOS_CLASS_CS7 }, ++#endif ++ { "none", 0x00 }, ++ { NULL, 0 } ++}; ++#endif ++ + # define CANONIFY(val) + + # define SET_OPT_DEFAULT(opt, val) opt = val +@@ -4540,6 +4612,33 @@ setoption(opt, val, safe, sticky, e) + UseCompressedIPv6Addresses = atobool(val); + break; + ++#ifdef O_INETQOS ++ case O_INETQOS: ++ { ++ struct qosmap *qmp; ++ InetQoS = -1; ++ ++ for (qmp = QoSMap; qmp->name != NULL; ++qmp) { ++ if (!strcmp(val, qmp->name)) { ++ InetQoS = qmp->value; ++ break; ++ } ++ } ++ ++ /* ++ ** we could allow writing it as a hex value, but ++ ** we don't at this time. ++ **/ ++ if (qmp->name == NULL) { ++ (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, ++ "Warning: Option: %s unknown parameter '%s'\n", ++ OPTNAME, val); ++ break; ++ } ++ break; ++ } ++#endif ++ + default: + if (tTd(37, 1)) + { +diff --git a/sendmail/sendmail.h b/sendmail/sendmail.h +index b2d0211..3bcc2e2 100644 +--- a/sendmail/sendmail.h ++++ b/sendmail/sendmail.h +@@ -2537,7 +2537,14 @@ EXTERN struct termescape TermEscape; /* terminal escape codes */ + EXTERN SOCKADDR ConnectOnlyTo; /* override connection address (for testing) */ + EXTERN SOCKADDR RealHostAddr; /* address of host we are talking to */ + extern const SM_EXC_TYPE_T EtypeQuickAbort; /* type of a QuickAbort exception */ +- ++#if _FFR_QOS ++# if !defined(SOL_IP) && defined(IPPROTO_IP) ++# define SOL_IP IPPROTO_IP ++# endif ++# if defined(SOL_IP) && defined(IP_TOS) ++EXTERN int InetQoS; /* QoS mapping */ ++# endif ++#endif + + EXTERN int ConnectionRateWindowSize; + #if STARTTLS && USE_OPENSSL_ENGINE diff --git a/sendmail-8.15.2-switchfile.patch b/sendmail-8.15.2-switchfile.patch new file mode 100644 index 0000000..940d5a7 --- /dev/null +++ b/sendmail-8.15.2-switchfile.patch @@ -0,0 +1,13 @@ +diff --git a/sendmail/conf.c b/sendmail/conf.c +index c73334e..cbb9c76 100644 +--- a/sendmail/conf.c ++++ b/sendmail/conf.c +@@ -986,7 +986,7 @@ switch_map_find(service, maptype, mapreturn) + if (p != NULL) + *p = '\0'; + #ifndef SM_NSSWITCH_DELIMS +-# define SM_NSSWITCH_DELIMS " \t" ++# define SM_NSSWITCH_DELIMS " \t:" + #endif /* SM_NSSWITCH_DELIMS */ + p = strpbrk(buf, SM_NSSWITCH_DELIMS); + if (p != NULL) diff --git a/sendmail.spec b/sendmail.spec index 3f69bb6..3c5eae1 100644 --- a/sendmail.spec +++ b/sendmail.spec @@ -20,8 +20,8 @@ Summary: A widely used Mail Transport Agent (MTA) Name: sendmail -Version: 8.15.1 -Release: 6%{?dist} +Version: 8.15.2 +Release: 1%{?dist} License: Sendmail Group: System Environment/Daemons URL: http://www.sendmail.org/ @@ -77,18 +77,16 @@ Patch14: sendmail-8.14.9-vacation.patch # remove version information from sendmail helpfile Patch15: sendmail-8.14.9-noversion.patch # do not accept localhost.localdomain as valid address from SMTP -Patch16: sendmail-8.15.1-localdomain.patch +Patch16: sendmail-8.15.2-localdomain.patch # build libmilter as DSO Patch17: sendmail-8.14.3-sharedmilter.patch # skip colon separator when parsing service name in ServiceSwitchFile -Patch18: sendmail-8.15.1-switchfile.patch -# handle IPv6:::1 in block_bad_helo.m4 like 127.0.0.1, #549217 -Patch21: sendmail-8.15.1-ipv6-bad-helo.patch +Patch18: sendmail-8.15.2-switchfile.patch # silence warning about missing sasl2 config in /usr/lib*, now in /etc/sasl2 Patch23: sendmail-8.14.8-sasl2-in-etc.patch # add QoS support, patch from Philip Prindeville # upstream reserved option ID 0xe7 for testing of this new feature, #576643 -Patch25: sendmail-8.15.1-qos.patch +Patch25: sendmail-8.15.2-qos.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: tcp_wrappers-devel BuildRequires: libdb-devel @@ -208,7 +206,6 @@ cp devtools/M4/UNIX/{,shared}library.m4 %patch17 -p1 -b .sharedmilter %patch18 -p1 -b .switchfile -%patch21 -p1 -b .ipv6-bad-helo %patch23 -p1 -b .sasl2-in-etc %patch25 -p1 -b .qos @@ -704,6 +701,12 @@ fi %endif %changelog +* Tue Jul 7 2015 Jaroslav Škarvada - 8.15.2-1 +- New version + Resolves: rhbz#1239185 +- Dropped ipv6-bad-helo patch (upstreamed) +- Updated/defuzzified patches + * Fri Jun 19 2015 Fedora Release Engineering - 8.15.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 757a30f..1654f0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a45308a08d8ce64be91b7d86a7523e4f sendmail.8.15.1.tar.gz +a824fa7dea4d3341efb6462ccd816f00 sendmail.8.15.2.tar.gz