mh port from "Angelos D. Keromytis" <angelos@cvs.openbsd.org> with

minor tweaks by me.
This commit is contained in:
marc 1998-04-30 23:51:57 +00:00
parent 8ff844a1e6
commit 4b0dfae8ce
23 changed files with 633 additions and 0 deletions

31
mail/mh/Makefile Normal file
View File

@ -0,0 +1,31 @@
# OpenBSD makefile for: mh
# Version required: 6.8.4
# Date created: April 8, 1998
# Whom: Angelos D. Keromytis
#
# $OpenBSD: Makefile,v 1.1.1.1 1998/04/30 23:51:57 marc Exp $
#
DISTNAME= mh-6.8.3
PKGNAME= mh-6.8.4
CATEGORIES= mail
MASTER_SITES= ftp://ftp.ics.uci.edu/pub/mh/tar/
EXTRACT_SUFX= .tar.Z
PATCH_SITES= ftp://ftp.ics.uci.edu/pub/mh/updates/
PATCHFILES= MH.6.8.4.Z
MAINTAINER= angelos@openbsd.org
MAN1= ali.1 anno.1 burst.1 comp.1 dist.1 folder.1 forw.1 inc.1 mark.1 \
mh-chart.1 mh.1 mhl.1 mhook.1 mhmail.1 mhn.1 mhparam.1 mhpath.1 \
msgchk.1 msh.1 next.1 packf.1 pick.1 prev.1 prompter.1 rcvstore.1 \
refile.1 repl.1 rmf.1 rmm.1 scan.1 send.1 show.1 slocal.1 sortm.1 \
vmh.1 whatnow.1 whom.1
MAN5= mh-alias.5 mh-format.5 mh-mail.5 mh-profile.5 mh-sequence.5 mh-tailor.5
MAN8= ap.8 conflict.8 dp.8 install-mh.8 post.8 fmtdump.8
post-install:
${LDCONFIG} -m ${PREFIX}/lib
.include <bsd.port.mk>

2
mail/mh/files/md5 Normal file
View File

@ -0,0 +1,2 @@
MD5 (mh-6.8.3.tar.Z) = 70bd6efcdeb3ba9d8a0484098e15b830
MD5 (MH.6.8.4.Z) = a4a68d15743d43ce60d2fa4b8dfda63c

33
mail/mh/patches/patch-aa Normal file
View File

@ -0,0 +1,33 @@
*** /dev/null Sat Apr 27 10:54:01 1996
--- conf/OpenBSD Sat Apr 27 11:12:47 1996
***************
*** 0 ****
--- 1,28 ----
+
+ # OpenBSD running sendmail
+
+ bin /usr/local/bin
+ etc /usr/local/lib/mh
+ mandir /usr/local/man
+ mail /var/mail
+ chown /usr/sbin/chown
+ mts sendmail/smtp
+ cc gcc
+ signal void
+ remove rm -f
+
+ # Good options for all MH installations (personal preferences)
+ options ATHENA DUMB FOLDPROT='"0700"' MHE MHRC RPATHS
+
+ # OpenBSD specific options
+ options BSD42 BSD43 BSD44 WAITINT UNISTD VSPRINTF MORE='"/usr/bin/more"'
+ options NORUSERPASS DBMPWD POSIX OVERHEAD FCNTL NTOHLSWAP
+ options BIND MIME SENDMTS SMTP WHATNOW ZONEINFO TERMINFO
+ options GCOS_HACK RENAME LOCALE MSGPROT='"600"'
+
+ # If you want POP support, this will help you get started, but feel
+ # free to customize it.
+ # pop on
+ # popdir /usr/local/libexec
+ # options RPOP APOP='"/usr/local/etc/pop.auth"' POPSERVICE='"pop3"'
+

74
mail/mh/patches/patch-ab Normal file
View File

