diff --git a/mail/metamail/00_mm-2.7-make.patch b/mail/metamail/00_mm-2.7-make.patch deleted file mode 100644 index 89b75f688..000000000 --- a/mail/metamail/00_mm-2.7-make.patch +++ /dev/null @@ -1,93 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/00_mm-2.7-make.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/Makefile.orig Wed Jan 26 12:32:33 1994 -+++ mm2.7/src/Makefile Wed Oct 11 21:44:12 1995 -@@ -38,7 +38,7 @@ - - STATICFLAG=FOOBAR${HOST_ARCH} - --CFLAGS = -g -I. ${$(STATICFLAG)} -+CFLAGS = $(RPM_OPT_FLAGS) -I. -DLINUX ${$(STATICFLAG)} - # The following is better if you want to make sure you run with SYSV defined - # CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV - # Also, for SGI Irix, compile in K&R mode -@@ -75,7 +75,7 @@ - INSTALL = install -c -s - - # Root of installation tree --INSTROOT = /usr/local -+INSTROOT = /usr - # - # This is where binaries should be copied - LOCALBINDIR = ${INSTROOT}/bin -@@ -91,7 +91,7 @@ - FONTSUFFIX=pcf - - # This is where the mailcap file should be put --MAILCAPDIR = ${INSTROOT}/etc -+MAILCAPDIR = /etc - - # This helps with the "for" constructs below on some platforms: - SHELL=/bin/sh -@@ -145,7 +145,7 @@ - echo "installing man page $$target";\ - ${CP} $$file $$target; \ - done) -- @echo "Renaming old mailcap file to $(MAILCAPDIR)/mailcap.old -+ @echo "Renaming old mailcap file to $(MAILCAPDIR)/mailcap.old" - -mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old - @echo "installing file $(MAILCAPDIR)/mailcap" - ${CP} mailcap $(MAILCAPDIR) ---- mm2.7/src/Makefile.don Thu Feb 22 14:12:21 1996 -+++ mm2.7/src/Makefile Thu Feb 22 14:12:54 1996 -@@ -145,10 +145,6 @@ - echo "installing man page $$target";\ - ${CP} $$file $$target; \ - done) -- @echo "Renaming old mailcap file to $(MAILCAPDIR)/mailcap.old" -- -mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old -- @echo "installing file $(MAILCAPDIR)/mailcap" -- ${CP} mailcap $(MAILCAPDIR) - - uninstall-all: - @(cd bin; \ -@@ -172,8 +168,6 @@ - echo "rm-ing man page $$target";\ - ${RM} $$target; \ - done) -- @echo "rm-ing file $(MAILCAPDIR)/mailcap" -- @${RM} $(MAILCAPDIR)/mailcap - - clean: - -${RM} -rf *.BAK ---- mm2.7/src/Makefile.don Thu Feb 22 14:19:05 1996 -+++ mm2.7/src/Makefile Thu Feb 22 14:19:27 1996 -@@ -138,13 +138,6 @@ - echo "installing man page $$target";\ - ${CP} $$file $$target; \ - done) -- @(cd man; \ -- for file in *.4; \ -- do \ -- target=$(MAN4DIR)/`basename $$file .4`.$(MAN4EXT); \ -- echo "installing man page $$target";\ -- ${CP} $$file $$target; \ -- done) - - uninstall-all: - @(cd bin; \ diff --git a/mail/metamail/05_mm-2.7-fonts.patch b/mail/metamail/05_mm-2.7-fonts.patch deleted file mode 100644 index d77a3118c..000000000 --- a/mail/metamail/05_mm-2.7-fonts.patch +++ /dev/null @@ -1,33 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/05_mm-2.7-fonts.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/fonts/Makefile.marc Tue Feb 13 14:56:31 1996 -+++ mm2.7/src/fonts/Makefile Tue Feb 13 14:57:00 1996 -@@ -28,11 +28,11 @@ - -${DIRBUILDER} - - shownonascii: Xshownonascii -- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xshownonascii > shownonascii -+ sed -e s@/u/nsb/lib/fonts@/usr/lib/metamail/fonts@ < Xshownonascii > shownonascii - chmod +x shownonascii - - mailto-hebrew: Xmailto-hebrew -- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xmailto-hebrew > mailto-hebrew -+ sed -e s@/u/nsb/lib/fonts@/usr/lib/metamail/fonts@ < Xmailto-hebrew > mailto-hebrew - chmod +x mailto-hebrew - - clean: diff --git a/mail/metamail/10_mm-2.7-glibc.patch b/mail/metamail/10_mm-2.7-glibc.patch deleted file mode 100644 index 1f002d9ef..000000000 --- a/mail/metamail/10_mm-2.7-glibc.patch +++ /dev/null @@ -1,27 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/10_mm-2.7-glibc.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/metamail/metamail.c.ewt Mon Aug 26 17:16:59 1996 -+++ mm2.7/src/metamail/metamail.c Mon Aug 26 17:17:12 1996 -@@ -48,6 +48,7 @@ - #ifndef AMIGA - #ifdef SYSV - #include -+#include - #include - #else /* SYSV */ - #include diff --git a/mail/metamail/15_mm-2.7-csh.patch b/mail/metamail/15_mm-2.7-csh.patch deleted file mode 100644 index 54319b186..000000000 --- a/mail/metamail/15_mm-2.7-csh.patch +++ /dev/null @@ -1,141 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/15_mm-2.7-csh.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/metamail/mailto.c.cshfix Sat Oct 25 09:50:36 1997 -+++ mm2.7/src/metamail/mailto.c Sat Oct 25 09:51:03 1997 -@@ -200,9 +200,12 @@ - } - - TildeHelp() { -- char *pager = getenv("PAGER"); - char TmpName[100], CmdBuf[150]; -+ char *pager; - FILE *fp; -+ -+ if ((pager = getenv("METAMAIL_PAGER")) == NULL) -+ pager = getenv("PAGER"); - - strcpy(TmpName, tmpname()); - fp = fopen(TmpName, "w"); ---- mm2.7/src/bin/showexternal.cshfix Sat Oct 25 09:45:05 1997 -+++ mm2.7/src/bin/showexternal Sat Oct 25 09:46:25 1997 -@@ -19,6 +19,9 @@ - if (! $?METAMAIL_TMPDIR) then - set METAMAIL_TMPDIR=/tmp - endif -+if (! $?METAMAIL_PAGER) then -+ set METAMAIL_PAGER=more -+endif - if (! $?FTP) then - set FTP=ftp - endif -@@ -27,11 +30,19 @@ - echo "Usage: showexternal body-file access-type name [site [directory [mode [server]]]]" - exit -1 - endif --set bodyfile=$1 -+# Check argument integrity. Don't trust mail headers -+switch ("$1$2$3$4$5$6$7") -+case "*[ ]*": -+ echo "Illegal white space in arguments -- possibly a mail bomb?!" -+ echo "Command was:" -+ echo \'$0\' \'$1\' \'$2\' \'$3\' \'$4\' \'$5\' \'$6\' \'$7\' -+ exit 2 -+endsw -+set bodyfile="$1" - set atype=`echo $2 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - set name=$3 - if ($#argv > 3) then -- set site=$4 -+ set site="$4" - else - set site="" - endif -@@ -41,12 +52,12 @@ - set dir="" - endif - if ($#argv > 5) then -- set mode=$6 -+ set mode="$6" - else - set mode="" - endif - if ($#argv > 6) then -- set server=$7 -+ set server="$7" - else - set server="" - endif -@@ -96,7 +107,7 @@ - - ! - sed -e 1,/^\$/d < $bodyfile >> ${METAMAIL_TMPDIR}/ext.junk.$$ -- more ${METAMAIL_TMPDIR}/ext.junk.$$ -+ ${METAMAIL_PAGER} ${METAMAIL_TMPDIR}/ext.junk.$$ - rm ${METAMAIL_TMPDIR}/ext.junk.$$ - breaksw - default: ---- mm2.7/src/bin/showpartial.cshfix Sat Oct 25 09:46:37 1997 -+++ mm2.7/src/bin/showpartial Sat Oct 25 09:47:24 1997 -@@ -11,14 +11,14 @@ - echo "Usage: showpartial file id partnum totalnum" - exit -1 - endif --set file=$1 -+set file="$1" - # This next line is because message-id can contain weird chars - set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` - @ partnum = $3 - if ($#argv == 3 || $4 == "") then - set totalnum=-1 - else -- @ totalnum = $4 -+ @ totalnum = "$4" - endif - - if (! -d $TREEROOT) then ---- mm2.7/src/bin/sun-message.csh.cshfix Sat Oct 25 09:49:16 1997 -+++ mm2.7/src/bin/sun-message.csh Sat Oct 25 09:50:15 1997 -@@ -8,6 +8,10 @@ - mkdir /tmp/decode.$$ - cd /tmp/decode.$$ - -+if (! $?METAMAIL_PAGER) then -+ set METAMAIL_PAGER=more -+endif -+ - if ($2 == "uuencode") then - uudecode $1 - -@@ -37,7 +41,7 @@ - cd /tmp; /bin/rm -rf /tmp/decode.$$ - exit 0 - else if ($ans == 1) then -- more $fn -+ ${METAMAIL_PAGER} $fn - else if ($ans == 2) then - set nfn = "" - echo -n "Save as: $HOME/" -@@ -53,7 +57,7 @@ - set defans = "3" - end - else -- more $1 -+ ${METAMAIL_PAGER} $1 - endif - - diff --git a/mail/metamail/20_mm-2.7-uudecode.patch b/mail/metamail/20_mm-2.7-uudecode.patch deleted file mode 100644 index 5c82544d0..000000000 --- a/mail/metamail/20_mm-2.7-uudecode.patch +++ /dev/null @@ -1,62 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/20_mm-2.7-uudecode.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/bin/sun-audio-file.ewt Fri Oct 24 09:41:11 1997 -+++ mm2.7/src/bin/sun-audio-file Fri Oct 24 09:52:05 1997 -@@ -6,7 +6,13 @@ - set METAMAIL_TMPDIR=/tmp - endif - --cd ${METAMAIL_TMPDIR} --uudecode < $1 --audiotool audio-file --rm -f audio-file $1 -+set fn=`mktemp $METAMAIL_TMPDIR/audio.XXXXXX` -+test -n "$fn" -+if $? then -+ exit 1 -+endif -+ -+uudecode -o $fn < $1 -+ -+audiotool $fn -+rm -f $fn $1 ---- mm2.7/src/bin/sun-message.csh.ewt Fri Oct 24 09:44:07 1997 -+++ mm2.7/src/bin/sun-message.csh Fri Oct 24 09:52:30 1997 -@@ -9,7 +9,13 @@ - cd /tmp/decode.$$ - - if ($2 == "uuencode") then -- uudecode $1 -+ set fn=`mktemp $METAMAIL_TMPDIR/audio.XXXXXX` -+ test -n "$fn" -+ if $? then -+ exit 1 -+ endif -+ -+ uudecode -o $fn $1 - - echo "The following file was uudecoded:" - echo "" -@@ -17,7 +23,6 @@ - set defans = "1" - while (1) - ls -l -- set fn = * - - echo "" - echo "Please choose one:" diff --git a/mail/metamail/25_mm-2.7-sunquote.patch b/mail/metamail/25_mm-2.7-sunquote.patch deleted file mode 100644 index 69e331df7..000000000 --- a/mail/metamail/25_mm-2.7-sunquote.patch +++ /dev/null @@ -1,37 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/25_mm-2.7-sunquote.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/bin/sun-message.csh~ Tue May 19 10:22:52 1998 -+++ mm2.7/src/bin/sun-message.csh Tue May 19 10:26:39 1998 -@@ -5,6 +5,8 @@ - # This is sun-message. It looks at $2 to figure out how to decode $1, then gives the - # user a short menu of choices, display, save, or quit. - # -+# $2 is untrustworthy data. Quote it. -+# - mkdir /tmp/decode.$$ - cd /tmp/decode.$$ - -@@ -12,7 +14,7 @@ - set METAMAIL_PAGER=more - endif - --if ($2 == "uuencode") then -+if ("$2" == "uuencode") then - set fn=`mktemp $METAMAIL_TMPDIR/audio.XXXXXX` - test -n "$fn" - if $? then diff --git a/mail/metamail/30_mm-2.7-ohnonotagain.patch b/mail/metamail/30_mm-2.7-ohnonotagain.patch deleted file mode 100644 index d09ed91bb..000000000 --- a/mail/metamail/30_mm-2.7-ohnonotagain.patch +++ /dev/null @@ -1,1811 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/30_mm-2.7-ohnonotagain.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -diff -d -r -u -P mm2.7.orig/src/bin/audiocompose mm2.7/src/bin/audiocompose ---- mm2.7.orig/src/bin/audiocompose Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/audiocompose Sat Jun 20 14:41:16 1998 -@@ -28,8 +28,8 @@ - set dev=/dev/audio - endif - --set audiofile=$1 --if (-e $audiofile && ! -z $audiofile) goto whatnext -+set audiofile="$1" -+if (-e "$audiofile" && ! -z "$audiofile") goto whatnext - - record: - echo -n "Press RETURN when you are ready to start recording: " -@@ -38,13 +38,22 @@ - # THIS IS UNBELIEVABLY GRUBBY - onintr cleanup - if (! $?RECORD_AUDIO) then -- (/bin/cat < $dev > $audiofile) & -+ (/bin/cat < $dev > "$audiofile") & - else -- ($RECORD_AUDIO > $audiofile) & -+ ($RECORD_AUDIO > "$audiofile") & - endif --jobs -l > ${METAMAIL_TMPDIR}/AUDCAT.$$ --set foo=`/bin/cat ${METAMAIL_TMPDIR}/AUDCAT.$$` --/bin/rm ${METAMAIL_TMPDIR}/AUDCAT.$$ -+# Generate temporary file name: -+if ( -x /bin/mktemp ) then -+ set TmpAudCat=`/bin/mktemp ${METAMAIL_TMPDIR}/AUDCAT.XXXXXXX` || exit 1 -+else if ( -x /usr/bin/mktemp ) then -+ set TmpAudCat=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/AUDCAT.XXXXXXX` || exit 1 -+else -+ set TmpAudCat=${METAMAIL_TMPDIR}/AUDCAT.$$ -+ rm -rf $TmpAudCat -+endif -+jobs -l > $TmpAudCat -+set foo=`/bin/cat $TmpAudCat` -+/bin/rm $TmpAudCat - set PID=$foo[2] - echo -n "press RETURN when you are done recording: " - set foo=$< -@@ -63,7 +72,7 @@ - set which = $< - switch ("$which") - case 1: -- cat $audiofile > $dev -+ cat "$audiofile" > $dev - breaksw - case 2: - goto record -diff -d -r -u -P mm2.7.orig/src/bin/audiosend mm2.7/src/bin/audiosend ---- mm2.7.orig/src/bin/audiosend Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/audiosend Sat Jun 20 14:42:48 1998 -@@ -29,7 +29,7 @@ - endif - - if ( $#argv == 1 ) then -- set to = $1 -+ set to = "$1" - else - echo -n "To: " - set to = $< -@@ -43,8 +43,23 @@ - echo -n "Press RETURN when you are ready to start recording: " - set foo = $< - --set fname = ${METAMAIL_TMPDIR}/audio-out.$$ --set fnameraw = ${METAMAIL_TMPDIR}/audio-raw.$$ -+# Generate work file names: -+if ( -x /bin/mktemp ) then -+ set fname=`/bin/mktemp ${METAMAIL_TMPDIR}/audio-out.XXXXXXX` || exit 1 -+else if ( -x /usr/bin/mktemp ) then -+ set fname=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/audio-out.XXXXXXX` || exit 1 -+else -+ set fname = ${METAMAIL_TMPDIR}/audio-out.$$ -+ rm -rf $fname -+endif -+if ( -x /bin/mktemp ) then -+ set fnameraw=`/bin/mktemp ${METAMAIL_TMPDIR}/audio-raw.XXXXXXX` || exit 1 -+else if ( -x /usr/bin/mktemp ) then -+ set fnameraw=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/audio-raw.XXXXXXX` || exit 1 -+else -+ set fnameraw = ${METAMAIL_TMPDIR}/audio-raw.$$ -+ rm -rf $fnameraw -+endif - - echo "To: " "$to" > $fname - echo "Subject: " "$subject" >> $fname -@@ -60,9 +75,18 @@ - else - ($RECORD_AUDIO > $fnameraw) & - endif --jobs -l > ${METAMAIL_TMPDIR}/AUDCAT.$$ --set foo=`/bin/cat ${METAMAIL_TMPDIR}/AUDCAT.$$` --/bin/rm ${METAMAIL_TMPDIR}/AUDCAT.$$ -+# Generate temporary file name: -+if ( -x /bin/mktemp ) then -+ set TmpAudCat=`/bin/mktemp ${METAMAIL_TMPDIR}/AUDCAT.XXXXXXX` || exit 1 -+else if ( -x /usr/bin/mktemp ) then -+ set TmpAudCat=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/AUDCAT.XXXXXXX` || exit 1 -+else -+ set TmpAudCat=${METAMAIL_TMPDIR}/AUDCAT.$$ -+ rm -rf $TmpAudCat -+endif -+jobs -l > $TmpAudCat -+set foo=`/bin/cat $TmpAudCat` -+/bin/rm $TmpAudCat - set PID=$foo[2] - echo -n "press RETURN when you are done recording: " - set foo=$< -@@ -86,7 +110,7 @@ - switch ("$which") - case 1: - echo -n "Sending mail, please wait... " -- /usr/lib/sendmail $to $cc < $fname -+ /usr/lib/sendmail "$to" "$cc" < $fname - if (! $status) then - echo "Done." - rm $fname -diff -d -r -u -P mm2.7.orig/src/bin/extcompose mm2.7/src/bin/extcompose ---- mm2.7.orig/src/bin/extcompose Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/extcompose Sat Jun 20 14:47:19 1998 -@@ -6,7 +6,7 @@ - echo "Usage: extcompose output-file-name" - exit 1 - endif --set OUTFNAME=$1 -+set OUTFNAME="$1" - - chooseaccesstype: - echo "" -@@ -19,21 +19,21 @@ - echo "" - echo -n "Please enter a number from 1 to 5: " - set ans=$< --if ($ans == 1) then -+if ("$ans" == 1) then - set accesstype=local-file --else if ($ans == 2) then -+else if ("$ans" == 2) then - set accesstype=afs --else if ($ans == 3) then -+else if ("$ans" == 3) then - set accesstype=anon-ftp --else if ($ans == 4) then -+else if ("$ans" == 4) then - set accesstype=ftp --else if ($ans == 5) then -+else if ("$ans" == 5) then - set accesstype=mail-server - else - echo "That is NOT one of your choices." - goto chooseaccesstype - endif --if ($accesstype == "ftp" || $accesstype == "anon-ftp") then -+if ("$accesstype" == "ftp" || "$accesstype" == "anon-ftp") then - echo -n "Enter the full Internet domain name of the FTP site: " - set site=$< - echo -n "Enter the name of the directory containing the file (RETURN for top-level): " -@@ -42,27 +42,27 @@ - set name = $< - echo -n "Enter the transfer mode (type 'image' for binary data, RETURN otherwise): " - set mode = $< -- if ($mode == "") set mode=ascii -- echo "Content-type: message/external-body; access-type=$accesstype; name="\"$name\"\; > $OUTFNAME -- echo -n " site="\"$site\" >> $OUTFNAME -- if ($directory != "") echo -n "; directory="\"$directory\">> $OUTFNAME -- if ($mode != "") echo -n "; mode="\"$mode\">> $OUTFNAME -- echo "">> $OUTFNAME --else if ($accesstype == "local-file" || $accesstype == "afs") then -+ if ("$mode" == "") set mode=ascii -+ echo "Content-type: message/external-body; access-type=$accesstype; name="\"$name\"\; > "$OUTFNAME" -+ echo -n " site="\"$site\" >> "$OUTFNAME" -+ if ("$directory" != "") echo -n "; directory="\"$directory\">> "$OUTFNAME" -+ if ("$mode" != "") echo -n "; mode="\"$mode\">> "$OUTFNAME" -+ echo "">> "$OUTFNAME" -+else if ("$accesstype" == "local-file" || "$accesstype" == "afs") then - fname: - echo -n "Enter the full path name for the file: " - set name = $< -- if (! -e $name) then -+ if (! -e "$name") then - echo "The file $name does not seem to exist." - goto fname - endif -- echo "Content-type: message/external-body; access-type=$accesstype; name="\"$name\"> $OUTFNAME --else if ($accesstype == "mail-server") then -+ echo "Content-type: message/external-body; access-type=$accesstype; name="\"$name\"> "$OUTFNAME" -+else if ("$accesstype" == "mail-server") then - echo -n "Enter the full email address for the mailserver: " - set server=$< -- echo "Content-type: message/external-body; access-type=$accesstype; server="\"$server\"> $OUTFNAME -+ echo "Content-type: message/external-body; access-type=$accesstype; server="\"$server\"> "$OUTFNAME" - else -- echo accesstype $accesstype not yet implemented -+ echo accesstype "$accesstype" not yet implemented - goto chooseaccesstype - endif - -@@ -92,12 +92,12 @@ - echo "That is not one of your choices." - goto getcenc - endsw --echo "" >> $OUTFNAME --echo "Content-type: " $ctype >> $OUTFNAME --if ($cenc != "") echo "Content-transfer-encoding: " $cenc >> $OUTFNAME --echo "" >> $OUTFNAME --if ($accesstype == "mail-server") then -+echo "" >> "$OUTFNAME" -+echo "Content-type: " "$ctype" >> "$OUTFNAME" -+if ("$cenc" != "") echo "Content-transfer-encoding: " "$cenc" >> "$OUTFNAME" -+echo "" >> "$OUTFNAME" -+if ("$accesstype" == "mail-server") then - echo "Please enter all the data to be sent to the mailserver in the message body, " - echo "ending with ^D or your usual end-of-data character:" -- cat >> $OUTFNAME -+ cat >> "$OUTFNAME" - endif -diff -d -r -u -P mm2.7.orig/src/bin/getfilename mm2.7/src/bin/getfilename ---- mm2.7.orig/src/bin/getfilename Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/getfilename Sat Jun 20 14:47:43 1998 -@@ -8,9 +8,9 @@ - echo Aborted - exit -1 - endif --if (! -r $fnam) then -+if (! -r "$fnam") then - echo No such file - exit -1 - endif --cp $fnam $2 -+cp "$fnam" "$2" - exit 0 -diff -d -r -u -P mm2.7.orig/src/bin/mailserver mm2.7/src/bin/mailserver ---- mm2.7.orig/src/bin/mailserver Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/mailserver Sat Jun 20 23:01:33 1998 -@@ -28,20 +28,28 @@ - rehash - set FromName="" - set Subject="" --set TmpFile=/tmp/ms.$$ -+# Generate temporary file name: -+if ( -x /bin/mktemp ) then -+ set TmpFile=`/bin/mktemp /tmp/ms.XXXXXXX` || exit 1 -+else if ( -x /usr/bin/mktemp ) then -+ set TmpFile=`/usr/bin/mktemp /tmp/ms.XXXXXXX` || exit 1 -+else -+ set TmpFile=/tmp/ms.$$ -+ rm -rf $TmpFile -+endif - set FOORAW=$< - while ("$FOORAW" != "") - set FOO=(` echo "$FOORAW" | tr "[" "x"`) - set BAR=($FOO) --set BARLC=(`echo $FOO | tr A-Z a-z`) --if ($BARLC[1] == "from:") then -+set BARLC=(`echo "$FOO" | tr A-Z a-z`) -+if ("$BARLC[1]" == "from:") then - if ("$FromName" == "") then -- set FromName = ($BAR[2-]) -+ set FromName = ("$BAR[2-]") - endif - else if ($BARLC[1] == "reply-to:") then -- set FromName = ($BAR[2-]) -+ set FromName = ("$BAR[2-]") - else if ($BARLC[1] == "subject:") then -- set Subject = ($BAR[2-]) -+ set Subject = ("$BAR[2-]") - endif - set FOORAW=$< - end -@@ -52,10 +60,10 @@ - endif - - if ("$FromName" == "") then -- cat > $TmpFile < $TmpFile -+ echo To: "$MAINTAINER" >> $TmpFile -+ echo Subject: "$Subject" >> $TmpFile -+ cat >> $TmpFile < $TmpFile < $TmpFile -+ echo To: "$FromName" >> $TmpFile -+ echo Subject: Re: "$Subject" >> $TmpFile -+ cat >> $TmpFile < $TmpFile < $TmpFile -+ echo To: "$FromName" >> $TmpFile -+ echo Subject: Re: "$Subject" >> $TmpFile -+ echo "" >> $TmpFile -+ echo "You recently sent mail to this mail-server requesting the file:" >> $TmpFile -+ echo " $Subject" >> $TmpFile -+ echo "" >> $TmpFile -+ echo "That file does not exist, so your request could not be met." >> $TmpFile -+ echo "" >> $TmpFile -+ echo "Here is a list of the currently available files:" >> $TmpFile -+ echo "--------------------------------" >> $TmpFile - ls -R >> $TmpFile -+ echo "" >> $TmpFile - /usr/lib/sendmail -t < $TmpFile - rm $TmpFile - exit 0 - endif - --if (-e ${Subject}.ct) then -- set ct=`cat ${Subject}.ct` -+if (-e "${Subject}.ct") then -+ set ct=`cat "${Subject}.ct"` - else - set ct="application/octet-stream" - endif - - metasend -b -t "$FromName" -f "$Subject" -m "$ct" -s "Re: $Subject" - if ($status != 0) then -- cat > $TmpFile < $TmpFile -+ echo To: "$FromName" >> $TmpFile -+ echo Subject: Re: "$Subject" >> $TmpFile -+ echo "" >> $TmpFile -+ echo "You recently sent mail to this mail-server requestion the file:" >> $TmpFile -+ echo " $Subject" >> $TmpFile -+ echo "" >> $TmpFile -+ echo "An unanticipated error apparently precluded delivery of the file." >> $TmpFile -+ echo "Please accept our apologies." >> $TmpFile -+ echo "" >> $TmpFile -+ echo "Command failed:" >> $TmpFile -+ echo " metasend -b -t $FromName -f $Subject -m $ct -s Re: $Subject" >> $TmpFile -+ echo "" >> $TmpFile - /usr/lib/sendmail -t < $TmpFile - rm $TmpFile - exit 0 - endif - - if ("$LOGADDR" != "") then -- /usr/lib/sendmail -t < $TmpFile -+ echo To: "$LOGADDR" >> $TmpFile -+ echo Subject: Autosend delivery report >> $TmpFile -+ echo "" >> $TmpFile -+ echo The file: "$Subject" >> $TmpFile -+ echo was sent to: "$FromName" >> $TmpFile -+ echo "" >> $TmpFile -+ /usr/lib/sendmail -t < $TmpFile -+endif - --The file: $Subject --was sent to: $FromName --! -+rm -f $TmpFile - exit 0 -diff -d -r -u -P mm2.7.orig/src/bin/metasend mm2.7/src/bin/metasend ---- mm2.7.orig/src/bin/metasend Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/metasend Sat Jun 20 14:59:30 1998 -@@ -45,7 +45,7 @@ - echo "-S requires a following argument, the SPLIT threshhold" - exit -1 - endif -- set splitsize=$1 -+ set splitsize="$1" - shift - breaksw - case "-b": -@@ -68,7 +68,7 @@ - echo "-i requires a following argument, the Content-ID value" - exit -1 - endif -- set cid=$1 -+ set cid="$1" - shift - breaksw - case "-I": -@@ -77,7 +77,7 @@ - echo "-I requires a following argument, the multipart Content-ID value" - exit -1 - endif -- set multicid=$1 -+ set multicid="$1" - shift - breaksw - case "-s": -@@ -122,12 +122,12 @@ - echo "-e requires a following argument, the ENCODING value" - exit -1 - endif -- set encode=$1 -- if ($encode == "base64") then -+ set encode="$1" -+ if ("$encode" == "base64") then - set encodingprog = "mimencode -b" -- else if ($encode == "x-uue") then -+ else if ("$encode" == "x-uue") then - set encodingprog = "uuencode mail-body" -- else if ($encode == "7bit") then -+ else if ("$encode" == "7bit") then - set encodingprog = cat - else - set encodingprog = "mimencode -q" -@@ -141,9 +141,9 @@ - echo "-f requires a following argument, the DATA FILE" - exit -1 - endif -- set datafile=$1 -- if (! -e $datafile) then -- echo The file $datafile does not exist. -+ set datafile="$1" -+ if (! -e "$datafile") then -+ echo The file "$datafile" does not exist. - exit -1 - endif - shift -@@ -154,10 +154,10 @@ - echo "-m requires a following argument, the MIME CONTENT-TYPE" - exit -1 - endif --# set ctyperaw = $1 --# set ctype=`echo $ctyperaw | tr \" \'` -+# set ctyperaw = "$1" -+# set ctype=`echo "$ctyperaw" | tr \" \'` - set ctype = "$1" -- if (`echo $ctype | grep /` == "") then -+ if (`echo "$ctype" | grep /` == "") then - echo "Invalid content-type specified" - exit -1 - endif -@@ -228,11 +228,11 @@ - endif - endif - set ctype${multipart} = "$ctype" -- set datafile${multipart} = $datafile -- set encode${multipart} = $encode -+ set datafile${multipart} = "$datafile" -+ set encode${multipart} = "$encode" - set cdescrip${multipart} = "$cdescrip" - set cid${multipart} = "$cid" -- set isentity${multipart} = $isentity -+ set isentity${multipart} = "$isentity" - set encodingprog${multipart} = "$encodingprog" - unset ctype - unset datafile -@@ -247,11 +247,11 @@ - shift - breaksw - default: -- echo UNRECOGNIZED METASEND OPTION: $1 -+ echo UNRECOGNIZED METASEND OPTION: "$1" - exit -1 - endsw - end --if ($batchmode == 0) then -+if ("$batchmode" == 0) then - if (! $?to) then - echo -n "To: " - set to = $< -@@ -271,18 +271,18 @@ - # set ctype=`echo $ctyperaw | tr \" \'` - set ctype = "$<" - endif -- if (`echo $ctype | grep /` == "") then -+ if (`echo "$ctype" | grep /` == "") then - echo "Invalid content-type specified" - unset ctype - goto anotherpart - endif --# if ($ctype != $ctyperaw) echo Double quotes not allowed, using $ctype -+# if ("$ctype" != "$ctyperaw") echo Double quotes not allowed, using "$ctype" - if (! $?datafile) then - getfile: - echo -n "Name of file containing $ctype data: " - set datafile = $< -- if (! -e $datafile) then -- echo The file $datafile does not exist. -+ if (! -e "$datafile") then -+ echo The file "$datafile" does not exist. - goto getfile - endif - endif -@@ -320,12 +320,12 @@ - set ans=$< - if ("$ans" =~ y*) then - set ctype${multipart} = "$ctype" -- set datafile${multipart} = $datafile -- set encode${multipart} = $encode -+ set datafile${multipart} = "$datafile" -+ set encode${multipart} = "$encode" - set encodingprog${multipart} = "$encodingprog" - set cdescrip${multipart} = "$cdescrip" - set cid${multipart} = "$cid" -- set isentity${multipart} = $isentity -+ set isentity${multipart} = "$isentity" - set cdescrip = "An object packed by metasend" - set isentity=0 - unset ctype -@@ -339,7 +339,7 @@ - goto anotherpart - endif - else -- if ($outputfile == "") then -+ if ("$outputfile" == "") then - if (! $?to || ! $?subject || ! $?ctype || ! $?datafile) then - echo metasend: in batch mode, if output is not directed to a file,-t, -s, -f, and -m are all required - exit -1 -@@ -359,12 +359,12 @@ - exit -1 - endif - endif -- if (! -e $datafile) then -- echo metasend: The file $datafile does not exist -+ if (! -e "$datafile") then -+ echo metasend: The file "$datafile" does not exist - exit -1 - endif - # if (! $?cc) set cc="" --# if ($ctype != $ctyperaw) echo Double quotes not allowed, using $ctype -+# if ("$ctype" != "$ctyperaw") echo Double quotes not allowed, using "$ctype" - if (! $?encode) then - if ("$ctype" =~ text*) then - set encodingprog = "mimencode -q" -@@ -373,11 +373,11 @@ - set encodingprog = "mimencode -b" - set encode = base64 - endif -- else if ($encode == "base64") then -+ else if ("$encode" == "base64") then - set encodingprog = "mimencode -b" -- else if ($encode == "x-uue") then -+ else if ("$encode" == "x-uue") then - set encodingprog = "uuencode mail-body" -- else if ($encode == "7bit") then -+ else if ("$encode" == "7bit") then - set encodingprog = cat - else - set encodingprog = "mimencode -q" -@@ -395,14 +395,22 @@ - endif - endif - set ctype${multipart} = "$ctype" --set datafile${multipart} = $datafile --set encode${multipart} = $encode -+set datafile${multipart} = "$datafile" -+set encode${multipart} = "$encode" - set cdescrip${multipart} = "$cdescrip" - set cid${multipart} = "$cid" --set isentity${multipart} = $isentity -+set isentity${multipart} = "$isentity" - set encodingprog${multipart} = "$encodingprog" - --set fname = ${METAMAIL_TMPDIR}/metasend.$$ -+# Generate file name: -+if ( -x /bin/mktemp ) then -+ set fname=`/bin/mktemp ${METAMAIL_TMPDIR}/metasend.XXXXXXX` || exit 1 -+else if ( -x /usr/bin/mktemp ) then -+ set fname=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/metasend.XXXXXXX` || exit 1 -+else -+ set fname=${METAMAIL_TMPDIR}/metasend.$$ -+ rm -rf $fname -+endif - echo "MIME-Version: 1.0" > $fname - if ($?to) then - echo "To: " "$to" >> $fname -@@ -429,17 +437,26 @@ - echo " boundary="\"$boundary\" >> $fname - echo "" >> $fname - if ($?preamblefile) then -- cat $preamblefile >> $fname -+ cat "$preamblefile" >> $fname - else - echo "This is a multimedia message in MIME format. If you are reading this" >> $fname - echo "prefix, your mail reader does not understand MIME. You may wish" >> $fname - echo "to look into upgrading to a newer version of your mail reader." >> $fname - endif - set i=1 -- set junkfile=${METAMAIL_TMPDIR}/mmjunk.$$ -- while ($multipart >= $i) -+ -+ # Generate temporary file name: -+ if ( -x /bin/mktemp ) then -+ set junkfile=`/bin/mktemp ${METAMAIL_TMPDIR}/mmjunk.XXXXXXX` || exit 1 -+ else if ( -x /usr/bin/mktemp ) then -+ set junkfile=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/mmjunk.XXXXXXX` || exit 1 -+ else -+ set junkfile=${METAMAIL_TMPDIR}/mmjunk.$$ -+ rm -rf $junkfile -+ endif -+ while ("$multipart" >= $i) - echo "" >> $fname -- echo --$boundary >> $fname -+ echo --"$boundary" >> $fname - echo set isentity=\$isentity$i > $junkfile - source $junkfile - if (! $isentity) then -@@ -463,27 +480,27 @@ - end - rm $junkfile - echo "" >> $fname -- echo --${boundary}-- >> $fname -+ echo --"${boundary}"-- >> $fname - echo "" >> $fname - else - if (! $isentity) then - echo "Content-ID: $cid" >> $fname -- echo "Content-type: " $ctype >> $fname -- echo "Content-Description: " $cdescrip >> $fname -- echo "Content-Transfer-Encoding: " $encode >> $fname -+ echo "Content-type: " "$ctype" >> $fname -+ echo "Content-Description: " "$cdescrip" >> $fname -+ echo "Content-Transfer-Encoding: " "$encode" >> $fname - endif - echo "" >> $fname -- $encodingprog < $datafile >> $fname -+ $encodingprog < "$datafile" >> $fname - # Ensure last line has trailing carriage return - echo "" >> $fname - endif --if ($outputfile == "") then -- if ($batchmode == 0) echo -n "Delivering mail, please wait... " -- splitmail -s $splitsize -d $fname -+if ("$outputfile" == "") then -+ if ("$batchmode" == 0) echo -n "Delivering mail, please wait... " -+ splitmail -s "$splitsize" -d "$fname" - if (! $status) then -- if ($batchmode == 0) echo "Mail delivery apparently succeeded." -+ if ("$batchmode" == 0) echo "Mail delivery apparently succeeded." - rm $fname -- else if ($MustDelete == 1) then -+ else if ("$MustDelete" == 1) then - echo Mail delivery failed - rm $fname - exit -1 -@@ -492,7 +509,7 @@ - exit -1 - endif - else -- mv $fname $outputfile -+ mv $fname "$outputfile" - if ($status) exit -1 - endif - exit 0 -diff -d -r -u -P mm2.7.orig/src/bin/patch-metamail mm2.7/src/bin/patch-metamail ---- mm2.7.orig/src/bin/patch-metamail Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/patch-metamail Sat Jun 20 23:18:20 1998 -@@ -5,40 +5,53 @@ - set DIRNAME=pub/nsb - set PREFIX="mm.patch." - -+if (! $?METAMAIL_TMPDIR) then -+ set METAMAIL_TMPDIR=/tmp -+endif -+ - if ($#argv < 2 || $#argv > 5) then - echo Usage: patch-metamail source-tree-root patch-number [hostname [dirname [prefix]]] - exit -1 - endif - --set TREEROOT=$1 --set PATCHNUMBER=$2 --if ($#argv > 2) set HOSTNAME=$3 --if ($#argv > 3) set DIRNAME=$4 --if ($#argv > 4) set PREFIX=$5 -+set TREEROOT="$1" -+set PATCHNUMBER="$2" -+if ($#argv > 2) set HOSTNAME="$3" -+if ($#argv > 3) set DIRNAME="$4" -+if ($#argv > 4) set PREFIX="$5" - - echo WARNING: This program, if allowed to do so, will attempt to - echo install a PATCH file for your metamail sources which are rooted --echo in the directory $TREEROOT. -+echo in the directory "$TREEROOT". - echo "" - echo It will use a patch file that it retrieves via anonymous ftp --echo from the host $HOSTNAME, in the directory $DIRNAME, --echo with filenames starting with ${PREFIX}. -+echo from the host "$HOSTNAME", in the directory "$DIRNAME", -+echo with filenames starting with "${PREFIX}". - echo "" - echo -n "Do you want to install the patch in directory $TREEROOT [y/n] ? " - set ans=$< --if ($ans == "y" || $ans == "Y") then -- cd $TREEROOT -+if ("$ans" == "y" || "$ans" == "Y") then -+ cd "$TREEROOT" - set ident=`whoami`@`hostname` -- echo Using anonymous ftp with password $ident -- ftp -n < $TmpFtp -+ echo user anonymous "$ident" >> $TmpFtp -+ echo cd "$DIRNAME" >> $TmpFtp -+ echo binary >> $TmpFtp -+ echo get "${PREFIX}${PATCHNUMBER}" >> $TmpFtp -+ echo quit >> $TmpFtp -+ echo Using anonymous ftp with password "$ident" -+ ftp -n < $TmpFtp -+ rm -f $TmpFtp -+ patch -p < "${PREFIX}${PATCHNUMBER}" - else - echo Patch not installed - endif -diff -d -r -u -P mm2.7.orig/src/bin/rcvAppleSingle mm2.7/src/bin/rcvAppleSingle ---- mm2.7.orig/src/bin/rcvAppleSingle Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/rcvAppleSingle Sat Jun 20 14:08:30 1998 -@@ -13,7 +13,7 @@ - # Written by Patrik Faltstrom, paf@nada.kth.se, may 1993 - # - --FILENAME=$1 -+FILENAME="$1" - - # - # If $AFPDIR environment variable is set, all Macintosh filenames -@@ -31,12 +31,12 @@ - exit 1 - fi - --echo $NAME | grep '^/' > /dev/null -+echo "$NAME" | grep '^/' > /dev/null - if [ $? = 1 ]; then -- NAME=$AFPDIR/$NAME -+ NAME="$AFPDIR/$NAME" - fi - --cvt2cap $FILENAME $NAME -+cvt2cap "$FILENAME" "$NAME" - echo "Saved AppleMacintosh file as $NAME" - exit 0 - -diff -d -r -u -P mm2.7.orig/src/bin/showaudio mm2.7/src/bin/showaudio ---- mm2.7.orig/src/bin/showaudio Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/showaudio Sat Jun 20 15:01:55 1998 -@@ -33,7 +33,7 @@ - set ORG="Bellcore" - set STDINPUT=0 - if ("$1" == "-p") then -- set AUDIOPHONE=$2 -+ set AUDIOPHONE="$2" - shift - shift - endif -@@ -73,13 +73,13 @@ - echo "" - echo -n "Which do you prefer (1 or 2)? " - set ans=$< -- if ($ans == 2) then -+ if ("$ans" == 2) then - echo "OK, we'll use the telephone..." - set AUDIOPHONEFORCE=1 - echo "In the future, you can avoid this question by setting the environment variable" - echo "AUDIOPHONEFORCE to 1" - goto playphone -- else if ($ans == 1) then -+ else if ("$ans" == 1) then - echo "OK, Attempting to play the audio using your computer's speaker.." - set AUDIOSPEAKERFORCE=1 - echo "In the future, you can avoid this question by setting the environment variable" -@@ -93,8 +93,8 @@ - set audiohost=$thishost - if ($?DISPLAY) then - set audiohost=`echo $DISPLAY | sed -e 's/:.*//'` -- if ($audiohost == "unix") set audiohost=$thishost -- if ($audiohost == "") set audiohost=$thishost -+ if ("$audiohost" == "unix") set audiohost=$thishost -+ if ("$audiohost" == "") set audiohost=$thishost - endif - if ($?AUDIOHOST) then - set audiohost=$AUDIOHOST -@@ -127,9 +127,18 @@ - if ($#argv >= 1) then - exec /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end $* - else -- cat > ${METAMAIL_TMPDIR}/audio.$$ -- /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end ${METAMAIL_TMPDIR}/audio.$$ -- rm ${METAMAIL_TMPDIR}/audio.$$ -+ # Generate temporary file name: -+ if ( -x /bin/mktemp ) then -+ set TmpAudio=`/bin/mktemp ${METAMAIL_TMPDIR}/audio.XXXXXXX` || exit 1 -+ else if ( -x /usr/bin/mktemp ) then -+ set TmpAudio=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/audio.XXXXXXX` || exit 1 -+ else -+ set TmpAudio=${METAMAIL_TMPDIR}/audio.$$ -+ rm -rf $TmpAudio -+ endif -+ cat > $TmpAudio -+ /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end $TmpAudio -+ rm $TmpAudio - exit 0 - endif - else if (-d /usr/sony) then -@@ -198,7 +207,15 @@ - echo "" - if (! $?MM_NOTTTY) set MM_NOTTTY=0 - if ($MM_NOTTTY == 1) then -- set fname=/tmp/mm.aud.$$ -+ # Generate unique file name: -+ if ( -x /bin/mktemp ) then -+ set fname=`/bin/mktemp /tmp/mm.aud.XXXXXXX` || exit 1 -+ else if ( -x /usr/bin/mktemp ) then -+ set fname=`/usr/bin/mktemp /tmp/mm.aud.XXXXXXX` || exit 1 -+ else -+ set fname=/tmp/mm.aud.$$ -+ rm -rf $fname -+ endif - else - echo -n "Do you want to write the audio out to a file [y] ? " - set ANS=$< -@@ -206,7 +223,7 @@ - echo -n "File name:" - set fname=$< - endif --cp $1 $fname --if ($status == 0) echo Wrote raw audio file: $fname -+cp "$1" "$fname" -+if ($status == 0) echo Wrote raw audio file: "$fname" - exit 0 - -diff -d -r -u -P mm2.7.orig/src/bin/showexternal mm2.7/src/bin/showexternal ---- mm2.7.orig/src/bin/showexternal Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/showexternal Sat Jun 20 23:20:49 1998 -@@ -40,14 +40,14 @@ - endsw - set bodyfile="$1" - set atype=`echo $2 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` --set name=$3 -+set name="$3" - if ($#argv > 3) then - set site="$4" - else - set site="" - endif - if ($#argv > 4) then -- set dir=$5 -+ set dir="$5" - else - set dir="" - endif -@@ -62,10 +62,10 @@ - set server="" - endif - --if ("$server" == "" && $atype == "mail-server") then -+if ("$server" == "" && "$atype" == "mail-server") then - # Backward compatibility with some broken stuff -- set server=${name}@${site} -- echo WARNING -- old style mailserver syntax, using server $server -+ set server="${name}@${site}" -+ echo WARNING -- old style mailserver syntax, using server "$server" - endif - - set ctype="`grep -i content-type: $bodyfile | sed -e 's/............: //'`" -@@ -75,6 +75,10 @@ - set pass="" - set TMPDIR=${METAMAIL_TMPDIR}/XXXternal.$$ - mkdir $TMPDIR -+if ( $status != 0 ) then -+ echo Error creating temporary directory -+ exit 1 -+endif - pushd $TMPDIR - set NEWNAME="mm.ext.$$" - set NEEDSCONFIRMATION=1 -@@ -90,7 +94,16 @@ - echo automatically using the FTP protocol to a site on the network. - breaksw - case mail-server: -- cat > ${METAMAIL_TMPDIR}/ext.junk.$$ < $TmpExtJunk <> ${METAMAIL_TMPDIR}/ext.junk.$$ -- ${METAMAIL_PAGER} ${METAMAIL_TMPDIR}/ext.junk.$$ -- rm ${METAMAIL_TMPDIR}/ext.junk.$$ -+ echo Subject: Automated Mail Server Request >> $TmpExtJunk -+ echo To: "$server" >> $TmpExtJunk -+ echo "" >> $TmpExtJunk -+ sed -e 1,/^\$/d < $bodyfile >> $TmpExtJunk -+ ${METAMAIL_PAGER} $TmpExtJunk -+ rm $TmpExtJunk - breaksw - default: - # IGNORE ALL THE OTHERS -- AUTOMATIC FOR LOCAL-FILE, AFS. -@@ -157,17 +170,26 @@ - else - set MODECMD="type $mode" - endif -+ # Generate temporary file name: -+ if ( -x /bin/mktemp ) then -+ set TmpFtp=`/bin/mktemp ${METAMAIL_TMPDIR}/mm.ftp.XXXXXXX` || exit 1 -+ else if ( -x /usr/bin/mktemp ) then -+ set TmpFtp=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/mm.ftp.XXXXXXX` || exit 1 -+ else -+ set TmpFtp=${METAMAIL_TMPDIR}/mm.ftp.$$ -+ rm -rf $TmpFtp -+ endif -+ echo open "$site" > $TmpFtp -+ echo user "$username" "$pass" >> $TmpFtp -+ echo "$DIRCMD" >> $TmpFtp -+ echo "$MODECMD" >> $TmpFtp -+ echo get "$name" "$NEWNAME" >> $TmpFtp -+ echo quit >> $TmpFtp - echo OBTAINING MESSAGE BODY USING FTP -- echo SITE: $site USER $username -- $FTP -n < $NEWNAME -- echo To: ${server} >> $NEWNAME -- echo "" >> $NEWNAME -- sed -e 1,/^\$/d < $bodyfile >> $NEWNAME -- echo "" >> $NEWNAME -- /usr/lib/sendmail -t < $NEWNAME -+ echo Subject: Automated Mail Server Request > "$NEWNAME" -+ echo To: ${server} >> "$NEWNAME" -+ echo "" >> "$NEWNAME" -+ sed -e 1,/^\$/d < $bodyfile >> "$NEWNAME" -+ echo "" >> "$NEWNAME" -+ /usr/lib/sendmail -t < "$NEWNAME" - if ($status) then - echo sendmail failed - cd ${METAMAIL_TMPDIR} -@@ -206,7 +228,7 @@ - endif - cd ${METAMAIL_TMPDIR} - rm -rf $TMPDIR -- echo Your $ctype data has been requested from a mail server. -+ echo Your "$ctype" data has been requested from a mail server. - exit 0 - default: - echo UNRECOGNIZED ACCESS-TYPE -@@ -214,19 +236,19 @@ - rm -rf $TMPDIR - exit -1 - endsw --if ($cenc == base64) then -- mimencode -u -b < $NEWNAME > OUT -- mv OUT $NEWNAME --else if ($cenc == quoted-printable) then -- mimencode -u -q < $NEWNAME > OUT -- mv OUT $NEWNAME -+if ("$cenc" == base64) then -+ mimencode -u -b < "$NEWNAME" > OUT -+ mv OUT "$NEWNAME" -+else if ("$cenc" == quoted-printable) then -+ mimencode -u -q < "$NEWNAME" > OUT -+ mv OUT "$NEWNAME" - endif - - popd --if ($atype == "local-file") then -- metamail -p -b -c "$ctype" $NEWNAME -+if ("$atype" == "local-file") then -+ metamail -p -b -c "$ctype" "$NEWNAME" - else -- metamail -p -b -c "$ctype" $TMPDIR/$NEWNAME -+ metamail -p -b -c "$ctype" "$TMPDIR/$NEWNAME" - endif - - if ($status) then -@@ -236,14 +258,14 @@ - exit -1 - endif - --if ($NEWNAME != $name) then -+if ("$NEWNAME" != "$name") then - echo "" -- echo The data just displayed is stored in the file $TMPDIR/$NEWNAME -+ echo The data just displayed is stored in the file "$TMPDIR/$NEWNAME" - echo "Do you want to delete it?" -- rm -i $TMPDIR/$NEWNAME -+ rm -i "$TMPDIR/$NEWNAME" - endif - --if (! -e ${TMPDIR}/${NEWNAME}) then -+if (! -e "${TMPDIR}/${NEWNAME}") then - cd ${METAMAIL_TMPDIR} - rmdir $TMPDIR - endif -diff -d -r -u -P mm2.7.orig/src/bin/showpartial mm2.7/src/bin/showpartial ---- mm2.7.orig/src/bin/showpartial Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/showpartial Sat Jun 20 14:25:55 1998 -@@ -14,78 +14,84 @@ - set file="$1" - # This next line is because message-id can contain weird chars - set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` --@ partnum = $3 --if ($#argv == 3 || $4 == "") then -+@ partnum = "$3" -+if ($#argv == 3 || "$4" == "") then - set totalnum=-1 - else - @ totalnum = "$4" - endif - --if (! -d $TREEROOT) then -+if ( -d $TREEROOT) then -+ if (! -o $TREEROOT) then -+ echo Error: You do not own $TREEROOT -+ exit -1 -+ endif -+else - mkdir $TREEROOT - if ($status) then - echo mkdir $TREEROOT failed - exit -1 - endif - endif --if (! -d ${TREEROOT}/$id) then -- mkdir ${TREEROOT}/$id -+if (! -d "${TREEROOT}/$id") then -+ mkdir "${TREEROOT}/$id" - if ($status) then -- echo mkdir ${TREEROOT}/$id failed -+ echo mkdir "${TREEROOT}/$id" failed - exit -1 - endif - endif --cp $file ${TREEROOT}/$id/$partnum -+cp "$file" "${TREEROOT}/$id/$partnum" - if ($status) then -- echo cp $file ${TREEROOT}/$id/$partnum failed -+ echo cp "$file" "${TREEROOT}/$id/$partnum" failed - exit -1 - endif --if ($totalnum == -1) then -- if (-e ${TREEROOT}/$id/CT) then -- set totalnum=`cat ${TREEROOT}/$id/CT` -+if ("$totalnum" == -1) then -+ if (-e "${TREEROOT}/$id/CT") then -+ set totalnum=`cat "${TREEROOT}/$id/CT"` - else - set totalnum=-1 #GROSS HACK - endif - else -- echo $totalnum >! ${TREEROOT}/$id/CT -+ echo "$totalnum" >! "${TREEROOT}/$id/CT" - endif - # Slightly bogus here -- the shell messes up the newlines in the headers - # If you put $MM_HEADERS in quotes, it doesn't help. --# if ($partnum == 1) then --# echo $MM_HEADERS > ${TREEROOT}/$id/HDRS -+# Note that this could very well constitute a security risk... -+# if ("$partnum" == 1) then -+# echo $MM_HEADERS > "${TREEROOT}/$id/HDRS" - # endif - set found=0 - set ix=1 - set list="" --set limit=$totalnum --if ($limit == -1) set limit=25 --while ($ix <= $limit) -- if (-e ${TREEROOT}/$id/$ix) then -+set limit="$totalnum" -+if ("$limit" == -1) set limit=25 -+while ("$ix" <= "$limit") -+ if (-e "${TREEROOT}/$id/$ix") then - set list="$list $ix" - @ found ++ - endif - @ ix ++ - end --if ($found == $totalnum) then -- cd ${TREEROOT}/$id -- cat $list > ${TREEROOT}/$id/FULL -+if ("$found" == "$totalnum") then -+ cd "${TREEROOT}/$id" -+ cat "$list" > "${TREEROOT}/$id/FULL" - # cat ${TREEROOT}/$id/HDRS $list > ${TREEROOT}/$id/FULL -- rm $list -- echo All parts of this ${totalnum}-part message have now been read. -- metamail -d ${TREEROOT}/$id/FULL -+ rm "$list" -+ echo All parts of this "${totalnum}"-part message have now been read. -+ metamail -d "${TREEROOT}/$id/FULL" - echo WARNING: To save space, the full file is now being deleted. -- echo You will have to read all $totalnum parts again to see the full message again. -- rm ${TREEROOT}/$id/FULL -- rm ${TREEROOT}/$id/CT --# rm ${TREEROOT}/$id/HDRS -+ echo You will have to read all "$totalnum" parts again to see the full message again. -+ rm "${TREEROOT}/$id/FULL" -+ rm "${TREEROOT}/$id/CT" -+# rm "${TREEROOT}/$id/HDRS" - cd -- rmdir ${TREEROOT}/$id -- rmdir ${TREEROOT} >& /dev/null -+ rmdir "${TREEROOT}/$id" -+ rmdir "${TREEROOT}" >& /dev/null - else -- if (${totalnum} == -1) then -- echo So far you have only read $found of the several parts of this message. -+ if ("${totalnum}" == -1) then -+ echo So far you have only read "$found" of the several parts of this message. - else -- echo So far you have only read $found of the $totalnum parts of this message. -+ echo So far you have only read "$found" of the "$totalnum" parts of this message. - endif - echo When you have read them all, then you will see the message in full. - endif -diff -d -r -u -P mm2.7.orig/src/bin/showpicture mm2.7/src/bin/showpicture ---- mm2.7.orig/src/bin/showpicture Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/showpicture Sat Jun 20 14:27:26 1998 -@@ -23,7 +23,7 @@ - set X_VIEWER="xloadimage -view -quiet -geometry +1+1" - # set X_VIEWER="xv -geometry +1+1" - endif --if ($1 == "-viewer" && $#argv > 1) then -+if ("$1" == "-viewer" && $#argv > 1) then - set X_VIEWER = "$2" - shift - shift -@@ -40,7 +40,15 @@ - echo be able to see the picture properly. - echo "" - if ($MM_NOTTTY) then -- set fname=${METAMAIL_TMPDIR}/sp.$$ -+ # Generate file name: -+ if ( -x /bin/mktemp ) then -+ set fname=`/bin/mktemp ${METAMAIL_TMPDIR}/sp.XXXXXXX` || exit 1 -+ else if ( -x /usr/bin/mktemp ) then -+ set fname=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/sp.XXXXXXX` || exit 1 -+ else -+ set fname=${METAMAIL_TMPDIR}/sp.$$ -+ rm -rf $fname -+ endif - echo "The picture is being automatically stored in the file $fname" - echo "If you do not want this file, please delete it." - else -@@ -50,20 +58,28 @@ - while ( 1 == 1) - echo -n "File name:" - set fname=$< -- if (! -f $fname) then -+ if (! -f "$fname") then - break - else - echo "$fname already exists. Try again" - endif - end - endif -- cp $1 $fname -- if ($status == 0) echo Wrote file $fname -+ cp "$1" "$fname" -+ if ($status == 0) echo Wrote file "$fname" - exit 0 - endif - - if ($#argv == 0) then -- set SQUIRREL=${METAMAIL_TMPDIR}/sp.$$ -+ # Generate file name: -+ if ( -x /bin/mktemp ) then -+ set SQUIRREL=`/bin/mktemp ${METAMAIL_TMPDIR}/sp.XXXXXXX` || exit 1 -+ else if ( -x /usr/bin/mktemp ) then -+ set SQUIRREL=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/sp.XXXXXXX` || exit 1 -+ else -+ set SQUIRREL=${METAMAIL_TMPDIR}/sp.$$ -+ rm -rf $SQUIRREL -+ endif - cat > $SQUIRREL - else - set SQUIRREL="$*" -diff -d -r -u -P mm2.7.orig/src/bin/sun-audio-file mm2.7/src/bin/sun-audio-file ---- mm2.7.orig/src/bin/sun-audio-file Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/sun-audio-file Sat Jun 20 14:28:11 1998 -@@ -12,7 +12,7 @@ - exit 1 - endif - --uudecode -o $fn < $1 -+uudecode -o $fn < "$1" - - audiotool $fn --rm -f $fn $1 -+rm -f $fn "$1" -diff -d -r -u -P mm2.7.orig/src/bin/sun-message.csh mm2.7/src/bin/sun-message.csh ---- mm2.7.orig/src/bin/sun-message.csh Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/sun-message.csh Sat Jun 20 14:29:41 1998 -@@ -8,6 +8,10 @@ - # $2 is untrustworthy data. Quote it. - # - mkdir /tmp/decode.$$ -+if ( $status != 0 ) then -+ echo "Error: cannot create temporary directory" -+ exit 1 -+endif - cd /tmp/decode.$$ - - if (! $?METAMAIL_PAGER) then -@@ -21,7 +25,7 @@ - exit 1 - endif - -- uudecode -o $fn $1 -+ uudecode -o $fn "$1" - - echo "The following file was uudecoded:" - echo "" -@@ -40,21 +44,21 @@ - echo -n "Which do you prefer (1 - 3)? [$defans] " - - set ans = $< -- if (x$ans == x) then -+ if ("x$ans" == x) then - set ans = $defans - endif -- if ($ans == 3) then -- rm $1 -+ if ("$ans" == 3) then -+ rm "$1" - cd /tmp; /bin/rm -rf /tmp/decode.$$ - exit 0 -- else if ($ans == 1) then -+ else if ("$ans" == 1) then - ${METAMAIL_PAGER} $fn -- else if ($ans == 2) then -+ else if ("$ans" == 2) then - set nfn = "" - echo -n "Save as: $HOME/" - set nfn = $< -- if (x$nfn != x) then -- /bin/cp $fn ${HOME}/$nfn -+ if ("x$nfn" != x) then -+ /bin/cp $fn "${HOME}/$nfn" - else - echo "Not Saved." - endif -@@ -64,7 +68,7 @@ - set defans = "3" - end - else -- ${METAMAIL_PAGER} $1 -+ ${METAMAIL_PAGER} "$1" - endif - - -diff -d -r -u -P mm2.7.orig/src/bin/sun-to-mime mm2.7/src/bin/sun-to-mime ---- mm2.7.orig/src/bin/sun-to-mime Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/sun-to-mime Sat Jun 20 14:31:12 1998 -@@ -8,10 +8,19 @@ - set METAMAIL_TMPDIR=/tmp - endif - --set TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ -+# Generate temporary file name: -+if ( -x /bin/mktemp ) then -+ set TMPFILE=`/bin/mktemp ${METAMAIL_TMPDIR}/suntomime.XXXXXXX` || exit 1 -+else if ( -x /usr/bin/mktemp ) then -+ set TMPFILE=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/suntomime.XXXXXXX` || exit 1 -+else -+ set TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ -+ rm -rf $TMPFILE -+endif -+ - echo "Content-type: multipart/mixed; boundary=--------" > $TMPFILE - echo "" >> $TMPFILE --sed -e 's/X-Sun-Data-Type:/Content-type:/' >> $TMPFILE < $1 -+sed -e 's/X-Sun-Data-Type:/Content-type:/' >> $TMPFILE < "$1" - echo "------------" >> $TMPFILE - #metamail -d -z $TMPFILE - metamail -z $TMPFILE -diff -d -r -u -P mm2.7.orig/src/bin/sun2mime mm2.7/src/bin/sun2mime ---- mm2.7.orig/src/bin/sun2mime Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/bin/sun2mime Sat Jun 20 14:31:40 1998 -@@ -9,7 +9,16 @@ - if [ x$METAMAIL_TMPDIR = x ]; then - METAMAIL_TMPDIR=/tmp - fi --TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ -+ -+# Generate temporary file name: -+if [ -x /bin/mktemp ] ; then -+ TMPFILE=`/bin/mktemp ${METAMAIL_TMPDIR}/suntomime.XXXXXXX` || exit 1 -+elif [ -x /usr/bin/mktemp ] ; then -+ TMPFILE=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/suntomime.XXXXXXX` || exit 1 -+else -+ TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ -+ rm -rf $TMPFILE -+fi - - /bin/nawk ' - BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") -@@ -36,7 +45,7 @@ - print - } - END { printf("----------\n") } --' $1 > $TMPFILE -+' "$1" > $TMPFILE - - metamail -z $TMPFILE - rm -f $TMPFILE -diff -d -r -u -P mm2.7.orig/src/metamail/mailto.c mm2.7/src/metamail/mailto.c ---- mm2.7.orig/src/metamail/mailto.c Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/metamail/mailto.c Sat Jun 20 16:57:20 1998 -@@ -61,6 +61,7 @@ - #endif - - extern char *malloc(), *realloc(), *index(), *getmyname(); -+extern FILE *Fopen(); - struct mailpart *CreateNewPart(); - - /* The main data structure for the multiple parts of the mail */ -@@ -208,7 +209,7 @@ - pager = getenv("PAGER"); - - strcpy(TmpName, tmpname()); -- fp = fopen(TmpName, "w"); -+ fp = Fopen(TmpName, "w"); - if (!fp) fp = stdout; - fprintf(fp, "The following tilde escapes are BSD-mail-compatible:\n"); - fprintf(fp, "~? Show help on tilde escapes\n"); -@@ -594,7 +595,7 @@ - } - FirstPart = NewPart(); - CurrentPart = FirstPart; -- fpout = fopen(CurrentPart->filename, "w"); -+ fpout = Fopen(CurrentPart->filename, "w"); - if (!fpout) { - fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); - cleanexit(-1); -@@ -681,7 +682,7 @@ - CurrentPart->next = NewPart(); - CurrentPart->next->prev = CurrentPart; - CurrentPart = CurrentPart->next; -- fpout = fopen(CurrentPart->filename, "w"); -+ fpout = Fopen(CurrentPart->filename, "w"); - if (!fpout) { - fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); - cleanexit(-1); -@@ -720,7 +721,7 @@ - CurrentPart = CurrentPart->next; - CurrentPart->istext = 0; - CurrentPart->content_type = "message/rfc822"; -- fpout = fopen(CurrentPart->filename, "w"); -+ fpout = Fopen(CurrentPart->filename, "w"); - if (!fpout) { - fprintf(stderr, "mailto: Cannot open temporary file %s\n", CurrentPart->filename); - break; -@@ -732,7 +733,7 @@ - CurrentPart->next = NewPart(); - CurrentPart->next->prev = CurrentPart; - CurrentPart = CurrentPart->next; -- fpout = fopen(CurrentPart->filename, "w"); -+ fpout = Fopen(CurrentPart->filename, "w"); - if (!fpout) { - fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); - cleanexit(-1); -@@ -811,11 +812,11 @@ - char Cmd[TMPFILE_NAME_SIZE + 15]; - char *s=tmpname(); - fclose(fpout); -- fptmp = fopen(s, "w"); -+ fptmp = Fopen(s, "w"); - WriteOutMessage(fptmp, ToList, Subject, CCList, FirstPart); - TempCloseStyles(fptmp); - fclose(fptmp); -- fpout = fopen(CurrentPart->filename, "a"); -+ fpout = Fopen(CurrentPart->filename, "a"); - if (!fpout) { - fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); - cleanexit(-1); -@@ -899,7 +900,7 @@ - char *fname; - fclose(fpout); - fname = start; -- fptmp = fopen(fname, "w"); -+ fptmp = Fopen(fname, "w"); - WriteOutMessage(fptmp, ToList, Subject, CCList, FirstPart); - TempCloseStyles(fptmp); - if(fclose(fptmp)) { -@@ -907,7 +908,7 @@ - } else { - printf("Wrote draft to %s\n", fname); - } -- fpout = fopen(CurrentPart->filename, "a"); -+ fpout = Fopen(CurrentPart->filename, "a"); - if (!fpout) { - fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); - cleanexit(-1); -@@ -972,7 +973,7 @@ - CurrentPart = CurrentPart->next; - CurrentPart->istext = 0; - CurrentPart->content_type = "message/rfc822"; -- fpout = fopen(CurrentPart->filename, "w"); -+ fpout = Fopen(CurrentPart->filename, "w"); - if (!fpout) { - fprintf(stderr, "mailto: Cannot open temporary file %s\n", CurrentPart->filename); - break; -@@ -994,7 +995,7 @@ - CurrentPart->next = NewPart(); - CurrentPart->next->prev = CurrentPart; - CurrentPart = CurrentPart->next; -- fpout = fopen(CurrentPart->filename, "w"); -+ fpout = Fopen(CurrentPart->filename, "w"); - if (!fpout) { - fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); - cleanexit(-1); -@@ -1476,7 +1477,7 @@ - char DeadFile[1000]; - - sprintf(DeadFile, "%s/dead.letter", gethome()); -- fp = fopen(DeadFile, "w"); -+ fp = Fopen(DeadFile, "w"); - WriteOutMessage(fp, ToList, Subject, CCList, FirstPart); - if(fclose(fp)) { - perror("Could not write ~/dead.letter\n"); -@@ -1776,7 +1777,7 @@ - printf("Cannot read %s, data insertion cancelled\n", sdum); - return(NULL); - } -- fpo = fopen(mp->filename, "w"); -+ fpo = Fopen(mp->filename, "w"); - if (!fpo) { - printf("Cannot open temporary file, data insertion cancelled\n"); - return(NULL); -@@ -1794,7 +1795,7 @@ - int ct; - printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); - fflush(stdout); -- gets(LineBuf); -+ fgets(LineBuf, sizeof(LineBuf), stdin); - if (index(LineBuf, '/')) { - char lc[100], *s, AnsBuf[100]; - strcpy(lc, LineBuf); -@@ -1812,7 +1813,7 @@ - } - if (mc) break; - printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); -- s = gets(AnsBuf); -+ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - while (s && *s && isspace((unsigned char) *s)) ++s; - if (s && (*s == 'y' || *s == 'Y')) break; - continue; -@@ -1939,7 +1940,7 @@ - mp->encoding_type_needed = ENC_NONE; - } - newfilename = tmpname(); -- fpout = fopen(newfilename, "w"); -+ fpout = Fopen(newfilename, "w"); - if (!fpout) { - fprintf(stderr, "Cannot open file %s for writing, no data included.\n", newfilename); - free(CmdBuf); -@@ -2109,7 +2110,7 @@ - ContainsEightBitChar(FirstPart->filename)) { - FirstPart->encoding_type_needed = ENC_QP; - } -- fpout = fopen(FirstPart->filename, "a"); -+ fpout = Fopen(FirstPart->filename, "a"); - free(CmdBuf); - free(CmdBuf2); - return; -@@ -2159,7 +2160,7 @@ - lastmp = mp; - mp = mp->next; - } -- fpout = fopen(lastmp->filename, "a"); -+ fpout = Fopen(lastmp->filename, "a"); - free(CmdBuf); - free(CmdBuf2); - } -diff -d -r -u -P mm2.7.orig/src/metamail/metamail.c mm2.7/src/metamail/metamail.c ---- mm2.7.orig/src/metamail/metamail.c Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/metamail/metamail.c Sat Jun 20 16:54:29 1998 -@@ -112,6 +112,7 @@ - - char *FindParam(); - extern FILE *popen(); -+extern FILE *Fopen(); - static char *nomem = "Out of memory!"; - static char *mmversion = MM_VERSTRING; - static char *NoAskDefault = "text,text/plain,text/richtext"; -@@ -580,7 +581,7 @@ - int overwriteans = -1; - do { - printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); -- s = gets(AnsBuf); -+ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - if (!s) { - overwriteans = 0; - } else { -@@ -646,7 +647,7 @@ - if (Fname[0] == 0 || Fname[0] == '\n') { - ConsumeRestOfPart(NULL); - } else { -- fp = fopen(Fname, WRITE_BINARY); -+ fp = Fopen(Fname, WRITE_BINARY); - if (!fp) ExitWithError("Cannot open temporary file"); - TranslateInputToOutput(InputFP, fp, EncodingCode, ContentType); - ecode = fclose(fp); -@@ -961,7 +962,7 @@ - /* Create it, ugh. Also needs to affect later command. */ - MkTmpFileName(TmpName); - DeleteSourceFileWhenDone = 1; -- fptmp = fopen(TmpName, WRITE_BINARY); -+ fptmp = Fopen(TmpName, WRITE_BINARY); - if (!fptmp) ExitWithError("Can't open temporary file\n"); - while (fgets(LineBuf, LINE_BUF_SIZE, stdin)) { - fputs(LineBuf, fptmp); -@@ -1195,7 +1196,7 @@ - { - int j; - FILE *outfp; -- outfp = fopen(SquirrelFile, WRITE_BINARY); -+ outfp = Fopen(SquirrelFile, WRITE_BINARY); - if (!outfp) { - fprintf(stderr, "Cannot open %s to squirrel away a portion of a multipart/alternative\n", SquirrelFile); - return(-1); -@@ -1799,7 +1800,7 @@ - nameBuf[(cp - def) + 4] = 0; - cp++; /* Now points to value part of environment string. */ - -- if ((envFile = fopen(nameBuf, "w")) == NULL) { -+ if ((envFile = Fopen(nameBuf, "w")) == NULL) { - return(2); - } - -@@ -1824,7 +1825,7 @@ - } else { - printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); - } -- s = gets(AnsBuf); -+ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - if (!s) return(0); /* EOF */ - while (s && *s && isspace((unsigned char) *s)) ++s; - if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); -@@ -2037,7 +2038,7 @@ - } else { - /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ - MkTmpFileName(TmpFile); -- fp = fopen(TmpFile, WRITE_BINARY); -+ fp = Fopen(TmpFile, WRITE_BINARY); - if (!fp) { - fprintf(stderr, "Could not open temporary file\n"); - } else { -@@ -2192,7 +2193,7 @@ - strcpy(thispart->fname, TmpFileNameBuf); - WriteTmpFile(thispart->fname, thispart->ctype); - strcat(TmpFileNameBuf, "H"); -- headfp = fopen(TmpFileNameBuf, "w"); -+ headfp = Fopen(TmpFileNameBuf, "w"); - if (headfp) { - fputs(mailheaders+12, headfp); - /* The +12 gets rid of MM_HEADERS=\n */ -@@ -2298,7 +2299,7 @@ - FILE *fpout; - int retval = 0; - -- fpout = fopen(fname, WRITE_BINARY); -+ fpout = Fopen(fname, WRITE_BINARY); - if (!fpout) { - perror("WriteTmpFile"); - ExitWithError("Can't create temporary file"); -@@ -2519,7 +2520,7 @@ - FILE *script; - - MkTmpFileName(nameBuf); -- if ((script = fopen(nameBuf, "w")) == NULL) { -+ if ((script = Fopen(nameBuf, "w")) == NULL) { - fprintf(stderr, "Unable to open %s for writing\n", nameBuf); - exit(1); - } -diff -d -r -u -P mm2.7.orig/src/metamail/shared.c mm2.7/src/metamail/shared.c ---- mm2.7.orig/src/metamail/shared.c Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/metamail/shared.c Sat Jun 20 16:51:54 1998 -@@ -1,6 +1,11 @@ - #include - #include - #include -+#include -+#include -+#include -+#include -+#include - #ifdef SYSV - #include - #include -@@ -116,5 +121,55 @@ - initialized = 1; - } - return(hostname); -+} -+ -+ -+/* This fopen wrapper function is designed to avoid /tmp-file race -+ * conditions where a temporary filename is created and somebody -+ * throws a link in your way before the fopen(...,"w"). This -+ * would only happen if another user on the system were actively -+ * trying to trick you into destroying files. -+ * Sorry, but "a" mode is not really handled any safer than fopen, -+ * since I really have no criterium for deciding what files are -+ * OK to write to. */ -+FILE *Fopen(Fopen_path,Fopen_mode) -+char *Fopen_path; char *Fopen_mode; -+{ -+#ifdef MSDOS -+return(fopen(Fopen_path,Fopen_mode)); -+#else -+int Fopen_fd; -+struct stat Fopen_sb; -+int Fopen_appendmode = 0; -+int Fopen_readmode = 0; -+int Fopen_openflags = 0; -+int Fopen_r; -+if ( strchr(Fopen_mode,'r') != (char *)0 ) return(fopen(Fopen_path,Fopen_mode)); -+if ( strchr(Fopen_mode,'a') != (char *)0 ) Fopen_appendmode = 1; -+if ( strchr(Fopen_mode,'+') != (char *)0 ) Fopen_readmode = 1; -+if ( ( Fopen_appendmode && (strchr(Fopen_mode,'w') != (char *)0) ) || -+ ( (! Fopen_appendmode) && (strchr(Fopen_mode,'w') == (char *)0) ) ) -+ { -+ errno = EINVAL ; -+ return( (FILE *)0 ); -+ } -+if ( Fopen_appendmode ) -+ { -+ /* If "a" and file exists, pass it to the real fopen() */ -+ Fopen_r = stat(Fopen_path,&Fopen_sb) ; -+ if ( (Fopen_r != -1) || (errno != ENOENT) ) -+ return( fopen(Fopen_path,Fopen_mode) ); -+ } -+if ( Fopen_readmode ) -+ Fopen_openflags = O_RDWR|O_CREAT|O_EXCL ; -+else -+ Fopen_openflags = O_WRONLY|O_CREAT|O_EXCL ; -+if ( Fopen_appendmode ) Fopen_openflags |= O_APPEND ; -+remove( Fopen_path ); -+/* 0666? We'd better hope their umask is safe... */ -+Fopen_fd = open(Fopen_path,Fopen_openflags,0666); -+if ( Fopen_fd > -1 ) return( fdopen(Fopen_fd,Fopen_mode) ); -+return( (FILE *)0 ); -+#endif - } - -diff -d -r -u -P mm2.7.orig/src/metamail/splitmail.c mm2.7/src/metamail/splitmail.c ---- mm2.7.orig/src/metamail/splitmail.c Mon Jun 15 00:30:47 1998 -+++ mm2.7/src/metamail/splitmail.c Sat Jun 20 15:57:02 1998 -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - - #define MINCHUNKSIZE 20000 /* Better be enough to hold the headers, or we die! */ - extern char *malloc(), *index(), *getmyname(); -@@ -243,6 +244,7 @@ - char *deliverycmd, *prefix, *SharedHeaders, *SubjectBuf, *id, *MessageID, *bigbuf, *OrigID; - { - FILE *fpout; -+ int fd; - char OutputFile[1000]; - int code; - #if defined(sequent) -@@ -255,7 +257,11 @@ - fpout = popen(deliverycmd, "w"); - } else { - sprintf(OutputFile, "%s%d", prefix, whichpart); -- fpout = fopen(OutputFile, "w"); -+ /* fpout = fopen(OutputFile, "w"); */ -+ remove(OutputFile); -+ fpout = NULL; -+ fd = open(OutputFile, O_WRONLY|O_CREAT|O_EXCL, 0600); -+ if ( fd > -1 ) fpout = fdopen(fd, "w"); - } - if (!fpout) { - fprintf(stderr, "splitmail: Can't open %s for writing\n", DoDeliver ? deliverycmd : OutputFile); diff --git a/mail/metamail/35_mm-2.7-arghhh.patch b/mail/metamail/35_mm-2.7-arghhh.patch deleted file mode 100644 index 480a82fae..000000000 --- a/mail/metamail/35_mm-2.7-arghhh.patch +++ /dev/null @@ -1,28 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/35_mm-2.7-arghhh.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/bin/showexternal~ Mon Jun 22 10:55:36 1998 -+++ mm2.7/src/bin/showexternal Tue Jun 23 21:16:04 1998 -@@ -215,7 +215,7 @@ - exit -1 - endif - echo Subject: Automated Mail Server Request > "$NEWNAME" -- echo To: ${server} >> "$NEWNAME" -+ echo To: "$server" >> "$NEWNAME" - echo "" >> "$NEWNAME" - sed -e 1,/^\$/d < $bodyfile >> "$NEWNAME" - echo "" >> "$NEWNAME" diff --git a/mail/metamail/40_mm-2.7-sml.patch b/mail/metamail/40_mm-2.7-sml.patch deleted file mode 100644 index 57edd2480..000000000 --- a/mail/metamail/40_mm-2.7-sml.patch +++ /dev/null @@ -1,99 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/40_mm-2.7-sml.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/metamail/splitmail.c.sml Fri Jul 30 15:52:01 1999 -+++ mm2.7/src/metamail/splitmail.c Fri Jul 30 15:52:14 1999 -@@ -42,8 +42,8 @@ - #define VERBOSEDELIVERYCMD VerboseDeliveryCmd - #else - extern char *getenv(); --#define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" --#define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" -+#define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -oi" -+#define VERBOSEDELIVERYCMD "/usr/sbin/sendmail -t -v -oi" - #endif - - usageexit() { ---- mm2.7/src/bin/audiosend.sml Fri Jul 30 15:49:33 1999 -+++ mm2.7/src/bin/audiosend Fri Jul 30 15:49:44 1999 -@@ -110,7 +110,7 @@ - switch ("$which") - case 1: - echo -n "Sending mail, please wait... " -- /usr/lib/sendmail "$to" "$cc" < $fname -+ /usr/sbin/sendmail "$to" "$cc" < $fname - if (! $status) then - echo "Done." - rm $fname ---- mm2.7/src/bin/mailserver.sml Fri Jul 30 15:50:19 1999 -+++ mm2.7/src/bin/mailserver Fri Jul 30 15:50:36 1999 -@@ -76,7 +76,7 @@ - probably run in some circumstance other than mail delivery. - -------------------- - ! -- cat $TmpFile - | /usr/lib/sendmail "$MAINTAINER" -+ cat $TmpFile - | /usr/sbin/sendmail "$MAINTAINER" - # Takes the rest of the message from standard input - rm $TmpFile - exit 0 -@@ -94,7 +94,7 @@ - - The file you requested, if it exists, will not be sent to you. - ! -- /usr/lib/sendmail -t < $TmpFile -+ /usr/sbin/sendmail -t < $TmpFile - rm $TmpFile - exit 0 - endif -@@ -116,7 +116,7 @@ - echo "--------------------------------" >> $TmpFile - ls -R >> $TmpFile - echo "" >> $TmpFile -- /usr/lib/sendmail -t < $TmpFile -+ /usr/sbin/sendmail -t < $TmpFile - rm $TmpFile - exit 0 - endif -@@ -144,7 +144,7 @@ - echo "Command failed:" >> $TmpFile - echo " metasend -b -t $FromName -f $Subject -m $ct -s Re: $Subject" >> $TmpFile - echo "" >> $TmpFile -- /usr/lib/sendmail -t < $TmpFile -+ /usr/sbin/sendmail -t < $TmpFile - rm $TmpFile - exit 0 - endif -@@ -157,7 +157,7 @@ - echo The file: "$Subject" >> $TmpFile - echo was sent to: "$FromName" >> $TmpFile - echo "" >> $TmpFile -- /usr/lib/sendmail -t < $TmpFile -+ /usr/sbin/sendmail -t < $TmpFile - endif - - rm -f $TmpFile ---- mm2.7/src/man/mailto.1.sml Fri Jul 30 15:51:30 1999 -+++ mm2.7/src/man/mailto.1 Fri Jul 30 15:51:37 1999 -@@ -230,7 +230,7 @@ - dot -- controls whether or not a period alone on a line - should be interpreted as terminating your mail - ignore -- controls whether or not interrupts are ignored -- verbose -- controls the verbosity of output from /usr/lib/sendmail -+ verbose -- controls the verbosity of output from /usr/sbin/sendmail - quiet -- controls the verbosity of output from the mailto program. - keepblind -- controls whether or not a 'blind' copy of the mail is kept. - commasonly -- controls whether or not a space character diff --git a/mail/metamail/45_metamail-2.7-nl.patch b/mail/metamail/45_metamail-2.7-nl.patch deleted file mode 100644 index 55100f76b..000000000 --- a/mail/metamail/45_metamail-2.7-nl.patch +++ /dev/null @@ -1,28 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/45_metamail-2.7-nl.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/metamail/mailto.c~ Thu Sep 9 01:24:39 1999 -+++ mm2.7/src/metamail/mailto.c Thu Sep 9 01:28:07 1999 -@@ -1796,6 +1796,8 @@ - printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); - fflush(stdout); - fgets(LineBuf, sizeof(LineBuf), stdin); -+ if (LineBuf[strlen(LineBuf)-1] == '\n') -+ LineBuf[strlen(LineBuf)-1] = '\0'; - if (index(LineBuf, '/')) { - char lc[100], *s, AnsBuf[100]; - strcpy(lc, LineBuf); diff --git a/mail/metamail/50_mm-2.7-linux.patch b/mail/metamail/50_mm-2.7-linux.patch deleted file mode 100644 index ca1810807..000000000 --- a/mail/metamail/50_mm-2.7-linux.patch +++ /dev/null @@ -1,34 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/50_mm-2.7-linux.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/config.h.linux Sun Jun 18 21:59:38 2000 -+++ mm2.7/src/config.h Sun Jun 18 21:59:10 2000 -@@ -100,9 +100,11 @@ - #endif - - #ifdef SYSV --#define killpg(a, b) kill(-(a), (b)) --#define bcopy(a, b, c) memcpy(b, a, c) --#define bzero(a, b) memset(a, 0, b) -+#ifndef linux -+# define killpg(a, b) kill(-(a), (b)) -+# define bcopy(a, b, c) memcpy(b, a, c) -+# define bzero(a, b) memset(a, 0, b) -+#endif - #define bcmp memcmp - #define index strchr - #define rindex strrchr diff --git a/mail/metamail/55_metamail-2.7-fixpartial.patch b/mail/metamail/55_metamail-2.7-fixpartial.patch deleted file mode 100644 index 0315d1fd8..000000000 --- a/mail/metamail/55_metamail-2.7-fixpartial.patch +++ /dev/null @@ -1,40 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/55_metamail-2.7-fixpartial.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/bin/showpartial.fixpartial Thu Feb 1 12:20:37 2001 -+++ mm2.7/src/bin/showpartial Thu Feb 1 12:21:29 2001 -@@ -13,7 +13,7 @@ - endif - set file="$1" - # This next line is because message-id can contain weird chars --set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` -+set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\\\` - @ partnum = "$3" - if ($#argv == 3 || "$4" == "") then - set totalnum=-1 -@@ -74,9 +74,9 @@ - end - if ("$found" == "$totalnum") then - cd "${TREEROOT}/$id" -- cat "$list" > "${TREEROOT}/$id/FULL" -+ cat $list > "${TREEROOT}/$id/FULL" - # cat ${TREEROOT}/$id/HDRS $list > ${TREEROOT}/$id/FULL -- rm "$list" -+ rm $list - echo All parts of this "${totalnum}"-part message have now been read. - metamail -d "${TREEROOT}/$id/FULL" - echo WARNING: To save space, the full file is now being deleted. diff --git a/mail/metamail/60_metamail-2.7-fixawk.patch b/mail/metamail/60_metamail-2.7-fixawk.patch deleted file mode 100644 index 62b387e60..000000000 --- a/mail/metamail/60_metamail-2.7-fixawk.patch +++ /dev/null @@ -1,28 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/60_metamail-2.7-fixawk.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/bin/sun2mime.fixawk Thu Feb 1 12:28:33 2001 -+++ mm2.7/src/bin/sun2mime Thu Feb 1 12:28:55 2001 -@@ -20,7 +20,7 @@ - rm -rf $TMPFILE - fi - --/bin/nawk ' -+/bin/gawk ' - BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") - RS=""; FS="\n"; mode="HEADER" } - mode == "HEADER" { diff --git a/mail/metamail/65_metamail-2.7-usesox.patch b/mail/metamail/65_metamail-2.7-usesox.patch deleted file mode 100644 index 88fd34c96..000000000 --- a/mail/metamail/65_metamail-2.7-usesox.patch +++ /dev/null @@ -1,29 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/65_metamail-2.7-usesox.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- mm2.7/src/bin/showaudio.usesox Thu Feb 1 12:31:32 2001 -+++ mm2.7/src/bin/showaudio Thu Feb 1 12:36:24 2001 -@@ -151,6 +151,9 @@ - # Solaris 2.0 - /bin/audioconvert -i raw,voice -f sun $* | /bin/audioplay - exit $status -+else if (-e /usr/bin/play) then -+# Red Hat Linux -+ exec /usr/bin/play $* - else - set dev=/dev/audio - endif diff --git a/mail/metamail/70_mm-2.7-sendmail.patch b/mail/metamail/70_mm-2.7-sendmail.patch deleted file mode 100644 index b1303360b..000000000 --- a/mail/metamail/70_mm-2.7-sendmail.patch +++ /dev/null @@ -1,29 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/70_mm-2.7-sendmail.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -diff -Nur mm2.7.orig/src/bin/showexternal mm2.7/src/bin/showexternal ---- mm2.7.orig/src/bin/showexternal 2003-05-14 23:58:27.000000000 +0200 -+++ mm2.7/src/bin/showexternal 2003-05-14 23:59:21.000000000 +0200 -@@ -219,7 +219,7 @@ - echo "" >> "$NEWNAME" - sed -e 1,/^\$/d < $bodyfile >> "$NEWNAME" - echo "" >> "$NEWNAME" -- /usr/lib/sendmail -t < "$NEWNAME" -+ /usr/sbin/sendmail -t < "$NEWNAME" - if ($status) then - echo sendmail failed - cd ${METAMAIL_TMPDIR} diff --git a/mail/metamail/80_mm-2.7-strip.patch b/mail/metamail/80_mm-2.7-strip.patch deleted file mode 100644 index 655878aec..000000000 --- a/mail/metamail/80_mm-2.7-strip.patch +++ /dev/null @@ -1,29 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/80_mm-2.7-strip.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -diff -Nur mm2.7.orig/src/Makefile mm2.7/src/Makefile ---- mm2.7.orig/src/Makefile 2003-05-15 00:11:18.000000000 +0200 -+++ mm2.7/src/Makefile 2003-05-15 00:19:21.000000000 +0200 -@@ -72,7 +72,7 @@ - # install -s -c $(LOCALBINDIR) $$file - # - #INSTALL = cp --INSTALL = install -c -s -+INSTALL = install -c - - # Root of installation tree - INSTROOT = /usr diff --git a/mail/metamail/85_mm-2.7-rm.patch b/mail/metamail/85_mm-2.7-rm.patch deleted file mode 100644 index 3b6175414..000000000 --- a/mail/metamail/85_mm-2.7-rm.patch +++ /dev/null @@ -1,29 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/85_mm-2.7-rm.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -diff -Nur mm2.7.orig/src/Makefile mm2.7/src/Makefile ---- mm2.7.orig/src/Makefile 2003-05-15 00:19:21.000000000 +0200 -+++ mm2.7/src/Makefile 2003-05-15 00:21:59.000000000 +0200 -@@ -15,7 +15,7 @@ - # System V users may change the following to remove the "-s" and all will still work. - LN = ln -s - --RM = rm -+RM = rm -f - # To shut rm up on SGI machines (where symlinks have mode 0000) - # RM = rm -f - diff --git a/mail/metamail/90_mm-2.7-malloc.patch b/mail/metamail/90_mm-2.7-malloc.patch deleted file mode 100644 index be7e4da1e..000000000 --- a/mail/metamail/90_mm-2.7-malloc.patch +++ /dev/null @@ -1,26 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/90_mm-2.7-malloc.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- ---- mm2.7.orig/src/metamail/shared.c 2005-03-26 21:59:06.116190632 +0100 -+++ mm2.7/src/metamail/shared.c 2005-03-26 22:08:01.887740976 +0100 -@@ -11,7 +11,7 @@ - #include - #endif - --extern char *malloc(); -+extern void *malloc(); - char **Exceptions; - int *NeedsPortableNewlines; - int ExceptionsAlloced = 0, ExceptionsUsed = 0; diff --git a/mail/metamail/95_mm-2.7-gcc-4.0.patch b/mail/metamail/95_mm-2.7-gcc-4.0.patch deleted file mode 100644 index 600ea77f6..000000000 --- a/mail/metamail/95_mm-2.7-gcc-4.0.patch +++ /dev/null @@ -1,26 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../metamail/95_mm-2.7-gcc-4.0.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- ---- mm2.7_orig/src/richmail/richtext.c 1994-02-09 17:31:18.000000000 +0100 -+++ mm2.7/src/richmail/richtext.c 2005-09-11 22:36:19.000000000 +0200 -@@ -79,7 +79,7 @@ - extern tputs(); - #endif - --static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), fputsmovingright(), ResetTerminalCodes(), FinalizeTerminal(), outputstr(), FPUTS(); -+static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), fputsmovingright(), ResetTerminalCodes(), FinalizeTerminal(), outputstr(), FPUTS(), lc2strcmp(); - - #define OUTC(c) (outputc((RCHAR)(c))) - diff --git a/mail/metamail/metamail.conf b/mail/metamail/metamail.conf index 9ae3fd977..26463b941 100644 --- a/mail/metamail/metamail.conf +++ b/mail/metamail/metamail.conf @@ -2,6 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../metamail/metamail.conf +# Copyright (C) 2011 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf # @@ -13,7 +14,13 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- -hook_add preconf 5 "cd src" -makeopt="basics" -makeinstopt="install-all" +# saving our local patches and empty the patchfiles variable +localpatches=$patchfiles +patchfiles= + +# apply the debian patchset +var_append patchfiles ' ' "$( match_source_file -p $pkg_$ver.diff )" + +# append our local patches +var_append patchfiles " " "$localpatches" diff --git a/mail/metamail/metamail.desc b/mail/metamail/metamail.desc index c7cb5ccbe..39fb12494 100644 --- a/mail/metamail/metamail.desc +++ b/mail/metamail/metamail.desc @@ -3,7 +3,7 @@ [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. [COPY] [COPY] Filename: package/.../metamail/metamail.desc -[COPY] Copyright (C) 2006 The OpenSDE Project +[COPY] Copyright (C) 2006 - 2011 The OpenSDE Project [COPY] Copyright (C) 2004 - 2006 The T2 SDE Project [COPY] Copyright (C) 1998 - 2003 Clifford Wolf [COPY] @@ -29,10 +29,12 @@ [L] GPL [S] Stable -[V] 2.7 +[V] 2.7-54 [P] X -----5---9 131.200 [CV-URL] http://bmrc.berkeley.edu/~trey/emacs/metamail.html -[D] 3274293306 mm2.7.tar.Z ftp://thumper.bellcore.com/pub/nsb/ - +[D] 3085272030 metamail_2.7.orig.tar.gz http://ftp.debian.org/debian/pool/main/m/metamail/ +[D] 2475623582 metamail_2.7-54.diff.gz http://ftp.debian.org/debian/pool/main/m/metamail/ +# old download site isnot available anymore +#[D] 3274293306 mm2.7.tar.Z ftp://thumper.bellcore.com/pub/nsb/