summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritojun <itojun@pkgsrc.org>1999-12-26 17:25:16 +0000
committeritojun <itojun@pkgsrc.org>1999-12-26 17:25:16 +0000
commit441fbadfd3209e83f2cd4d0c13d76d47ada491dd (patch)
tree980ce0c9bfacea9bf7493c2d165d639420f5fa21
parentcd1258eea561c0055c32283969da09f746f74b2c (diff)
downloadpkgsrc-441fbadfd3209e83f2cd4d0c13d76d47ada491dd.tar.gz
mail/mailagent from freebsd-current
-rw-r--r--mail/mailagent/Makefile50
-rw-r--r--mail/mailagent/files/md51
-rw-r--r--mail/mailagent/patches/patch-aa23
-rw-r--r--mail/mailagent/patches/patch-ac21
-rw-r--r--mail/mailagent/patches/patch-ag17
-rw-r--r--mail/mailagent/patches/patch-ah17
-rw-r--r--mail/mailagent/patches/patch-ai17
-rw-r--r--mail/mailagent/patches/patch-aj17
-rw-r--r--mail/mailagent/patches/patch-ak17
-rw-r--r--mail/mailagent/patches/patch-al17
-rw-r--r--mail/mailagent/patches/patch-am19
-rw-r--r--mail/mailagent/pkg/COMMENT1
-rw-r--r--mail/mailagent/pkg/DESCR16
-rw-r--r--mail/mailagent/pkg/PLIST81
-rwxr-xr-xmail/mailagent/scripts/pre-configure37
15 files changed, 351 insertions, 0 deletions
diff --git a/mail/mailagent/Makefile b/mail/mailagent/Makefile
new file mode 100644
index 00000000000..92fce45e4d5
--- /dev/null
+++ b/mail/mailagent/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for: mailagent
+# Version required: 3.0pl68
+# Date created: 23 Sep 1996
+# Whom: Masafumi NAKANE <max@FreeBSD.org>
+#
+# $FreeBSD: ports/mail/mailagent/Makefile,v 1.29 1999/09/07 19:56:12 max Exp $
+#
+
+DISTNAME= mailagent-3.0@68
+PKGNAME= mailagent-3.0.68
+CATEGORIES= mail
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= ../../authors/id/RAM
+
+MAINTAINER= max@FreeBSD.org
+
+USE_PERL5= yes
+NO_PACKAGE= "Correct FQDN needs to be hardcoded"
+IS_INTERACTIVE= yes
+HAS_CONFIGURE= yes
+CONFIGURE_SCRIPT= Configure
+CONFIGURE_ARGS= -dres \
+ -Dperlpath='${PERL5}' \
+ -Dutmp='/var/run/utmp' \
+ -Dprefix='${PREFIX}' -Dmansrc='${PREFIX}/man/man1' \
+ -Dnotifypatches='false'
+MAKE_ENV= PATH=`dirname ${PERL5}`:${PATH}
+INSTALL_TARGET= install install.man
+
+# Note that mailhelp.1 is intentionally left uncompressed as it is referred
+# from several other man pages with .so macro.
+MAN1= edusers.1 mailagent.1 maildist.1 \
+ maillist.1 mailpatch.1 package.1
+
+pre-extract:
+ @if [ `${SH} -c umask` != 0022 ]; then \
+ ${ECHO} "Please set umask to 022 before running make,"; \
+ ${ECHO} "or mailagent will not build successfully."; \
+ ${FALSE}; fi
+ @if [ `id -u` = 0 ]; then \
+ ${ECHO} "Do not build mailagent as root or it won't pass the sanity tests."; \
+ ${FALSE}; fi
+
+post-install:
+ @${MKDIR} ${PREFIX}/share/examples/mailagent
+ @${MKDIR} ${PREFIX}/share/examples/mailagent/misc
+ ${CP} -pR ${WRKSRC}/misc/* ${PREFIX}/share/examples/mailagent/misc
+ @${LN} -fs ${PREFIX}/lib/mailagent/examples ${PREFIX}/share/examples/mailagent/agent
+
+.include <bsd.port.mk>
diff --git a/mail/mailagent/files/md5 b/mail/mailagent/files/md5
new file mode 100644
index 00000000000..70369cf5bed
--- /dev/null
+++ b/mail/mailagent/files/md5
@@ -0,0 +1 @@
+MD5 (mailagent-3.0@68.tar.gz) = 50670b005a36a38c971489a0242d2201
diff --git a/mail/mailagent/patches/patch-aa b/mail/mailagent/patches/patch-aa
new file mode 100644
index 00000000000..3fed5dfe9c7
--- /dev/null
+++ b/mail/mailagent/patches/patch-aa
@@ -0,0 +1,23 @@
+--- agent/filter/logfile.c.orig Fri Apr 18 16:20:26 1997
++++ agent/filter/logfile.c Fri Apr 18 16:41:06 1997
+@@ -68,6 +68,9 @@
+ #include <sys/fcntl.h> /* Try this one in last resort */
+ #endif
+ #endif
++#ifdef I_SYS_PARAM
++# include <sys/param.h>
++#endif
+
+ #include "confmagic.h"
+
+@@ -220,8 +223,10 @@
+ */
+
+ #ifdef HAS_SYS_ERRLIST
++#if !(defined(BSD) && (BSD >= 199306))
+ extern int sys_nerr; /* Size of sys_errlist[] */
+ extern char *sys_errlist[]; /* Maps error code to string */
++#endif
+ #endif
+
+ #ifdef HAS_STRERROR
diff --git a/mail/mailagent/patches/patch-ac b/mail/mailagent/patches/patch-ac
new file mode 100644
index 00000000000..ab4f26f2f2a
--- /dev/null
+++ b/mail/mailagent/patches/patch-ac
@@ -0,0 +1,21 @@
+--- agent/filter/io.c.orig Wed Jul 29 02:41:11 1998
++++ agent/filter/io.c Mon Aug 10 21:01:22 1998
+@@ -120,6 +120,9 @@
+ #ifdef I_SYS_IOCTL
+ #include <sys/ioctl.h>
+ #endif
++#ifdef I_SYS_PARAM
++#include <sys/param.h>
++#endif
+
+ /*
+ * The following should be defined in <sys/stat.h>.
+@@ -713,7 +716,7 @@
+ */
+
+ char **envp; /* Environment pointer */
+-#ifdef UNION_WAIT
++#if defined(UNION_WAIT) && (!defined(BSD) || BSD < 199306)
+ union wait status; /* Waiting status */
+ #else
+ int status; /* Status from command */
diff --git a/mail/mailagent/patches/patch-ag b/mail/mailagent/patches/patch-ag
new file mode 100644
index 00000000000..eec23ec3f3e
--- /dev/null
+++ b/mail/mailagent/patches/patch-ag
@@ -0,0 +1,17 @@
+*** agent/edusers.SH.orig Thu Aug 10 15:34:55 1995
+--- agent/edusers.SH Thu Jul 25 19:55:26 1996
+***************
+*** 17,22 ****
+ echo "Extracting agent/edusers (with variable substitutions)"
+ $spitshell >edusers <<!GROK!THIS!
+ $startperl
+! eval "exec perl -S \$0 \$*"
+ if \$running_under_some_shell;
+
+--- 17,22 ----
+ echo "Extracting agent/edusers (with variable substitutions)"
+ $spitshell >edusers <<!GROK!THIS!
+ $startperl
+! eval "exec $perlpath -S \$0 \$*"
+ if \$running_under_some_shell;
+
diff --git a/mail/mailagent/patches/patch-ah b/mail/mailagent/patches/patch-ah
new file mode 100644
index 00000000000..b8df3a24af6
--- /dev/null
+++ b/mail/mailagent/patches/patch-ah
@@ -0,0 +1,17 @@
+*** agent/maildist.SH.orig Wed Mar 22 05:51:25 1995
+--- agent/maildist.SH Thu Jul 25 19:53:05 1996
+***************
+*** 17,22 ****
+ echo "Extracting agent/maildist (with variable substitutions)"
+ $spitshell >maildist <<!GROK!THIS!
+ $startperl
+! eval "exec perl -S \$0 \$*"
+ if \$running_under_some_shell;
+
+--- 17,22 ----
+ echo "Extracting agent/maildist (with variable substitutions)"
+ $spitshell >maildist <<!GROK!THIS!
+ $startperl
+! eval "exec $perlpath -S \$0 \$*"
+ if \$running_under_some_shell;
+
diff --git a/mail/mailagent/patches/patch-ai b/mail/mailagent/patches/patch-ai
new file mode 100644
index 00000000000..4e83d8f946d
--- /dev/null
+++ b/mail/mailagent/patches/patch-ai
@@ -0,0 +1,17 @@
+*** agent/mailhelp.SH.orig Wed Mar 22 05:51:24 1995
+--- agent/mailhelp.SH Thu Jul 25 19:56:16 1996
+***************
+*** 17,22 ****
+ echo "Extracting agent/mailhelp (with variable substitutions)"
+ $spitshell >mailhelp <<!GROK!THIS!
+ $startperl
+! eval "exec perl -S \$0 \$*"
+ if \$running_under_some_shell;
+
+--- 17,22 ----
+ echo "Extracting agent/mailhelp (with variable substitutions)"
+ $spitshell >mailhelp <<!GROK!THIS!
+ $startperl
+! eval "exec $perlpath -S \$0 \$*"
+ if \$running_under_some_shell;
+
diff --git a/mail/mailagent/patches/patch-aj b/mail/mailagent/patches/patch-aj
new file mode 100644
index 00000000000..84251ae1e4d
--- /dev/null
+++ b/mail/mailagent/patches/patch-aj
@@ -0,0 +1,17 @@
+*** agent/maillist.SH.orig Thu Aug 10 15:38:06 1995
+--- agent/maillist.SH Thu Jul 25 19:54:00 1996
+***************
+*** 17,22 ****
+ echo "Extracting agent/maillist (with variable substitutions)"
+ $spitshell >maillist <<!GROK!THIS!
+ $startperl
+! eval "exec perl -S \$0 \$*"
+ if \$running_under_some_shell;
+
+--- 17,22 ----
+ echo "Extracting agent/maillist (with variable substitutions)"
+ $spitshell >maillist <<!GROK!THIS!
+ $startperl
+! eval "exec $perlpath -S \$0 \$*"
+ if \$running_under_some_shell;
+
diff --git a/mail/mailagent/patches/patch-ak b/mail/mailagent/patches/patch-ak
new file mode 100644
index 00000000000..227b4e0af9f
--- /dev/null
+++ b/mail/mailagent/patches/patch-ak
@@ -0,0 +1,17 @@
+*** agent/mailpatch.SH.orig Wed Mar 22 05:51:24 1995
+--- agent/mailpatch.SH Thu Jul 25 19:56:34 1996
+***************
+*** 17,22 ****
+ echo "Extracting agent/mailpatch (with variable substitutions)"
+ $spitshell >mailpatch <<!GROK!THIS!
+ $startperl
+! eval "exec perl -S \$0 \$*"
+ if \$running_under_some_shell;
+
+--- 17,22 ----
+ echo "Extracting agent/mailpatch (with variable substitutions)"
+ $spitshell >mailpatch <<!GROK!THIS!
+ $startperl
+! eval "exec $perlpath -S \$0 \$*"
+ if \$running_under_some_shell;
+
diff --git a/mail/mailagent/patches/patch-al b/mail/mailagent/patches/patch-al
new file mode 100644
index 00000000000..18597f52280
--- /dev/null
+++ b/mail/mailagent/patches/patch-al
@@ -0,0 +1,17 @@
+*** agent/package.SH.orig Thu Aug 10 15:34:35 1995
+--- agent/package.SH Thu Jul 25 19:54:42 1996
+***************
+*** 17,22 ****
+ echo "Extracting agent/package (with variable substitutions)"
+ $spitshell >package <<!GROK!THIS!
+ $startperl
+! eval "exec perl -S \$0 \$*"
+ if \$running_under_some_shell;
+
+--- 17,22 ----
+ echo "Extracting agent/package (with variable substitutions)"
+ $spitshell >package <<!GROK!THIS!
+ $startperl
+! eval "exec $perlpath -S \$0 \$*"
+ if \$running_under_some_shell;
+
diff --git a/mail/mailagent/patches/patch-am b/mail/mailagent/patches/patch-am
new file mode 100644
index 00000000000..11b8de3b8c1
--- /dev/null
+++ b/mail/mailagent/patches/patch-am
@@ -0,0 +1,19 @@
+*** agent/magent.sh.orig Sat Sep 16 09:05:29 1995
+--- agent/magent.sh Thu Jul 25 19:58:11 1996
+***************
+*** 17,23 ****
+ echo "Extracting agent/magent (with variable substitutions)"
+ $spitshell >magent <<!GROK!THIS!
+ $startperl
+! eval 'exec perl -S \$0 "\$@"'
+ if \$running_under_some_shell;
+
+ # You'll need to set up a .forward file that feeds your mail to this script,
+--- 17,23 ----
+ echo "Extracting agent/magent (with variable substitutions)"
+ $spitshell >magent <<!GROK!THIS!
+ $startperl
+! eval 'exec $perlpath -S \$0 "\$@"'
+ if \$running_under_some_shell;
+
+ # You'll need to set up a .forward file that feeds your mail to this script,
diff --git a/mail/mailagent/pkg/COMMENT b/mail/mailagent/pkg/COMMENT
new file mode 100644
index 00000000000..6e78780acc7
--- /dev/null
+++ b/mail/mailagent/pkg/COMMENT
@@ -0,0 +1 @@
+A sophisticated automatic mail-processing tool
diff --git a/mail/mailagent/pkg/DESCR b/mail/mailagent/pkg/DESCR
new file mode 100644
index 00000000000..6e9cf2f4924
--- /dev/null
+++ b/mail/mailagent/pkg/DESCR
@@ -0,0 +1,16 @@
+Mailagent allows you to process your mail automatically. Given a set
+of lex-like rules, you are able to fill mails to specific folders,
+forward messages to a third person, pipe a message to a command or
+even post the message to a newsgroup. It is also possible to process
+messages containing some commands. The mailagent is not usually
+invoked manually but is rather called via the filter program, which is
+in turn invoked by sendmail.
+
+Most portion of this package is written in Perl and version 5.01M or
+higher is known to work nicely.
+
+You are advised to setup the path variable in your mailagent configuration
+to include the directory containing perl5 before /usr/bin to avoid getting
+a lot of warning message although they are harmless.
+
+See the man page for the detailed information.
diff --git a/mail/mailagent/pkg/PLIST b/mail/mailagent/pkg/PLIST
new file mode 100644
index 00000000000..cda6665cc95
--- /dev/null
+++ b/mail/mailagent/pkg/PLIST
@@ -0,0 +1,81 @@
+bin/mailpatch
+bin/mailhelp
+bin/maillist
+bin/maildist
+bin/package
+bin/edusers
+bin/mailagent
+lib/mailagent/filter
+lib/mailagent/agenthelp
+lib/mailagent/commands
+lib/mailagent/distribs
+lib/mailagent/filter.sh
+lib/mailagent/mailagent.cf
+lib/mailagent/proglist
+lib/mailagent/chkagent.sh
+lib/mailagent/setup.cf
+lib/mailagent/compressors
+lib/mailagent/help/addauth
+lib/mailagent/help/approve
+lib/mailagent/help/delpower
+lib/mailagent/help/end
+lib/mailagent/help/getauth
+lib/mailagent/help/help
+lib/mailagent/help/newpower
+lib/mailagent/help/passwd
+lib/mailagent/help/password
+lib/mailagent/help/power
+lib/mailagent/help/release
+lib/mailagent/help/remauth
+lib/mailagent/help/set
+lib/mailagent/help/setauth
+lib/mailagent/help/user
+man/man1/mailhelp.1
+lib/mailagent/examples/README
+lib/mailagent/examples/daemon
+lib/mailagent/examples/mailfolders
+lib/mailagent/examples/mchk
+lib/mailagent/examples/mhinc
+lib/mailagent/examples/nocmds
+lib/mailagent/examples/profile
+lib/mailagent/examples/rules
+lib/mailagent/examples/vacation
+share/examples/mailagent/misc/README
+share/examples/mailagent/misc/fakesend/README
+share/examples/mailagent/misc/fakesend/fakesend.pl
+share/examples/mailagent/misc/fakesend/freplcomps
+share/examples/mailagent/misc/fakesend/mh_profile
+share/examples/mailagent/misc/getcost/README
+share/examples/mailagent/misc/getcost/getcost
+share/examples/mailagent/misc/getcost/rules
+share/examples/mailagent/misc/getcost/spamconfig
+share/examples/mailagent/misc/mime/README
+share/examples/mailagent/misc/mime/rules
+share/examples/mailagent/misc/mime/unmime
+share/examples/mailagent/misc/pbounce/README
+share/examples/mailagent/misc/pbounce/mailagent.cf
+share/examples/mailagent/misc/pbounce/newcmd.cf
+share/examples/mailagent/misc/pbounce/patbounce.pl
+share/examples/mailagent/misc/pbounce/rules
+share/examples/mailagent/misc/shell/README
+share/examples/mailagent/misc/shell/server.cf
+share/examples/mailagent/misc/shell/shell
+share/examples/mailagent/misc/unkit/README
+share/examples/mailagent/misc/unkit/kitok.msg
+share/examples/mailagent/misc/unkit/mailagent.cf
+share/examples/mailagent/misc/unkit/newcmd.cf
+share/examples/mailagent/misc/unkit/rules
+share/examples/mailagent/misc/unkit/unkit.pl
+@exec /bin/ln -sf %D/lib/mailagent/examples %D/share/examples/mailagent/agent
+@unexec /bin/rm -f %D/share/examples/mailagent/agent
+@dirrm share/examples/mailagent/misc/unkit
+@dirrm share/examples/mailagent/misc/shell
+@dirrm share/examples/mailagent/misc/pbounce
+@dirrm share/examples/mailagent/misc/mime
+@dirrm share/examples/mailagent/misc/getcost
+@dirrm share/examples/mailagent/misc/fakesend
+@dirrm share/examples/mailagent/misc
+@dirrm share/examples/mailagent
+@dirrm lib/mailagent/examples
+@dirrm lib/mailagent/help
+@dirrm lib/mailagent
diff --git a/mail/mailagent/scripts/pre-configure b/mail/mailagent/scripts/pre-configure
new file mode 100755
index 00000000000..a08a67bcb6b
--- /dev/null
+++ b/mail/mailagent/scripts/pre-configure
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Pre-configure script for mailagent.
+# This script asks for information specific to the machine and writes
+# given values to work/mailagent-3.0/config.sh to set the default
+# values for COnfigure script so that Configure doesn't request any
+# input.
+
+while [ X$addr = X ]; do
+ read -p "Enter your complete E-mail address> " addr
+done
+
+while [ X$host = X ]; do
+ read -p "Enter fully qualified name of this host (`hostname`)> " host
+ if [ X$host = X ]; then
+ host=`hostname`
+ fi
+done
+
+maildomain=`echo $addr | awk -F@ '{printf("%s", $2)}'`
+if [ `echo $maildomain | tr A-Z a-z` = `echo $host | tr A-Z a-z` ]; then
+ d_hidnet=undef
+ hiddennet=''
+else
+ d_hidnet=define
+ hiddennet=$maildomain
+fi
+
+read -p "Enter the name of your organization> " orgname
+
+cat >${WRKSRC}/config.sh <<EOM
+#!/bin/sh
+cf_email='$addr'
+d_flockonly='define'
+d_hidnet='$d_hidnet'
+hiddennet='$hiddennet'
+orgname='$orgname'
+EOM