@ -0,0 +1,74 @@
*** uip/rcvtty.c.orig Wed Feb 11 21:23:50 1998
--- uip/rcvtty.c Wed Feb 11 22:18:18 1998
***************
*** 158,164 ****
user = getusr ();
#ifndef TTYD
! if ((uf = fopen ("/etc/utmp", "r")) == NULL)
exit (RCV_MBX);
while (fread ((char *) &ut, sizeof ut, 1, uf) == 1)
if (ut.ut_name[0] != 0
--- 158,164 ----
user = getusr ();
#ifndef TTYD
! if ((uf = fopen (_PATH_UTMP, "r")) == NULL)
exit (RCV_MBX);
while (fread ((char *) &ut, sizeof ut, 1, uf) == 1)
if (ut.ut_name[0] != 0
***************
*** 194,206 ****
char tmpfil[BUFSIZ];
struct stat st;
! (void) unlink (mktemp (strcpy (tmpfil, "/tmp/rcvttyXXXXX")));
if ((fd = creat (tmpfil, 0600)) == NOTOK)
return header_fd ();
(void) close (fd);
if ((fd = open (tmpfil, 2)) == NOTOK)
return header_fd ();
(void) unlink (tmpfil);
/* */
--- 194,208 ----
char tmpfil[BUFSIZ];
struct stat st;
! fd = mkstemp (strcpy (tmpfil, "/tmp/rcvttyXXXXX"));
! #if 0
if ((fd = creat (tmpfil, 0600)) == NOTOK)
return header_fd ();
(void) close (fd);
if ((fd = open (tmpfil, 2)) == NOTOK)
return header_fd ();
+ #endif
(void) unlink (tmpfil);
/* */
***************
*** 258,267 ****
char tmpfil[BUFSIZ];
(void) strcpy (tmpfil, m_tmpfil (invo_name));
if ((fd = creat (tmpfil, 0600)) == NOTOK)
return NOTOK;
(void) close (fd);
!
if ((fd = open (tmpfil, 2)) == NOTOK)
return NOTOK;
(void) unlink (tmpfil);
--- 260,270 ----
char tmpfil[BUFSIZ];
(void) strcpy (tmpfil, m_tmpfil (invo_name));
+ #if 0
if ((fd = creat (tmpfil, 0600)) == NOTOK)
return NOTOK;
(void) close (fd);
! #endif
if ((fd = open (tmpfil, 2)) == NOTOK)
return NOTOK;
(void) unlink (tmpfil);

12
mail/mh/patches/patch-ac Normal file
View File

@ -0,0 +1,12 @@
--- sbr/m_atoi.c.orig Wed Dec 1 13:01:23 1993
+++ sbr/m_atoi.c Tue Jan 7 18:53:15 1997
@@ -19,6 +19,9 @@
i *= 10;
i += *cp++ - '0';
}
+ if (*cp) { /* non-digit ended string -- return 0. */
+ return 0;
+ }
#else
while (*cp) {
if (*cp < '0' || *cp > '9')

53
mail/mh/patches/patch-ad Normal file
View File

@ -0,0 +1,53 @@
--- sbr/m_seq.c.dist Wed Dec 1 12:01:24 1993
+++ sbr/m_seq.c Mon Feb 3 12:39:31 1997
@@ -16,7 +16,7 @@
int mask;
register int i, j;
register char *bp;
- static char buffer[BUFSIZ*2]; /* for big sequences */
+ static char buffer[BUFSIZ * 4]; /* for big sequences */
if (strcmp (current, cp) == 0) {
/* assume this is in sync with msgstats["cur"] */
--- sbr/m_gmsg.c.dist Wed Dec 1 12:01:24 1993
+++ sbr/m_gmsg.c Mon Feb 3 12:40:25 1997
@@ -211,7 +211,7 @@
state;
register char *cp;
char name[NAMESZ],
- field[BUFSIZ * 2];
+ field[BUFSIZ * 4];
register struct node *np;
register FILE * fp;
--- sbr/m_sync.c.dist Wed Dec 1 12:01:25 1993
+++ sbr/m_sync.c Mon Feb 3 12:41:21 1997
@@ -26,7 +26,7 @@
register char *cp;
char flags,
attr[BUFSIZ],
- seq[BUFSIZ * 2];
+ seq[BUFSIZ * 4];
register FILE *fp;
#ifndef BSD42
TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
--- uip/vmhsbr.c.dist Wed Dec 1 12:01:39 1993
+++ uip/vmhsbr.c Mon Feb 3 12:42:08 1997
@@ -197,7 +197,7 @@
{
int eindex = errno;
register char *bp;
- char buffer[BUFSIZ * 2];
+ char buffer[BUFSIZ * 4];
(void) sprintf (buffer, fmt, a, b, c, d, e, f);
bp = buffer + strlen (buffer);
@@ -230,7 +230,7 @@
*e,
*f;
{
- static char buffer[BUFSIZ * 2];
+ static char buffer[BUFSIZ * 4];
(void) sprintf (buffer, fmt, a, b, c, d, e, f);

13
mail/mh/patches/patch-ae Normal file
View File

@ -0,0 +1,13 @@
*** sbr/fmtcompile.c.orig Wed Feb 11 21:17:25 1998
--- sbr/fmtcompile.c Wed Feb 11 21:17:47 1998
***************
*** 130,137 ****
};
- long time ();
-
static struct ftable *lookup(name)
register char *name;
{
--- 130,135 ----

13
mail/mh/patches/patch-af Normal file
View File

@ -0,0 +1,13 @@
*** sbr/formatsbr.c.orig Thu Feb 12 22:19:58 1998
--- sbr/formatsbr.c Thu Feb 12 22:20:09 1998
***************
*** 32,39 ****
struct mailname fmt_mnull;
- long time ();
-
/* */
/* MAJOR HACK: See MHCHANGES for discussion */
--- 32,37 ----

30
mail/mh/patches/patch-ag Normal file
View File

@ -0,0 +1,30 @@
*** zotnet/mts/lock.c.orig Wed Feb 11 21:41:44 1998
--- zotnet/mts/lock.c Wed Feb 11 22:10:35 1998
***************
*** 72,79 ****
static int b_lkopen(), lockit(), f_lkopen();
static lockname(), timerON(), timerOFF();
- long time ();
-
/* */
int lkopen (file, access)
--- 72,77 ----
***************
*** 201,207 ****
else
(void) sprintf (tmplock, "%.*s,LCK.XXXXXX",
cp - curlock, curlock);
! (void) unlink (mktemp (tmplock));
}
}
--- 199,205 ----
else
(void) sprintf (tmplock, "%.*s,LCK.XXXXXX",
cp - curlock, curlock);
! close (mkstemp (tmplock));
}
}

37
mail/mh/patches/patch-ah Normal file
View File

@ -0,0 +1,37 @@
*** zotnet/mts/client.c.orig Wed Apr 8 01:37:33 1998
--- zotnet/mts/client.c Wed Apr 8 01:45:11 1998
***************
*** 361,369 ****
#ifndef OSF1
#ifndef DG
u_long inet_addr ();
! #else
! struct in_addr inet_addr ();
#endif
#endif
--- 361,369 ----
#ifndef OSF1
#ifndef DG
+ #ifndef __OpenBSD__
u_long inet_addr ();
! #endif
#endif
#endif
***************
*** 377,383 ****
--- 377,387 ----
{
register struct hostent *h;
#ifndef DG
+ #ifndef __OpenBSD__
static u_long iaddr;
+ #else
+ in_addr_t iaddr;
+ #endif
#else
static struct in_addr iaddr;
#endif

12
mail/mh/patches/patch-ai Normal file
View File

@ -0,0 +1,12 @@
*** zotnet/tws/dtime.c.orig Wed Feb 11 21:48:11 1998
--- zotnet/tws/dtime.c Wed Feb 11 21:48:24 1998
***************
*** 107,113 ****
#define CENTURY 1900
- long time ();
struct tm *localtime ();
/* */
--- 107,112 ----

12
mail/mh/patches/patch-aj Normal file
View File

@ -0,0 +1,12 @@
*** uip/sendsbr.c.orig Wed Feb 11 21:49:25 1998
--- uip/sendsbr.c Wed Feb 11 21:49:37 1998
***************
*** 39,45 ****
char *getusr ();
off_t lseek ();
- long time ();
/* */
--- 39,44 ----

12
mail/mh/patches/patch-ak Normal file
View File

@ -0,0 +1,12 @@
*** uip/forw.c.orig Thu Feb 12 22:30:59 1998
--- uip/forw.c Thu Feb 12 22:31:23 1998
***************
*** 133,139 ****
static struct msgs *mp = NULL; /* used a lot */
- long time ();
off_t lseek();
/* */
--- 133,138 ----

12
mail/mh/patches/patch-al Normal file
View File

@ -0,0 +1,12 @@
*** uip/post.c.orig Thu Feb 12 22:34:52 1998
--- uip/post.c Thu Feb 12 22:35:03 1998
***************
*** 342,348 ****
static char *record = NULLCP;
off_t lseek ();
- long time ();
static putfmt(), start_headers(), finish_headers(), putgrp(), pl();
static anno(), make_bcc_file(), verify_all_addresses();
--- 342,347 ----

22
mail/mh/patches/patch-am Normal file
View File

@ -0,0 +1,22 @@
--- sbr/m_scratch.c.orig Tue Nov 30 20:01:24 1993
+++ sbr/m_scratch.c Wed Apr 29 22:08:32 1998
@@ -11,14 +11,18 @@
register char *cp;
static char buffer[BUFSIZ],
tmpfil[BUFSIZ];
+ int i;
(void) sprintf (tmpfil, "%sXXXXXX", template);
- (void) mktemp (tmpfil);
+ i = mkstemp (tmpfil);
+ if (i == -1 )
+ return NULL;
if ((cp = r1bindex (file, '/')) == file)
(void) strcpy (buffer, tmpfil);
else
(void) sprintf (buffer, "%.*s%s", cp - file, file, tmpfil);
(void) unlink (buffer);
+ close(i);
return buffer;
}

19
mail/mh/patches/patch-an Normal file
View File

@ -0,0 +1,19 @@
--- sbr/m_tmpfil.c.orig Tue Nov 30 20:01:25 1993
+++ sbr/m_tmpfil.c Wed Apr 29 22:12:24 1998
@@ -8,9 +8,14 @@
register char *template;
{
static char tmpfil[BUFSIZ];
-
+ int i;
(void) sprintf (tmpfil, "/tmp/%sXXXXXX", template);
- (void) unlink (mktemp (tmpfil));
+ i = mkstemp(tmpfil);
+ if (i == -1)
+ return NULL;
+ unlink( tmpfile );
+ close(i);
+ /*(void) unlink (mktemp (tmpfil));*/
return tmpfil;
}

20
mail/mh/patches/patch-ao Normal file
View File

@ -0,0 +1,20 @@
*** uip/mshcmds.c.orig Thu Feb 12 22:35:49 1998
--- uip/mshcmds.c Thu Feb 12 22:37:42 1998
***************
*** 999,1005 ****
/* foil search of .mh_profile */
(void) sprintf (buf, "%sXXXXXX", invo_name);
! vec[0] = (char *)mktemp (buf);
vec[vecp++] = "-file";
vec[vecp] = NULL;
if (!msgp)
--- 999,1006 ----
/* foil search of .mh_profile */
(void) sprintf (buf, "%sXXXXXX", invo_name);
! close(mkstemp(buf));
! vec[0] = buf;
vec[vecp++] = "-file";
vec[vecp] = NULL;
if (!msgp)

23
mail/mh/patches/patch-ap Normal file
View File

@ -0,0 +1,23 @@
*** uip/spost.c.orig Wed Feb 11 22:14:51 1998
--- uip/spost.c Wed Feb 11 22:19:11 1998
***************
*** 357,364 ****
out = stdout;
}
else {
! (void)mktemp (tmpfil);
! if ((out = fopen (tmpfil, "w")) == NULL)
adios (tmpfil, "unable to create");
(void)chmod (tmpfil, 0600);
}
--- 357,366 ----
out = stdout;
}
else {
! int i;
!
! i = mkstemp (tmpfil);
! if ((i == -1) || ( (out = fdopen (i, "w")) == NULL))
adios (tmpfil, "unable to create");
(void)chmod (tmpfil, 0600);
}

