diff options
author | schmonz <schmonz@pkgsrc.org> | 2004-08-29 15:32:12 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2004-08-29 15:32:12 +0000 |
commit | f77bbaac58e49ea6259f4aa3722f52bda55aa8fc (patch) | |
tree | 990d2f16387b98446da43ac990f3f649048ffff8 /mail/qgreylist | |
parent | 5dbe6a687321069ea45ab2af71779cdf84f7826d (diff) | |
download | pkgsrc-f77bbaac58e49ea6259f4aa3722f52bda55aa8fc.tar.gz |
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 (limited to 'mail/qgreylist')
-rw-r--r-- | mail/qgreylist/DESCR | 4 | ||||
-rw-r--r-- | mail/qgreylist/MESSAGE | 7 | ||||
-rw-r--r-- | mail/qgreylist/Makefile | 55 | ||||
-rw-r--r-- | mail/qgreylist/PLIST | 5 | ||||
-rw-r--r-- | mail/qgreylist/distinfo | 5 | ||||
-rw-r--r-- | mail/qgreylist/patches/patch-aa | 32 |
6 files changed, 108 insertions, 0 deletions
diff --git a/mail/qgreylist/DESCR b/mail/qgreylist/DESCR new file mode 100644 index 00000000000..1166dfbe7c1 --- /dev/null +++ b/mail/qgreylist/DESCR @@ -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 --git a/mail/qgreylist/MESSAGE b/mail/qgreylist/MESSAGE new file mode 100644 index 00000000000..b9c7b6dbd02 --- /dev/null +++ b/mail/qgreylist/MESSAGE @@ -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 --git a/mail/qgreylist/Makefile b/mail/qgreylist/Makefile new file mode 100644 index 00000000000..08b6b0d531f --- /dev/null +++ b/mail/qgreylist/Makefile @@ -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 +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 --git a/mail/qgreylist/PLIST b/mail/qgreylist/PLIST new file mode 100644 index 00000000000..3eecea439eb --- /dev/null +++ b/mail/qgreylist/PLIST @@ -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 --git a/mail/qgreylist/distinfo b/mail/qgreylist/distinfo new file mode 100644 index 00000000000..d8d4c5b0567 --- /dev/null +++ b/mail/qgreylist/distinfo @@ -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 --git a/mail/qgreylist/patches/patch-aa b/mail/qgreylist/patches/patch-aa new file mode 100644 index 00000000000..953b2f542c6 --- /dev/null +++ b/mail/qgreylist/patches/patch-aa @@ -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"; + } + |