diff options
author | dinoex <dinoex@FreeBSD.org> | 2002-04-21 13:30:30 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2002-04-21 13:30:30 +0800 |
commit | 1d877d3fd2392c030c7fa2142be4786ebfe0186f (patch) | |
tree | f931760e0cf2be7b843aacbc83f4e805b2cd0c54 /mail | |
parent | 174b314ba879440b143922dacc1bcc58455cb970 (diff) | |
download | freebsd-ports-gnome-1d877d3fd2392c030c7fa2142be4786ebfe0186f.tar.gz freebsd-ports-gnome-1d877d3fd2392c030c7fa2142be4786ebfe0186f.tar.zst freebsd-ports-gnome-1d877d3fd2392c030c7fa2142be4786ebfe0186f.zip |
- imported a set of bug fixes as suggested.
- improved manpages a bit.
- some MILTER improvements.
Submitted by: gshapiro
Diffstat (limited to 'mail')
-rw-r--r-- | mail/sendmail/Makefile | 1 | ||||
-rw-r--r-- | mail/sendmail/files/patch-stable | 135 | ||||
-rw-r--r-- | mail/sendmail812/Makefile | 1 | ||||
-rw-r--r-- | mail/sendmail812/files/patch-stable | 135 |
4 files changed, 272 insertions, 0 deletions
diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile index 2a6cd8ac5743..6e759aa41a97 100644 --- a/mail/sendmail/Makefile +++ b/mail/sendmail/Makefile @@ -7,6 +7,7 @@ PORTNAME= sendmail PORTVERSION= 8.12.3 +PORTREVISION= 1 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \ ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,} diff --git a/mail/sendmail/files/patch-stable b/mail/sendmail/files/patch-stable new file mode 100644 index 000000000000..f077974ae0e4 --- /dev/null +++ b/mail/sendmail/files/patch-stable @@ -0,0 +1,135 @@ +--- cf/m4/proto.m4 2002/04/02 23:42:42 8.639 ++++ cf/m4/proto.m4 2002/04/16 21:21:26 8.640 +@@ -1204,6 +1204,7 @@ + R$+ $| $| $: $(macro {Host} $@ $) $1 no h or {Host} + R$+ $| $| $+ $: $1 h not set, {Host} set + R$+ $| +$* $| $* $: $1 h is +detail, {Host} set ++R$+ $| $* @ $+ $| $* $: $(macro {Host} $@ @$3 $) $1 set {Host} to host in h + R$+ $| $+ $| $* $: $(macro {Host} $@ @$2 $) $1 set {Host} to h + ')dnl + +--- include/sm/os/sm_os_freebsd.h 2002/03/10 22:41:03 1.10 ++++ include/sm/os/sm_os_freebsd.h 2002/04/15 17:17:05 1.11 +@@ -31,11 +31,7 @@ + #endif + + #ifndef SM_CONF_SHM +-# ifdef __sparc64__ +-# define SM_CONF_SHM 0 +-# else /* __sparc64__ */ +-# define SM_CONF_SHM 1 +-# endif /* __sparc64__ */ ++# define SM_CONF_SHM 1 + #endif /* SM_CONF_SHM */ + #ifndef SM_CONF_SEM + # define SM_CONF_SEM 1 +--- sendmail/mailq.1 2000/12/23 19:37:48 8.18 ++++ sendmail/mailq.1 2002/04/12 05:07:58 8.19 +@@ -18,5 +18,6 @@ + .SH SYNOPSIS + .B mailq ++.RB [ \-Ac ] + .RB [ \-v ] + .SH DESCRIPTION + .B Mailq +@@ -45,7 +46,13 @@ + .B Mailq + is identical to ``sendmail -bp''. + .PP +-The options are as follows: ++The relevant options are as follows: ++.TP ++.B \-Ac ++Show the mail submission queue specified in ++.I /etc/mail/submit.cf ++instead of the MTA queue specified in ++.IR /etc/mail/sendmail.cf . + .TP + .B \-v + Print verbose information. +--- sendmail/main.c 2002/02/27 23:49:52 8.876 ++++ sendmail/main.c 2002/04/11 02:51:38 8.877 +@@ -726,6 +726,8 @@ + (void) sm_signal(SIGPIPE, SIG_IGN); + OldUmask = umask(022); + FullName = getextenv("NAME"); ++ if (FullName != NULL) ++ FullName = newstr(FullName); + + /* + ** Initialize name server if it is going to be used. +--- sendmail/milter.c 2002/03/05 00:23:47 8.194 ++++ sendmail/milter.c 2002/04/14 03:55:07 8.196 +@@ -1737,6 +1737,7 @@ + int mid; + char *v; + char *buf, *bp; ++ char exp[MAXLINE]; + ssize_t s; + + /* sanity check */ +@@ -1753,7 +1754,8 @@ + v = macvalue(mid, e); + if (v == NULL) + continue; +- s += strlen(macros[i]) + 1 + strlen(v) + 1; ++ expand(v, exp, sizeof(exp), e); ++ s += strlen(macros[i]) + 1 + strlen(exp) + 1; + } + + if (s < 0) +@@ -1770,14 +1772,15 @@ + v = macvalue(mid, e); + if (v == NULL) + continue; ++ expand(v, exp, sizeof(exp), e); + + if (tTd(64, 10)) + sm_dprintf("milter_send_macros(%s, %c): %s=%s\n", +- m->mf_name, cmd, macros[i], v); ++ m->mf_name, cmd, macros[i], exp); + + (void) sm_strlcpy(bp, macros[i], s - (bp - buf)); + bp += strlen(bp) + 1; +- (void) sm_strlcpy(bp, v, s - (bp - buf)); ++ (void) sm_strlcpy(bp, exp, s - (bp - buf)); + bp += strlen(bp) + 1; + } + (void) milter_write(m, SMFIC_MACRO, buf, s, +@@ -2900,8 +2903,6 @@ + { + int err; + +-# if NOFTRUNCATE +- /* XXX: Not much we can do except rewind it */ + err = sm_io_error(e->e_dfp); + (void) sm_io_flush(e->e_dfp, SM_TIME_DEFAULT); + +@@ -2917,16 +2918,26 @@ + /* errno is set implicitly by fseek() before return */ + err = sm_io_seek(e->e_dfp, SM_TIME_DEFAULT, + 0, SEEK_SET); ++ if (err < 0) ++ { ++ MILTER_DF_ERROR("milter_replbody: sm_io_seek %s: %s"); ++ return -1; ++ } ++# if NOFTRUNCATE ++ /* XXX: Not much we can do except rewind it */ ++ errno = EINVAL; ++ MILTER_DF_ERROR("milter_replbody: ftruncate not available on this platform (%s:%s)"); ++ return -1; + # else /* NOFTRUNCATE */ + err = ftruncate(sm_io_getinfo(e->e_dfp, + SM_IO_WHAT_FD, NULL), + 0); +-# endif /* NOFTRUNCATE */ + if (err < 0) + { + MILTER_DF_ERROR("milter_replbody: sm_io ftruncate %s: %s"); + return -1; + } ++# endif /* NOFTRUNCATE */ + } + + if (prevsize > e->e_msgsize) diff --git a/mail/sendmail812/Makefile b/mail/sendmail812/Makefile index 2a6cd8ac5743..6e759aa41a97 100644 --- a/mail/sendmail812/Makefile +++ b/mail/sendmail812/Makefile @@ -7,6 +7,7 @@ PORTNAME= sendmail PORTVERSION= 8.12.3 +PORTREVISION= 1 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \ ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,} diff --git a/mail/sendmail812/files/patch-stable b/mail/sendmail812/files/patch-stable new file mode 100644 index 000000000000..f077974ae0e4 --- /dev/null +++ b/mail/sendmail812/files/patch-stable @@ -0,0 +1,135 @@ +--- cf/m4/proto.m4 2002/04/02 23:42:42 8.639 ++++ cf/m4/proto.m4 2002/04/16 21:21:26 8.640 +@@ -1204,6 +1204,7 @@ + R$+ $| $| $: $(macro {Host} $@ $) $1 no h or {Host} + R$+ $| $| $+ $: $1 h not set, {Host} set + R$+ $| +$* $| $* $: $1 h is +detail, {Host} set ++R$+ $| $* @ $+ $| $* $: $(macro {Host} $@ @$3 $) $1 set {Host} to host in h + R$+ $| $+ $| $* $: $(macro {Host} $@ @$2 $) $1 set {Host} to h + ')dnl + +--- include/sm/os/sm_os_freebsd.h 2002/03/10 22:41:03 1.10 ++++ include/sm/os/sm_os_freebsd.h 2002/04/15 17:17:05 1.11 +@@ -31,11 +31,7 @@ + #endif + + #ifndef SM_CONF_SHM +-# ifdef __sparc64__ +-# define SM_CONF_SHM 0 +-# else /* __sparc64__ */ +-# define SM_CONF_SHM 1 +-# endif /* __sparc64__ */ ++# define SM_CONF_SHM 1 + #endif /* SM_CONF_SHM */ + #ifndef SM_CONF_SEM + # define SM_CONF_SEM 1 +--- sendmail/mailq.1 2000/12/23 19:37:48 8.18 ++++ sendmail/mailq.1 2002/04/12 05:07:58 8.19 +@@ -18,5 +18,6 @@ + .SH SYNOPSIS + .B mailq ++.RB [ \-Ac ] + .RB [ \-v ] + .SH DESCRIPTION + .B Mailq +@@ -45,7 +46,13 @@ + .B Mailq + is identical to ``sendmail -bp''. + .PP +-The options are as follows: ++The relevant options are as follows: ++.TP ++.B \-Ac ++Show the mail submission queue specified in ++.I /etc/mail/submit.cf ++instead of the MTA queue specified in ++.IR /etc/mail/sendmail.cf . + .TP + .B \-v + Print verbose information. +--- sendmail/main.c 2002/02/27 23:49:52 8.876 ++++ sendmail/main.c 2002/04/11 02:51:38 8.877 +@@ -726,6 +726,8 @@ + (void) sm_signal(SIGPIPE, SIG_IGN); + OldUmask = umask(022); + FullName = getextenv("NAME"); ++ if (FullName != NULL) ++ FullName = newstr(FullName); + + /* + ** Initialize name server if it is going to be used. +--- sendmail/milter.c 2002/03/05 00:23:47 8.194 ++++ sendmail/milter.c 2002/04/14 03:55:07 8.196 +@@ -1737,6 +1737,7 @@ + int mid; + char *v; + char *buf, *bp; ++ char exp[MAXLINE]; + ssize_t s; + + /* sanity check */ +@@ -1753,7 +1754,8 @@ + v = macvalue(mid, e); + if (v == NULL) + continue; +- s += strlen(macros[i]) + 1 + strlen(v) + 1; ++ expand(v, exp, sizeof(exp), e); ++ s += strlen(macros[i]) + 1 + strlen(exp) + 1; + } + + if (s < 0) +@@ -1770,14 +1772,15 @@ + v = macvalue(mid, e); + if (v == NULL) + continue; ++ expand(v, exp, sizeof(exp), e); + + if (tTd(64, 10)) + sm_dprintf("milter_send_macros(%s, %c): %s=%s\n", +- m->mf_name, cmd, macros[i], v); ++ m->mf_name, cmd, macros[i], exp); + + (void) sm_strlcpy(bp, macros[i], s - (bp - buf)); + bp += strlen(bp) + 1; +- (void) sm_strlcpy(bp, v, s - (bp - buf)); ++ (void) sm_strlcpy(bp, exp, s - (bp - buf)); + bp += strlen(bp) + 1; + } + (void) milter_write(m, SMFIC_MACRO, buf, s, +@@ -2900,8 +2903,6 @@ + { + int err; + +-# if NOFTRUNCATE +- /* XXX: Not much we can do except rewind it */ + err = sm_io_error(e->e_dfp); + (void) sm_io_flush(e->e_dfp, SM_TIME_DEFAULT); + +@@ -2917,16 +2918,26 @@ + /* errno is set implicitly by fseek() before return */ + err = sm_io_seek(e->e_dfp, SM_TIME_DEFAULT, + 0, SEEK_SET); ++ if (err < 0) ++ { ++ MILTER_DF_ERROR("milter_replbody: sm_io_seek %s: %s"); ++ return -1; ++ } ++# if NOFTRUNCATE ++ /* XXX: Not much we can do except rewind it */ ++ errno = EINVAL; ++ MILTER_DF_ERROR("milter_replbody: ftruncate not available on this platform (%s:%s)"); ++ return -1; + # else /* NOFTRUNCATE */ + err = ftruncate(sm_io_getinfo(e->e_dfp, + SM_IO_WHAT_FD, NULL), + 0); +-# endif /* NOFTRUNCATE */ + if (err < 0) + { + MILTER_DF_ERROR("milter_replbody: sm_io ftruncate %s: %s"); + return -1; + } ++# endif /* NOFTRUNCATE */ + } + + if (prevsize > e->e_msgsize) |