From 6274ac19e2c221d7f1e5b53ae3ed32a7b70d18ba Mon Sep 17 00:00:00 2001 From: dinoex Date: Sat, 6 Apr 2002 08:17:34 +0000 Subject: - Update to new release: sendmail-8.12.3 - Patches removed that are now in the distribution - More MILTER dokumentation - sm-client.sh.sample have now 'restart' command. - Add standalone startupscript for all sendmail deamons - Update pkg-message This version fixes a long-standing MIME (7 to 8-bit) conversion bug and several smaller problems, e.g., a possible communication problem between the MTA and libmilter, a bug in handling (invalid) addresses containing 8-bit characters, a possible problem with small timeouts being lost on slow machines if itimers are used, and the handling of the 421 reply code and timeouts in the SMTP delivery code. There are two changes in the msp feature that may change the behavior: MX lookups are turned on for the SMTP mailers and hence `[localhost]' is used as default instead of `localhost', and confTIME_ZONE is set to USE_TZ in submit.mc. A complete list of changes can be found in the release notes. --- mail/sendmail/Makefile | 7 ++- mail/sendmail/distinfo | 2 +- mail/sendmail/files/patch-FreeBSD | 8 ---- mail/sendmail/files/patch-sendmail-deliver.c | 64 ---------------------------- mail/sendmail/files/patch-sendmail-milter.c | 39 ----------------- mail/sendmail/files/pkg-milter | 1 + mail/sendmail/files/sendmail.sh | 58 +++++++++++++++++++++++++ mail/sendmail/files/sm-client.sh | 17 ++++++-- mail/sendmail/pkg-message | 5 ++- mail/sendmail/pkg-plist | 3 +- 10 files changed, 84 insertions(+), 120 deletions(-) delete mode 100644 mail/sendmail/files/patch-FreeBSD delete mode 100644 mail/sendmail/files/patch-sendmail-deliver.c delete mode 100644 mail/sendmail/files/patch-sendmail-milter.c create mode 100644 mail/sendmail/files/sendmail.sh (limited to 'mail/sendmail') diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile index 2396c1a3618e..250cd8ddf3e8 100644 --- a/mail/sendmail/Makefile +++ b/mail/sendmail/Makefile @@ -6,8 +6,7 @@ # PORTNAME= sendmail -PORTVERSION= 8.12.2 -PORTREVISION= 4 +PORTVERSION= 8.12.3 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \ ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,} @@ -84,6 +83,8 @@ SENDMAIL= ${PREFIX}/sbin/sendmail post-extract: @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/sm-client.sh \ > ${WRKSRC}/sm-client.sh + @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/sendmail.sh \ + > ${WRKSRC}/sendmail.sh do-configure: ${PERL} -pi -e "s,\`-pthread\',\`${PTHREAD_LIBS}\'," \ @@ -137,6 +138,8 @@ post-install: .endif ${INSTALL_SCRIPT} ${WRKSRC}/sm-client.sh \ ${PREFIX}/etc/rc.d/sm-client.sh.sample + ${INSTALL_SCRIPT} ${WRKSRC}/sendmail.sh \ + ${PREFIX}/etc/rc.d/sendmail.sh.sample ${CHOWN} smmsp:smmsp /var/spool/clientmqueue ${CHMOD} 770 /var/spool/clientmqueue .for i in ${MAN8} diff --git a/mail/sendmail/distinfo b/mail/sendmail/distinfo index 9ac20a22e487..363717bc73bb 100644 --- a/mail/sendmail/distinfo +++ b/mail/sendmail/distinfo @@ -1 +1 @@ -MD5 (sendmail.8.12.2.tar.gz) = 67b33ea2e385c1644085fc4ee4bb2940 +MD5 (sendmail.8.12.3.tar.gz) = 5f376123cf75b51d95b9ca4caf386fdb diff --git a/mail/sendmail/files/patch-FreeBSD b/mail/sendmail/files/patch-FreeBSD deleted file mode 100644 index a733ccdd1594..000000000000 --- a/mail/sendmail/files/patch-FreeBSD +++ /dev/null @@ -1,8 +0,0 @@ ---- devtools/OS/FreeBSD Wed Jan 10 21:44:08 2001 -+++ devtools/OS/FreeBSD Thu Feb 14 08:59:38 2002 -@@ -5,4 +5,5 @@ - define(`confLD', `cc') - define(`confMTLDOPTS', `-pthread') -+define(`confMTCCOPTS', `-D_THREAD_SAFE') - define(`confLDOPTS_SO', `-shared') - define(`confCCOPTS_SO', `-fPIC') diff --git a/mail/sendmail/files/patch-sendmail-deliver.c b/mail/sendmail/files/patch-sendmail-deliver.c deleted file mode 100644 index a6c81e12774c..000000000000 --- a/mail/sendmail/files/patch-sendmail-deliver.c +++ /dev/null @@ -1,64 +0,0 @@ -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; - - diff --git a/mail/sendmail/files/patch-sendmail-milter.c b/mail/sendmail/files/patch-sendmail-milter.c deleted file mode 100644 index 3c56506b00c1..000000000000 --- a/mail/sendmail/files/patch-sendmail-milter.c +++ /dev/null @@ -1,39 +0,0 @@ -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) \ - { \ diff --git a/mail/sendmail/files/pkg-milter b/mail/sendmail/files/pkg-milter index f966f52e34a7..7e4bab67915c 100644 --- a/mail/sendmail/files/pkg-milter +++ b/mail/sendmail/files/pkg-milter @@ -28,6 +28,7 @@ lib/libsmdb.a %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_main.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_register.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_replacebody.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setbacklog.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setconn.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setpriv.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setreply.html diff --git a/mail/sendmail/files/sendmail.sh b/mail/sendmail/files/sendmail.sh new file mode 100644 index 000000000000..a3f82d76ded7 --- /dev/null +++ b/mail/sendmail/files/sendmail.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# $FreeBSD$ +# +if ! test -x %%PREFIX%%/sbin/sendmail +then + exit 0 +fi +# +case "$1" in +start) + # If there is a global system configuration file, suck it in. + # + if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs + elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf + fi + + # Flags to sendmail (as a server) + sendmail_flags="${sendmail_flags--L sm-mta -bd -q30m}" + # Flags for sendmail_msp_queue daemon. + sendmail_msp_queue_flags=\ + "${sendmail_msp_queue_flags--L sm-msp-queue -Ac -q30m}" + # + %%PREFIX%%/sbin/sendmail ${sendmail_flags} && + echo -n ' sendmail' + %%PREFIX%%/sbin/sendmail ${sendmail_msp_queue_flags} && + echo -n ' sm-msp-queue' + ;; +stop) + if test -e /var/run/sendmail.pid + then + kill `head -1 /var/run/sendmail.pid` + rm -f /var/run/sendmail.pid + fi + if test -e /var/spool/clientmqueue/sm-client.pid + then + kill `head -1 /var/spool/clientmqueue/sm-client.pid` + rm -f /var/spool/clientmqueue/sm-client.pid + fi + ;; +restart) + if test -e /var/run/sendmail.pid + then + kill -1 `head -1 /var/run/sendmail.pid` + fi + if test -e /var/spool/clientmqueue/sm-client.pid + then + kill -1 `head -1 /var/spool/clientmqueue/sm-client.pid` + fi + ;; +*) + echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1 + exit 65 + ;; +esac diff --git a/mail/sendmail/files/sm-client.sh b/mail/sendmail/files/sm-client.sh index 98d8870043b0..c481b57171e2 100644 --- a/mail/sendmail/files/sm-client.sh +++ b/mail/sendmail/files/sm-client.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/sendmail/files/Attic/sm-client.sh,v 1.2 2002-03-17 18:00:07 dinoex Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/sendmail/files/Attic/sm-client.sh,v 1.3 2002-04-06 08:17:34 dinoex Exp $ # if ! test -x %%PREFIX%%/sbin/sendmail then @@ -12,11 +12,20 @@ start) echo -n ' sm-msp-queue' ;; stop) - kill `head -1 /var/spool/clientmqueue/sm-client.pid` - rm -f /var/spool/clientmqueue/sm-client.pid + if test -e /var/spool/clientmqueue/sm-client.pid + then + kill `head -1 /var/spool/clientmqueue/sm-client.pid` + rm -f /var/spool/clientmqueue/sm-client.pid + fi + ;; +restart) + if test -e /var/spool/clientmqueue/sm-client.pid + then + kill -1 `head -1 /var/spool/clientmqueue/sm-client.pid` + fi ;; *) - echo "Usage: ${0##*/}: { start | stop }" 2>&1 + echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1 exit 65 ;; esac diff --git a/mail/sendmail/pkg-message b/mail/sendmail/pkg-message index e58214c0a312..376f77d3d543 100644 --- a/mail/sendmail/pkg-message +++ b/mail/sendmail/pkg-message @@ -7,9 +7,12 @@ $ make submit.cf you should add in /etc/make.conf: SENDMAIL_CF_DIR= %%PREFIX%%/share/sendmail/cf -To active the delivery from the local submission queue see: +To activate only the delivery from the local submission queue see: %%PREFIX%%/etc/rc.d/sm-client.sh.sample +To activate all sendmail processes see: +%%PREFIX%%/etc/rc.d/sendmail.sh.sample + To deliver all local mail to your mailhub, edit the last line of submit.mc: FEATURE(`msp','mailhub.do.main`)dnl diff --git a/mail/sendmail/pkg-plist b/mail/sendmail/pkg-plist index 428a07caf8d3..0593305fe73c 100644 --- a/mail/sendmail/pkg-plist +++ b/mail/sendmail/pkg-plist @@ -1,4 +1,4 @@ -@comment $FreeBSD: /tmp/pcvs/ports/mail/sendmail/pkg-plist,v 1.10 2002-01-05 23:43:12 dinoex Exp $ +@comment $FreeBSD: /tmp/pcvs/ports/mail/sendmail/pkg-plist,v 1.11 2002-04-06 08:17:33 dinoex Exp $ @exec if ! pw groupshow smmsp 2>/dev/null; then pw groupadd smmsp -g 90; fi @exec if ! pw usershow smmsp 2>/dev/null; then pw useradd smmsp -g smmsp -u 90 -h - -d /nonexistent -s /nonexistent -c "Sendmail Queue"; fi @exec mkdir -p /var/spool/clientmqueue @@ -13,6 +13,7 @@ bin/purgestat bin/rmail bin/vacation etc/rc.d/sm-client.sh.sample +etc/rc.d/sendmail.sh.sample libexec/mail.local libexec/smrsh sbin/editmap -- cgit