BUMP portrevision
Add patches: ----- MEDIUM ----- mikea@kconline.com: Sendmail 8.12.x has an implementation bug in the milter code that causes the milter daemons to fail when they are bombarded with 20-30 messages from a mail server. mail sendmail[82323]: g1N53lNY082323: Milter (milter-amavis): select(read): Interrupted system call The patch available at the link above definitely fixes the Milter timeout problem. Before applying the patch, I would see this every 5 to 15 minutes in our logs. here hasn't been another one since I applied the patch 5 hours ago. ----- LOW ----- dionex@freebsd.org: Fix SafeFileEnv, it won't work if configured up with a trailing '/' ----- PR: 35363 Submitted by: mikea@kconline.com,dinoex
This commit is contained in:
parent
617b70976e
commit
5f11dc60c5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=55299
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= sendmail
|
||||
PORTVERSION= 8.12.2
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= mail ipv6
|
||||
MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \
|
||||
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,}
|
||||
|
64
mail/sendmail/files/patch-sendmail-deliver.c
Normal file
64
mail/sendmail/files/patch-sendmail-deliver.c
Normal file
@ -0,0 +1,64 @@
|
||||
diff -u -r8.928 deliver.c
|
||||
--- sendmail/deliver.c 2002/01/10 03:23:29 8.928
|
||||
+++ sendmail/deliver.c 2002/02/04 23:32:05
|
||||
@@ -5141,11 +5141,17 @@
|
||||
}
|
||||
(void) sm_strlcpy(targetfile, SafeFileEnv, sizeof targetfile);
|
||||
realfile = targetfile + len;
|
||||
- if (targetfile[len - 1] != '/')
|
||||
- (void) sm_strlcat(targetfile, "/", sizeof targetfile);
|
||||
if (*filename == '/')
|
||||
filename++;
|
||||
- (void) sm_strlcat(targetfile, filename, sizeof targetfile);
|
||||
+ if (*filename != '\0')
|
||||
+ {
|
||||
+ /* paranoia: trailing / should be removed in readcf */
|
||||
+ if (targetfile[len - 1] != '/')
|
||||
+ (void) sm_strlcat(targetfile,
|
||||
+ "/", sizeof targetfile);
|
||||
+ (void) sm_strlcat(targetfile, filename,
|
||||
+ sizeof targetfile);
|
||||
+ }
|
||||
}
|
||||
else if (mailer->m_rootdir != NULL)
|
||||
{
|
||||
@@ -5388,6 +5394,9 @@
|
||||
|
||||
if (realfile != targetfile)
|
||||
{
|
||||
+ char save;
|
||||
+
|
||||
+ save = *realfile;
|
||||
*realfile = '\0';
|
||||
if (tTd(11, 20))
|
||||
sm_dprintf("mailfile: chroot %s\n", targetfile);
|
||||
@@ -5397,7 +5406,7 @@
|
||||
targetfile);
|
||||
RETURN(EX_CANTCREAT);
|
||||
}
|
||||
- *realfile = '/';
|
||||
+ *realfile = save;
|
||||
}
|
||||
|
||||
if (tTd(11, 40))
|
||||
--- sendmail/readcf.c 2002/01/30 19:56:37 8.595
|
||||
+++ sendmail/readcf.c 2002/02/04 23:32:05
|
||||
@@ -2950,6 +2950,17 @@
|
||||
break;
|
||||
|
||||
case O_SAFEFILEENV: /* chroot() environ for writing to files */
|
||||
+ if (*val == '\0')
|
||||
+ break;
|
||||
+
|
||||
+ /* strip trailing slashes */
|
||||
+ p = val + strlen(val) - 1;
|
||||
+ while (p >= val && *p == '/')
|
||||
+ *p-- = '\0';
|
||||
+
|
||||
+ if (*val == '\0')
|
||||
+ break;
|
||||
+
|
||||
SafeFileEnv = newstr(val);
|
||||
break;
|
||||
|
||||
|
39
mail/sendmail/files/patch-sendmail-milter.c
Normal file
39
mail/sendmail/files/patch-sendmail-milter.c
Normal file
@ -0,0 +1,39 @@
|
||||
Sendmail 8.12.x
|
||||
|
||||
The MTA may erroneously detect a communication failure with libmilter
|
||||
(EINTR in select(2)). [ http://www.sendmail.org/~ca/email/sm-812.html ]
|
||||
|
||||
Index: milter.c
|
||||
===================================================================
|
||||
RCS file: /cvs/sendmail/milter.c,v
|
||||
retrieving revision 8.187
|
||||
retrieving revision 8.188
|
||||
diff -u -r8.187 -r8.188
|
||||
--- sendmail/milter.c 2002/01/19 00:48:57 8.187
|
||||
+++ sendmail/milter.c 2002/01/21 04:07:02 8.188
|
||||
@@ -139,14 +139,17 @@
|
||||
return NULL; \
|
||||
} \
|
||||
\
|
||||
- FD_ZERO(&fds); \
|
||||
- SM_FD_SET(m->mf_sock, &fds); \
|
||||
- tv.tv_sec = (secs); \
|
||||
- tv.tv_usec = 0; \
|
||||
- ret = select(m->mf_sock + 1, \
|
||||
- (write) ? NULL : &fds, \
|
||||
- (write) ? &fds : NULL, \
|
||||
- NULL, &tv); \
|
||||
+ do \
|
||||
+ { \
|
||||
+ FD_ZERO(&fds); \
|
||||
+ SM_FD_SET(m->mf_sock, &fds); \
|
||||
+ tv.tv_sec = (secs); \
|
||||
+ tv.tv_usec = 0; \
|
||||
+ ret = select(m->mf_sock + 1, \
|
||||
+ (write) ? NULL : &fds, \
|
||||
+ (write) ? &fds : NULL, \
|
||||
+ NULL, &tv); \
|
||||
+ } while (ret < 0 && errno == EINTR); \
|
||||
\
|
||||
switch (ret) \
|
||||
{ \
|
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= sendmail
|
||||
PORTVERSION= 8.12.2
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= mail ipv6
|
||||
MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \
|
||||
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,}
|
||||
|
64
mail/sendmail812/files/patch-sendmail-deliver.c
Normal file
64
mail/sendmail812/files/patch-sendmail-deliver.c
Normal file
@ -0,0 +1,64 @@
|
||||
diff -u -r8.928 deliver.c
|
||||
--- sendmail/deliver.c 2002/01/10 03:23:29 8.928
|
||||
+++ sendmail/deliver.c 2002/02/04 23:32:05
|
||||
@@ -5141,11 +5141,17 @@
|
||||
}
|
||||
(void) sm_strlcpy(targetfile, SafeFileEnv, sizeof targetfile);
|
||||
realfile = targetfile + len;
|
||||
- if (targetfile[len - 1] != '/')
|
||||
- (void) sm_strlcat(targetfile, "/", sizeof targetfile);
|
||||
if (*filename == '/')
|
||||
filename++;
|
||||
- (void) sm_strlcat(targetfile, filename, sizeof targetfile);
|
||||
+ if (*filename != '\0')
|
||||
+ {
|
||||
+ /* paranoia: trailing / should be removed in readcf */
|
||||
+ if (targetfile[len - 1] != '/')
|
||||
+ (void) sm_strlcat(targetfile,
|
||||
+ "/", sizeof targetfile);
|
||||
+ (void) sm_strlcat(targetfile, filename,
|
||||
+ sizeof targetfile);
|
||||
+ }
|
||||
}
|
||||
else if (mailer->m_rootdir != NULL)
|
||||
{
|
||||
@@ -5388,6 +5394,9 @@
|
||||
|
||||
if (realfile != targetfile)
|
||||
{
|
||||
+ char save;
|
||||
+
|
||||
+ save = *realfile;
|
||||
*realfile = '\0';
|
||||
if (tTd(11, 20))
|
||||
sm_dprintf("mailfile: chroot %s\n", targetfile);
|
||||
@@ -5397,7 +5406,7 @@
|
||||
targetfile);
|
||||
RETURN(EX_CANTCREAT);
|
||||
}
|
||||
- *realfile = '/';
|
||||
+ *realfile = save;
|
||||
}
|
||||
|
||||
if (tTd(11, 40))
|
||||
--- sendmail/readcf.c 2002/01/30 19:56:37 8.595
|
||||
+++ sendmail/readcf.c 2002/02/04 23:32:05
|
||||
@@ -2950,6 +2950,17 @@
|
||||
break;
|
||||
|
||||
case O_SAFEFILEENV: /* chroot() environ for writing to files */
|
||||
+ if (*val == '\0')
|
||||
+ break;
|
||||
+
|
||||
+ /* strip trailing slashes */
|
||||
+ p = val + strlen(val) - 1;
|
||||
+ while (p >= val && *p == '/')
|
||||
+ *p-- = '\0';
|
||||
+
|
||||
+ if (*val == '\0')
|
||||
+ break;
|
||||
+
|
||||
SafeFileEnv = newstr(val);
|
||||
break;
|
||||
|
||||
|
39
mail/sendmail812/files/patch-sendmail-milter.c
Normal file
39
mail/sendmail812/files/patch-sendmail-milter.c
Normal file
@ -0,0 +1,39 @@
|
||||
Sendmail 8.12.x
|
||||
|
||||
The MTA may erroneously detect a communication failure with libmilter
|
||||
(EINTR in select(2)). [ http://www.sendmail.org/~ca/email/sm-812.html ]
|
||||
|
||||
Index: milter.c
|
||||
===================================================================
|
||||
RCS file: /cvs/sendmail/milter.c,v
|
||||
retrieving revision 8.187
|
||||
retrieving revision 8.188
|
||||
diff -u -r8.187 -r8.188
|
||||
--- sendmail/milter.c 2002/01/19 00:48:57 8.187
|
||||
+++ sendmail/milter.c 2002/01/21 04:07:02 8.188
|
||||
@@ -139,14 +139,17 @@
|
||||
return NULL; \
|
||||
} \
|
||||
\
|
||||
- FD_ZERO(&fds); \
|
||||
- SM_FD_SET(m->mf_sock, &fds); \
|
||||
- tv.tv_sec = (secs); \
|
||||
- tv.tv_usec = 0; \
|
||||
- ret = select(m->mf_sock + 1, \
|
||||
- (write) ? NULL : &fds, \
|
||||
- (write) ? &fds : NULL, \
|
||||
- NULL, &tv); \
|
||||
+ do \
|
||||
+ { \
|
||||
+ FD_ZERO(&fds); \
|
||||
+ SM_FD_SET(m->mf_sock, &fds); \
|
||||
+ tv.tv_sec = (secs); \
|
||||
+ tv.tv_usec = 0; \
|
||||
+ ret = select(m->mf_sock + 1, \
|
||||
+ (write) ? NULL : &fds, \
|
||||
+ (write) ? &fds : NULL, \
|
||||
+ NULL, &tv); \
|
||||
+ } while (ret < 0 && errno == EINTR); \
|
||||
\
|
||||
switch (ret) \
|
||||
{ \
|
Loading…
Reference in New Issue
Block a user