1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

Remote (network) biff.

Submitted by:	max@sfc.wide.ad.jp
This commit is contained in:
Satoshi Asami 1996-08-21 09:06:55 +00:00
parent 5dd6d5383b
commit f6d645c05f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=3671
12 changed files with 402 additions and 0 deletions

39
mail/youbin/Makefile Normal file
View File

@ -0,0 +1,39 @@
# New ports collection makefile for: youbin
# Version required: 2.13
# Date created: 09 Aug 1996
# Whom: Masafumi NAKANE <max@sfc.wide.ad.jp>
#
# $Id$
#
DISTNAME= youbin-2.13
CATEGORIES+= mail
MASTER_SITES= ftp://nuis.nuie.nagoya-u.ac.jp/info/nagoya-u/ \
ftp://ftp.kyoto.wide.ad.jp/pub/net/
MAINTAINER= max@sfc.wide.ad.jp
LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm
USE_IMAKE= yes
PREFIX= ${LOCALBASE}
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/youbind.sh
post-install:
@if [ ! -f ${STARTUP_SCRIPT} ]; then; \
echo "Creating startup script '${STARTUP_SCRIPT}'" ;\
echo "#!/bin/sh" > ${STARTUP_SCRIPT} ;\
echo "if [ -f ${PREFIX}/sbin/youbind ]; then" >> \
${STARTUP_SCRIPT} ;\
echo " ${PREFIX}/sbin/youbind &; echo -n ' youbind'" >> \
${STARTUP_SCRIPT} ;\
echo "fi" >> ${STARTUP_SCRIPT} ;\
chmod 755 ${STARTUP_SCRIPT} ;\
fi
@-(grep -v ^# /etc/inetd.conf | grep comsat > /dev/null) && \
(echo "Now you need to edit /etc/inetd.conf and comment out the" ;\
echo "entry for comsat. Then, do:" ;\
echo "kill -HUP `cat /var/run/inetd.pid`")
.include <bsd.port.mk>

1
mail/youbin/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (youbin-2.13.tar.gz) = 23ebf3275a7b8511719aa7313625446e

112
mail/youbin/files/patch-aa Normal file
View File

@ -0,0 +1,112 @@
*** Imakefile.orig Sat Apr 8 20:47:18 1995
--- Imakefile Sun Aug 18 09:49:53 1996
***************
*** 17,31 ****
*/
/* Directory for server. */
! SERVER_BINDIR = /etc
/* Directory for clients. */
! BINDIR = /usr/local/bin
/* Select one of them.
* If you want to use on-line manual written in Japanese, use DOCDIR_JP. */
MANSRC_DIR = $(DOCDIR)
/* MANSRC_DIR = $(DOCDIR_JP) */
/*
* Architectur depedent configurations.
--- 17,32 ----
*/
/* Directory for server. */
! SERVER_BINDIR = ${PREFIX}/sbin
/* Directory for clients. */
! BINDIR = ${PREFIX}/bin
/* Select one of them.
* If you want to use on-line manual written in Japanese, use DOCDIR_JP. */
MANSRC_DIR = $(DOCDIR)
/* MANSRC_DIR = $(DOCDIR_JP) */
+ MANPATH = ${PREFIX}/man
/*
* Architectur depedent configurations.
***************
*** 47,53 ****
* If your machine is SVR4, default MAIL_SPOOL is "/usr/mail/".
* In other environments, default MAIL_SPOOL is "/usr/spool/mail/".
* Select one of them, if you don't like these default values. */
! /* MAIL_SPOOL = -DMAIL_SPOOL=\"/usr/mail/\" */
/* MAIL_SPOOL = -DMAIL_SPOOL=\"/usr/spool/mail/\" */
/* Syslog: Comment following lines, if you don't want to use syslog. */
--- 48,54 ----
* If your machine is SVR4, default MAIL_SPOOL is "/usr/mail/".
* In other environments, default MAIL_SPOOL is "/usr/spool/mail/".
* Select one of them, if you don't like these default values. */
! MAIL_SPOOL = -DMAIL_SPOOL=\"/var/mail/\"
/* MAIL_SPOOL = -DMAIL_SPOOL=\"/usr/spool/mail/\" */
/* Syslog: Comment following lines, if you don't want to use syslog. */
***************
*** 65,73 ****
UNIT_TIME = 180
/* XPM: Uncomment following lines, if you want to use pixmap. */
! /* XPM_DEFS = -DUSE_XPM */
! /* XPM_LIBS = str_to_pixmap.o locate_pixmap.o */
! /* XPM_FLAGS = -lXpm */
/*
* Other configurations.
--- 66,74 ----
UNIT_TIME = 180
/* XPM: Uncomment following lines, if you want to use pixmap. */
! XPM_DEFS = -DUSE_XPM
! XPM_LIBS = str_to_pixmap.o locate_pixmap.o
! XPM_FLAGS = -lXpm
/*
* Other configurations.
***************
*** 90,96 ****
* USE_VARARGS Use UNIX's native routines.
*/
! /* SPECIAL_DEFS = */
/* SPECIAL_LIBS = */
/*
--- 91,97 ----
* USE_VARARGS Use UNIX's native routines.
*/
! SPECIAL_DEFS =-DUSE_STDARG -DUSE_POSIX_WAIT
/* SPECIAL_LIBS = */
/*
***************
*** 169,177 ****
install.man::
csh -c "cp $(MANSRC_DIR)/*.man ."
! InstallManPage(youbin,$(MANDIR))
! InstallManPage(youbin_sub,$(MANDIR))
! InstallManPage(youbind,$(MANDIR))
DependTarget()
LintTarget()
--- 170,178 ----
install.man::
csh -c "cp $(MANSRC_DIR)/*.man ."
! InstallGenManPage(youbin,$(MANPATH)/man1,1)
! InstallGenManPage(youbin_sub,$(MANPATH)/man3,3)
! InstallGenManPage(youbind,$(MANPATH)/man8,8)
DependTarget()
LintTarget()

View File

@ -0,0 +1,20 @@
diff -c Makefile.dist.orig Makefile.dist
*** Makefile.dist.orig Fri Jul 8 17:51:25 1994
--- Makefile.dist Fri Aug 9 13:39:57 1996
***************
*** 70,76 ****
CC = cc
# CC = gcc
! CFLAGS = $(OPTIMIZE) $(DEFINITIONS) $(PB_CFLAGS)
# For MIPS.
# CFLAGS = -systype bsd43 $(OPTIMIZE) $(DEFINITIONS)
--- 70,76 ----
CC = cc
# CC = gcc
! CFLAGS += $(OPTIMIZE) $(DEFINITIONS) $(PB_CFLAGS)
# For MIPS.
# CFLAGS = -systype bsd43 $(OPTIMIZE) $(DEFINITIONS)

View File

@ -0,0 +1,33 @@
diff -c log.c.orig log.c
*** log.c.orig Sun Mar 26 20:33:04 1995
--- log.c Wed Aug 7 13:31:29 1996
***************
*** 31,36 ****
--- 31,37 ----
#include <sys/types.h>
#include <netinet/in.h>
#include <stdio.h>
+ #include <sys/param.h>
#include "youbin.h"
#include "server.h"
***************
*** 90,97 ****
static int flag_console = ON; /* Always true. */
extern int errno;
extern char *sys_errlist[];
!
/*
* Initialize.
*/
--- 91,99 ----
static int flag_console = ON; /* Always true. */
extern int errno;
+ #if !(defined(BSD) && (BSD >= 199306))
extern char *sys_errlist[];
! #endif
/*
* Initialize.
*/

View File

@ -0,0 +1,20 @@
diff -c sendto.c.orig sendto.c
*** sendto.c.orig Mon Aug 1 21:59:07 1994
--- sendto.c Wed Aug 7 13:48:46 1996
***************
*** 107,113 ****
int len;
len = strlen(message);
! if (sendto(sockid, message, len, 0, &sa, sizeof(sa)) != len) {
sprintf(err_msg, "Error in sending packet");
return (err_msg);
}
--- 107,113 ----
int len;
len = strlen(message);
! if (sendto(sockid, message, len, 0, (struct sockaddr *)&sa, sizeof(sa)) != len) {
sprintf(err_msg, "Error in sending packet");
return (err_msg);
}

View File

@ -0,0 +1,54 @@
diff -c server.c.orig server.c
*** server.c.orig Sun Mar 26 20:33:31 1995
--- server.c Wed Aug 7 13:47:05 1996
***************
*** 244,250 ****
char buff[MESS_LEN + 1];
int len, flen = sizeof(ca);
! if ((len = recvfrom(fid, buff, MESS_LEN, 0, &ca, &flen)) < 0) {
if (errno != EINTR) {
warn_log("Error in receiving packet\n");
}
--- 244,250 ----
char buff[MESS_LEN + 1];
int len, flen = sizeof(ca);
! if ((len = recvfrom(fid, buff, MESS_LEN, 0, (struct sockaddr *)&ca, &flen)) < 0) {
if (errno != EINTR) {
warn_log("Error in receiving packet\n");
}
***************
*** 543,549 ****
saddr->sin_family = hp->h_addrtype;
saddr->sin_addr.s_addr = htonl(INADDR_ANY);
saddr->sin_port = sp->s_port;
! if (bind(id, saddr, sizeof(*saddr)) < 0) {
sys_error_log("bind");
exit(EXIT_FAILURE);
}
--- 543,549 ----
saddr->sin_family = hp->h_addrtype;
saddr->sin_addr.s_addr = htonl(INADDR_ANY);
saddr->sin_port = sp->s_port;
! if (bind(id, (struct sockaddr *)saddr, sizeof(*saddr)) < 0) {
sys_error_log("bind");
exit(EXIT_FAILURE);
}
***************
*** 586,592 ****
debug_log("Send: %s [%ld]: \"%.*s\"\n",
((sp == CA_ADDR) ? "" : sp->parent->name), (long)sp,
MAX_DEBUG_COLUMN, mess);
! if (sendto(sockid, mess, strlen(mess), 0, saddr, sizeof(*saddr)) < 0) {
warn_log("Error in sending packet: %s\n", mess);
}
}
--- 586,592 ----
debug_log("Send: %s [%ld]: \"%.*s\"\n",
((sp == CA_ADDR) ? "" : sp->parent->name), (long)sp,
MAX_DEBUG_COLUMN, mess);
! if (sendto(sockid, mess, strlen(mess), 0, (struct sockaddr *)saddr, sizeof(*saddr)) < 0) {
warn_log("Error in sending packet: %s\n", mess);
}
}

View File

@ -0,0 +1,33 @@
diff -c xyoubin.c.orig xyoubin.c
*** xyoubin.c.orig Sat Apr 8 19:58:20 1995
--- xyoubin.c Fri Aug 9 12:50:03 1996
***************
*** 285,291 ****
}
if (!app_data.pipe) {
! signal(SIGCLD, sig_cld);
sprintf(child_process, "exec %s/%s -s %s",
BINDIR, CHILD_PROGRAM_NAME, app_data.server);
if ((pfile = popen(child_process, "r")) == NULL) {
--- 285,291 ----
}
if (!app_data.pipe) {
! signal(SIGCHLD, sig_cld);
sprintf(child_process, "exec %s/%s -s %s",
BINDIR, CHILD_PROGRAM_NAME, app_data.server);
if ((pfile = popen(child_process, "r")) == NULL) {
***************
*** 386,390 ****
if (0 < pid) {
exit(EXIT_FAILURE); /* Should print child status? */
}
! signal(SIGCLD, sig_cld);
}
--- 386,390 ----
if (0 < pid) {
exit(EXIT_FAILURE); /* Should print child status? */
}
! signal(SIGCHLD, sig_cld);
}

View File

@ -0,0 +1,66 @@
diff -c youbin_sub.c.orig youbin_sub.c
*** youbin_sub.c.orig Sun Mar 26 22:39:04 1995
--- youbin_sub.c Fri Aug 9 11:59:58 1996
***************
*** 336,342 ****
SockAddr fa;
int len, flen = sizeof(fa);
! if ((len = recvfrom(sockid, mess, buflen, 0, &fa, &flen)) < 0) {
perror("recvfrom");
return (FALSE);
}
--- 336,342 ----
SockAddr fa;
int len, flen = sizeof(fa);
! if ((len = recvfrom(sockid, mess, buflen, 0, (struct sockaddr *)&fa, &flen)) < 0) {
perror("recvfrom");
return (FALSE);
}
***************
*** 367,373 ****
len = strlen(mess);
debug("%s: [%s]: Send: \"%s\"\n", LIB_NAME, my_id, mess);
! if (sendto(sockid, mess, len, 0, &sa, sizeof(sa)) != len) {
fprintf(stderr, "%s: Error in sending packet: %s\n", LIB_NAME, mess);
}
}
--- 367,373 ----
len = strlen(mess);
debug("%s: [%s]: Send: \"%s\"\n", LIB_NAME, my_id, mess);
! if (sendto(sockid, mess, len, 0, (struct sockaddr *)&sa, sizeof(sa)) != len) {
fprintf(stderr, "%s: Error in sending packet: %s\n", LIB_NAME, mess);
}
}
***************
*** 426,438 ****
for (i = (IPPORT_RESERVED - 1); (IPPORT_RESERVED / 2) <= i; i--) {
/* Try to find reserved port. */
ca->sin_port = htons(i);
! if (bind(sockid, ca, sizeof(*ca)) == 0) {
return;
}
}
} else { /* Try to find ordinary port. */
ca->sin_port = htons(0);
! if (bind(sockid, ca, sizeof(*ca)) == 0) {
return;
}
}
--- 426,438 ----
for (i = (IPPORT_RESERVED - 1); (IPPORT_RESERVED / 2) <= i; i--) {
/* Try to find reserved port. */
ca->sin_port = htons(i);
! if (bind(sockid, (struct sockaddr *)ca, sizeof(*ca)) == 0) {
return;
}
}
} else { /* Try to find ordinary port. */
ca->sin_port = htons(0);
! if (bind(sockid, (struct sockaddr *)ca, sizeof(*ca)) == 0) {
return;
}
}

1
mail/youbin/pkg-comment Normal file
View File

@ -0,0 +1 @@
Mail arrival notification service package

15
mail/youbin/pkg-descr Normal file
View File

@ -0,0 +1,15 @@
---- From README (slightly modified) ---
youbin is a kind of biff in the network age. When youbin is used, the
mail spool of a certain, specific machine (mail server) is observed to
inform the arrival of mail to a user at an arbitrary machine through
the network. On the other hands, the conventional "biff" informs only
the user who logs in at the machine on which the mail spool
resides. Combining with POP, youbin eliminates a lot of NFS mount of
mail spool directory caused by checking mail arrival.
Since youbin is designed with event driven, the user is promptly
informed of status change of mail spool caused by arrival of new
message and/or reading messages.
- Masafumi

8
mail/youbin/pkg-plist Normal file
View File

@ -0,0 +1,8 @@
bin/youbin
bin/xyoubin
bin/sendto
sbin/youbind
man/man1/youbin.1.gz
man/man3/youbin_sub.3.gz
man/man8/youbind.8.gz
etc/rc.d/youbind.sh