70
mail/mh/patches/patch-aq Normal file
View File

@ -0,0 +1,70 @@
*** conf/makefiles/uip.orig Wed Apr 8 02:26:42 1998
--- conf/makefiles/uip Wed Apr 8 02:27:04 1998
***************
*** 155,161 ****
mhn \
@END: MIME
mhpath msgchk msh next packf pick prev prompter refile repl \
! rmf rmm scan send show sortm vmh whatnow whom $(BBCMDS) \
$(TMACMDS) $(POPCMDS)
MISC = ap conflict dp install-mh mhl post rcvdist rcvpack rcvstore \
rcvtty fmtdump mhparam \
--- 155,161 ----
mhn \
@END: MIME
mhpath msgchk msh next packf pick prev prompter refile repl \
! rmf rmm scan send show sortm whatnow whom $(BBCMDS) \
$(TMACMDS) $(POPCMDS)
MISC = ap conflict dp install-mh mhl post rcvdist rcvpack rcvstore \
rcvtty fmtdump mhparam \
***************
*** 175,181 ****
inst-mhpath inst-msgchk inst-msh inst-next inst-packf \
inst-pick inst-prev inst-prompter inst-refile inst-repl \
inst-rmf inst-rmm inst-scan inst-send inst-show inst-sortm \
! inst-vmh inst-whatnow inst-whom $(IBBCMDS) $(ITMACMDS) \
$(IPOPCMDS)
IMISC = inst-ap inst-conflict inst-dp inst-install-mh inst-mhl \
inst-post inst-rcvdist inst-rcvpack inst-rcvstore inst-rcvtty \
--- 175,181 ----
inst-mhpath inst-msgchk inst-msh inst-next inst-packf \
inst-pick inst-prev inst-prompter inst-refile inst-repl \
inst-rmf inst-rmm inst-scan inst-send inst-show inst-sortm \
! inst-whatnow inst-whom $(IBBCMDS) $(ITMACMDS) \
$(IPOPCMDS)
IMISC = inst-ap inst-conflict inst-dp inst-install-mh inst-mhl \
inst-post inst-rcvdist inst-rcvpack inst-rcvstore inst-rcvtty \
***************
*** 196,202 ****
@END: MIME
l-mhpath l-msgchk l-msh l-packf l-pick \
l-prompter l-refile l-repl l-rmf l-rmm l-scan l-send \
! l-show l-sortm l-vmh l-whatnow l-whom $(LBBCMDS) $(LTMACMDS) \
$(LPOPCMDS)
LMISC = l-ap l-conflict l-dp l-install-mh l-mhl l-post l-rcvdist \
l-rcvpack l-rcvstore l-rcvtty l-fmtdump l-mhparam \
--- 196,202 ----
@END: MIME
l-mhpath l-msgchk l-msh l-packf l-pick \
l-prompter l-refile l-repl l-rmf l-rmm l-scan l-send \
! l-show l-sortm l-whatnow l-whom $(LBBCMDS) $(LTMACMDS) \
$(LPOPCMDS)
LMISC = l-ap l-conflict l-dp l-install-mh l-mhl l-post l-rcvdist \
l-rcvpack l-rcvstore l-rcvtty l-fmtdump l-mhparam \
***************
*** 215,221 ****
xmhn \
@END: MIME
xmhpath xmsgchk xmsh xpackf xpick xprompter xrefile \
! xrepl xrmf xrmm xscan xsend xshow xsortm xvmh xwhatnow xwhom \
$(TBBCMDS) $(TTMACMDS) $(TPOPCMDS)
TMISC = xap xconflict xdp xinstall-mh xmhl xpost xrcvdist xrcvpack \
xrcvstore xrcvtty xfmtdump xmhparam \
--- 215,221 ----
xmhn \
@END: MIME
xmhpath xmsgchk xmsh xpackf xpick xprompter xrefile \
! xrepl xrmf xrmm xscan xsend xshow xsortm xwhatnow xwhom \
$(TBBCMDS) $(TTMACMDS) $(TPOPCMDS)
TMISC = xap xconflict xdp xinstall-mh xmhl xpost xrcvdist xrcvpack \
xrcvstore xrcvtty xfmtdump xmhparam \

