aboutsummaryrefslogtreecommitdiff
path: root/mail/ovs
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-09-02 01:37:38 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-09-02 01:37:38 +0000
commitbec681c04c13b825bcd479fa79ae36930df8407f (patch)
tree3b824c024f0f1b638283d41ea18ff8e901d09012 /mail/ovs
parent94b9e441fd72437dfd91a7c33d0c93750ec65bda (diff)
downloadports-bec681c04c13b825bcd479fa79ae36930df8407f.tar.gz
ports-bec681c04c13b825bcd479fa79ae36930df8407f.zip
OpenVISP Stats is a very simple mail statistics RRDtool frontend for mail
statistics that produces daily, weekly, monthly and yearly graphs of received/sent, bounces/rejected, spam mails, viruses, ... and pop/imap statistics. WWW: http://openvisp.fr/ PR: ports/115938 Submitted by: Xavier Beaudouin <kiwi at oav.net>
Notes
Notes: svn path=/head/; revision=198621
Diffstat (limited to 'mail/ovs')
-rw-r--r--mail/ovs/Makefile62
-rw-r--r--mail/ovs/distinfo3
-rw-r--r--mail/ovs/files/ovs.sh.in37
-rw-r--r--mail/ovs/files/patch-ovs.cgi15
-rw-r--r--mail/ovs/pkg-descr6
-rw-r--r--mail/ovs/pkg-message11
-rw-r--r--mail/ovs/pkg-plist3
7 files changed, 137 insertions, 0 deletions
diff --git a/mail/ovs/Makefile b/mail/ovs/Makefile
new file mode 100644
index 000000000000..5b0560134d65
--- /dev/null
+++ b/mail/ovs/Makefile
@@ -0,0 +1,62 @@
+# New ports collection makefile for: ovs
+# Date created: 26 August 2007
+# Whom: Xavier Beaudouin <kiwi@oav.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ovs
+PORTVERSION= 1.00
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.oav.net/openvisp/stats/
+
+MAINTAINER= kiwi@oav.net
+COMMENT= A RRDtool frontend for mail statistics
+
+RUN_DEPENDS= ${SITE_PERL}/RRDp.pm:${PORTSDIR}/databases/rrdtool \
+ ${SITE_PERL}/File/Tail.pm:${PORTSDIR}/devel/p5-File-Tail
+
+NO_BUILD= yes
+
+DATADIR?= /var/db/ovs
+OVS_USER?= ${WWWOWN}
+OVS_GROUP?= ${WWWGRP}
+
+USE_RC_SUBR= ${PORTNAME}.sh
+SUB_LIST+= OVS_USER=${OVS_USER} OVS_GROUP=${OVS_GROUP}
+
+DOCS= README CHANGES COPYING CHANGES.old README.old
+.if !defined(NOPORTDOCS)
+PORTDOCS= ${DOCS}
+.endif
+
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "You may set following options:"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "DATADIR=/var/db/ovs Where do you put RRD databases?"
+ @${ECHO_MSG} "OVS_USER=www User to run mailgraph (Default: ${WWWOWN})"
+ @${ECHO_MSG} ""
+
+post-patch:
+ @${REINPLACE_CMD} -e "s,%%DATADIR%%,${DATADIR}," ${WRKSRC}/ovs.cgi
+
+do-install:
+ @${MKDIR} ${PREFIX}/www/cgi-bin
+ @${MKDIR} ${DATADIR}
+ @${CHOWN} -R ${OVS_USER}:${OVS_GROUP} ${DATADIR}
+ @${INSTALL_SCRIPT} ${WRKSRC}/ovs.pl ${PREFIX}/sbin
+ @${INSTALL_SCRIPT} ${WRKSRC}/ovs.cgi ${PREFIX}/www/cgi-bin
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ for f in ${DOCS}; do \
+ ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
+ done
+.endif
+
+post-install:
+ @${ECHO_MSG} ""
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG} ""
+
+.include <bsd.port.mk>
diff --git a/mail/ovs/distinfo b/mail/ovs/distinfo
new file mode 100644
index 000000000000..10245f93fa13
--- /dev/null
+++ b/mail/ovs/distinfo
@@ -0,0 +1,3 @@
+MD5 (ovs-1.00.tar.gz) = b442036010df9710e330d5d5d4822698
+SHA256 (ovs-1.00.tar.gz) = f80ceeef0c3c3076e70f2930ab6aaf41c2d51967046704cf76acffb738d125fc
+SIZE (ovs-1.00.tar.gz) = 24253
diff --git a/mail/ovs/files/ovs.sh.in b/mail/ovs/files/ovs.sh.in
new file mode 100644
index 000000000000..7bc4eb78f3fe
--- /dev/null
+++ b/mail/ovs/files/ovs.sh.in
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: ovs
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf to enable OpenVISP Stats:
+#
+# ovs_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name="ovs"
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/${name}.pl > /dev/null 2>&1
+command_interpreter=/usr/bin/perl
+stop_postcmd=stop_postcmd
+
+stop_postcmd()
+{
+ rm -f $pidfile
+}
+
+: ${ovs_enable="NO"}
+: ${ovs_pidfile="%%DATADIR%%/ovs.pid"}
+: ${ovs_flags="--logfile /var/log/maillog --daemon-rrd=%%DATADIR%% --ignore-localhost --daemon --daemon-pid=${ovs_pidfile} --rbl-is-spam --greylist --helo --spf --domain-not-found"}
+: ${ovs_user="%%OVS_USER%%"}
+: ${ovs_chdir="%%DATADIR%%"}
+
+load_rc_config $name
+
+pidfile=${ovs_pidfile}
+
+run_rc_command "$1"
diff --git a/mail/ovs/files/patch-ovs.cgi b/mail/ovs/files/patch-ovs.cgi
new file mode 100644
index 000000000000..afbb831344d3
--- /dev/null
+++ b/mail/ovs/files/patch-ovs.cgi
@@ -0,0 +1,15 @@
+--- ovs.cgi.old Sun Aug 26 23:55:10 2007
++++ ovs.cgi Sun Aug 26 23:56:44 2007
+@@ -25,9 +25,9 @@
+ my $points_per_sample = 3;
+ my $ypoints = 160;
+ my $ypoints_err = 260;
+-my $rrd = 'ovs.rrd'; # path to where the RRD database is
+-my $rrd_virus = 'ovs_virus.rrd'; # path to where the Virus RRD database is
+-my $rrd_pop = 'ovs_pop.rrd'; # path to where the Virus RRD database is
++my $rrd = '%%DATADIR%%/ovs.rrd'; # path to where the RRD database is
++my $rrd_virus = '%%DATADIR%%/ovs_virus.rrd'; # path to where the Virus RRD database is
++my $rrd_pop = '%%DATADIR%%/ovs_pop.rrd'; # path to where the Virus RRD database is
+ my $tmp_dir = '/tmp/ovs'; # temporary directory where to store the images
+
+ my @graphs = (
diff --git a/mail/ovs/pkg-descr b/mail/ovs/pkg-descr
new file mode 100644
index 000000000000..a6895788fb66
--- /dev/null
+++ b/mail/ovs/pkg-descr
@@ -0,0 +1,6 @@
+OpenVISP Stats is a very simple mail statistics RRDtool frontend for mail
+statistics that produces daily, weekly, monthly and yearly graphs of
+received/sent, bounces/rejected, spam mails, viruses, ... and pop/imap
+statistics.
+
+WWW: http://openvisp.fr/
diff --git a/mail/ovs/pkg-message b/mail/ovs/pkg-message
new file mode 100644
index 000000000000..3a737753b899
--- /dev/null
+++ b/mail/ovs/pkg-message
@@ -0,0 +1,11 @@
+Edit /etc/rc.conf and set
+
+ ovs_enable="YES"
+
+to enable OpenVISP Stats.
+
+Make sure this script should be invoked with privilege to read
+/var/log/maillog. For example, you may change the permission of
+maillog to be 644. Another way is to make maillog owned by
+the mail group, and put ovs_user in that group.
+
diff --git a/mail/ovs/pkg-plist b/mail/ovs/pkg-plist
new file mode 100644
index 000000000000..cb4ad3a30950
--- /dev/null
+++ b/mail/ovs/pkg-plist
@@ -0,0 +1,3 @@
+www/cgi-bin/ovs.cgi
+sbin/ovs.pl
+@dirrmtry www/cgi-bin