pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/qgreylist Initial import of qgreylist-0.2, simple...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e22ca34a6b29
branches:  trunk
changeset: 480066:e22ca34a6b29
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sun Aug 29 15:32:12 2004 +0000

description:
Initial import of qgreylist-0.2, simple greylisting for qmail.

qgreylist is a 'lite' version of greylisting. It greylists only by
source IP address, mainly because it's written as a wrapper for
qmail-smtpd so has no other information available. For home and
small office use this works nearly as well.

diffstat:

 mail/qgreylist/DESCR            |   4 ++
 mail/qgreylist/MESSAGE          |   7 +++++
 mail/qgreylist/Makefile         |  55 +++++++++++++++++++++++++++++++++++++++++
 mail/qgreylist/PLIST            |   5 +++
 mail/qgreylist/distinfo         |   5 +++
 mail/qgreylist/patches/patch-aa |  32 +++++++++++++++++++++++
 6 files changed, 108 insertions(+), 0 deletions(-)

diffs (132 lines):

diff -r 32c26c080048 -r e22ca34a6b29 mail/qgreylist/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qgreylist/DESCR      Sun Aug 29 15:32:12 2004 +0000
@@ -0,0 +1,4 @@
+qgreylist is a 'lite' version of greylisting. It greylists only by
+source IP address, mainly because it's written as a wrapper for
+qmail-smtpd so has no other information available. For home and
+small office use this works nearly as well.
diff -r 32c26c080048 -r e22ca34a6b29 mail/qgreylist/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qgreylist/MESSAGE    Sun Aug 29 15:32:12 2004 +0000
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2004/08/29 15:32:12 schmonz Exp $
+
+To enable qgreylist, set qmailsmtpd_presmtpd="${PREFIX}/bin/qgreylist"
+in /etc/rc.conf, then restart qmail-smtpd.
+
+===========================================================================
diff -r 32c26c080048 -r e22ca34a6b29 mail/qgreylist/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qgreylist/Makefile   Sun Aug 29 15:32:12 2004 +0000
@@ -0,0 +1,55 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/08/29 15:32:12 schmonz Exp $
+#
+
+DISTNAME=              qgreylist-0.2
+CATEGORIES=            mail
+MASTER_SITES=          ${HOMEPAGE}
+
+MAINTAINER=            schmonz%NetBSD.org@localhost
+HOMEPAGE=              http://www.jonatkins.com/qgreylist/
+COMMENT=               Simple greylisting for qmail
+
+DEPENDS_QMAIL=         qmail>=1.03nb8:../../mail/qmail
+DEPENDS+=              ${DEPENDS_QMAIL}
+
+WRKSRC=                        ${WRKDIR}/qgreylist
+
+USE_BUILDLINK3=                yes
+USE_PERL5=             run
+USE_PKGINSTALL=                yes
+OWN_DIRS_PERMS=                ${PKG_SYSCONFDIR}/greylist qmaild wheel 0755
+NO_BUILD=              # defined
+
+QGREYLIST_SCRIPTS=     greylist greylist-info
+REPLACE_PERL=          ${QGREYLIST_SCRIPTS}
+
+.include "../../mk/bsd.prefs.mk"
+
+# Detect the PKG_SYSCONFDIR of the installed qmail, so we can create
+# config files there.
+.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE})
+INSTALLED_QMAIL!= ${PKG_BEST_EXISTS} ${DEPENDS_QMAIL:C/:.*$//:Q:S/\ / /g}
+.  if empty(INSTALLED_QMAIL:M*_not_found_)
+.    if !defined(PKG_SYSCONFDIR.qgreylist)
+PKG_SYSCONFDIR.qgreylist!= \
+       ${PKG_INFO} -qB ${INSTALLED_QMAIL} |                            \
+               ${SED} -n '/^PKG_SYSCONFDIR=/s|^PKG_SYSCONFDIR=[        ]*||p'
+.    endif
+.  endif
+.endif
+
+SUBST_CLASSES+=                qmaildirs
+SUBST_STAGE.qmaildirs= do-configure
+SUBST_FILES.qmaildirs= ${QGREYLIST_SCRIPTS}
+SUBST_SED.qmaildirs=   -e 's|/var/qmail/greylist|${PKG_SYSCONFDIR}/greylist|g'
+SUBST_SED.qmaildirs+=  -e 's|/var/qmail|${QMAILDIR}|g'
+
+INSTALLATION_DIRS=     bin share/doc/qgreylist
+
+do-install:
+       for i in ${QGREYLIST_SCRIPTS}; do                               \
+               ${INSTALL_SCRIPT} ${WRKSRC}/$${i} ${PREFIX}/bin/q$${i}; \
+       done
+       ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/qgreylist
+
+.include "../../mk/bsd.pkg.mk"
diff -r 32c26c080048 -r e22ca34a6b29 mail/qgreylist/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qgreylist/PLIST      Sun Aug 29 15:32:12 2004 +0000
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/08/29 15:32:12 schmonz Exp $
+bin/qgreylist
+bin/qgreylist-info
+share/doc/qgreylist/README
+@dirrm share/doc/qgreylist
diff -r 32c26c080048 -r e22ca34a6b29 mail/qgreylist/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qgreylist/distinfo   Sun Aug 29 15:32:12 2004 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/08/29 15:32:12 schmonz Exp $
+
+SHA1 (qgreylist-0.2.tar.gz) = f9cb178706a3aebe87cc632bdb18e388ddb5c61b
+Size (qgreylist-0.2.tar.gz) = 5397 bytes
+SHA1 (patch-aa) = 6a9ba2369ae43f0df8b0afa9fff400148e4aa6d3
diff -r 32c26c080048 -r e22ca34a6b29 mail/qgreylist/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qgreylist/patches/patch-aa   Sun Aug 29 15:32:12 2004 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/08/29 15:32:12 schmonz Exp $
+
+--- greylist.orig      2003-10-20 09:53:04.000000000 -0400
++++ greylist
+@@ -27,8 +27,9 @@ my $version = "0.2";
+ 
+ # TODO: alternative logging options, instead of syslog?
+ 
+-use Sys::Syslog;
++use Sys::Syslog qw(:DEFAULT setlogsock);
+ 
++setlogsock('unix');
+ 
+ openlog "greylist", "pid", "mail";
+ 
+@@ -277,14 +278,14 @@ cleanup_maybe;
+ # TODO: change to an immediate error here..?
+ unless ( defined $ENV{TCPREMOTEIP} )
+ {
+-      syslog "err", "ENV{TCPREMOEIP} not set!";
++      syslog "err", "ENV{TCPREMOTEIP} not set!";
+       smtp_temp_fail "Cannot find remote IP";
+ }
+ 
+ # now this should never happen...
+ unless ( $ENV{TCPREMOTEIP} =~ m{^(\d+\.\d+\.\d+\.\d+)$} )
+ {
+-      syslog "err", "ENV{TCPREMOEIP} = $ENV{TCPREMOTEIP} - bad format!";
++      syslog "err", "ENV{TCPREMOTEIP} = $ENV{TCPREMOTEIP} - bad format!";
+       smtp_temp_fail "Bad format for remote IP";
+ }
+ 



Home | Main Index | Thread Index | Old Index