1
mail/mh/pkg/COMMENT Executable file
View File

@ -0,0 +1 @@
Rand MH mail handling system

3
mail/mh/pkg/DESCR Executable file
View File

@ -0,0 +1,3 @@
This is the MH mail user agent (reader/sender), a command line
based mail reader that is powerful and extensible. MH is an
excellent choice for people who receive and process a LOT of mail.

120
mail/mh/pkg/PLIST Executable file
View File

@ -0,0 +1,120 @@
bin/ali
bin/anno
bin/burst
bin/comp
bin/dist
bin/folder
bin/folders
bin/forw
bin/inc
bin/mark
bin/mhmail
bin/mhn
bin/mhparam
bin/mhpath
bin/msgchk
bin/msh
bin/next
bin/packf
bin/pgped
bin/pgpshow
bin/pick
bin/prev
bin/prompter
bin/refile
bin/repl
bin/rmf
bin/rmm
bin/scan
bin/send
bin/show
bin/sortm
bin/whatnow
bin/whom
lib/mh/MailAliases
lib/mh/ap
lib/mh/components
lib/mh/conflict
lib/mh/digestcomps
lib/mh/distcomps
lib/mh/dp
lib/mh/fmtdump
lib/mh/forwcomps
lib/mh/install-mh
lib/mh/mhl
lib/mh/mhl.body
lib/mh/mhl.digest
lib/mh/mhl.format
lib/mh/mhl.forward
lib/mh/mhl.headers
lib/mh/mhn_defaults
lib/mh/mtstailor
lib/mh/packmbox
lib/mh/pgped.tcl
lib/mh/post
lib/mh/rcvdist
lib/mh/rcvdistcomps
lib/mh/rcvpack
lib/mh/rcvstore
lib/mh/rcvtty
lib/mh/replcomps
lib/mh/scan.default
lib/mh/scan.mailx
lib/mh/scan.size
lib/mh/scan.time
lib/mh/scan.timely
lib/mh/slocal
lib/mh/spost
lib/mh/tmac.h
lib/mh/viamail
@exec ldconfig -m %B
@dirrm lib/mh
man/man1/ali.1
man/man1/anno.1
man/man1/burst.1
man/man1/comp.1
man/man1/dist.1
man/man1/folder.1
man/man1/forw.1
man/man1/inc.1
man/man1/mark.1
man/man1/mh-chart.1
man/man1/mh.1
man/man1/mhl.1
man/man1/mhmail.1
man/man1/mhn.1
man/man1/mhook.1
man/man1/mhparam.1
man/man1/mhpath.1
man/man1/msgchk.1
man/man1/msh.1
man/man1/next.1
man/man1/packf.1
man/man1/pick.1
man/man1/prev.1
man/man1/prompter.1
man/man1/rcvstore.1
man/man1/refile.1
man/man1/repl.1
man/man1/rmf.1
man/man1/rmm.1
man/man1/scan.1
man/man1/send.1
man/man1/show.1
man/man1/slocal.1
man/man1/sortm.1
man/man1/vmh.1
man/man1/whatnow.1
man/man1/whom.1
man/man5/mh-alias.5
man/man5/mh-format.5
man/man5/mh-mail.5
man/man5/mh-profile.5
man/man5/mh-sequence.5
man/man5/mh-tailor.5
man/man8/ap.8
man/man8/conflict.8
man/man8/dp.8
man/man8/fmtdump.8
man/man8/install-mh.8
man/man8/post.8

9
mail/mh/scripts/configure vendored Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
#
# Configure MH
#
cd $WRKSRC/conf
make
./mhconfig OpenBSD
cd ..
make clean