aboutsummaryrefslogtreecommitdiff
path: root/mail/dovecot-antispam
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2008-01-28 20:22:05 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2008-01-28 20:22:05 +0000
commite3a9521247defe627ff2733e1dc5b33fefe45bb5 (patch)
treec62e4f3f1f64d3481ac9e6c2fe98ab386efe9fcf /mail/dovecot-antispam
parentf22ca11950a59f7df8dafd1c26022f3f95bab487 (diff)
downloadports-e3a9521247defe627ff2733e1dc5b33fefe45bb5.tar.gz
ports-e3a9521247defe627ff2733e1dc5b33fefe45bb5.zip
Add dovecot-antispam 20071029, dovecot plugin to train dspam about spam
or false positives. PR: ports/119576 Submitted by: Denis Shaposhnikov <dsh at wizard.volgograd.ru>
Notes
Notes: svn path=/head/; revision=206332
Diffstat (limited to 'mail/dovecot-antispam')
-rw-r--r--mail/dovecot-antispam/Makefile52
-rw-r--r--mail/dovecot-antispam/distinfo3
-rw-r--r--mail/dovecot-antispam/files/patch-dspam-exec.c20
-rw-r--r--mail/dovecot-antispam/pkg-descr16
-rw-r--r--mail/dovecot-antispam/pkg-message16
-rw-r--r--mail/dovecot-antispam/pkg-plist3
6 files changed, 110 insertions, 0 deletions
diff --git a/mail/dovecot-antispam/Makefile b/mail/dovecot-antispam/Makefile
new file mode 100644
index 000000000000..74fb193d568e
--- /dev/null
+++ b/mail/dovecot-antispam/Makefile
@@ -0,0 +1,52 @@
+# New ports collection makefile for: dovecot-antispam
+# Date created: Sat Jan 5 16:31:30 MSK 2008
+# Whom: Denis Shaposhnikov <dsh@wizard.volgograd.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dovecot-antispam
+PORTVERSION= 20071029
+CATEGORIES= mail
+MASTER_SITES= http://ports.internal.vlink.ru/distfiles/ \
+ ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= ehaupt
+
+MAINTAINER= dsh@wizard.volgograd.ru
+COMMENT= Dovecot plugin to train dspam about spam or false positives
+
+BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/mail/dovecot:configure
+RUN_DEPENDS= dovecot>=1.0.10:${PORTSDIR}/mail/dovecot
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_LDCONFIG= ${PREFIX}/lib/dovecot/imap
+
+MAN7= dovecot-antispam.7
+
+OPTIONS+= DSPAM "direct dspam training" on
+OPTIONS+= MAILTRAIN "send mail to special addresses for training" off
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/lib90_antispam_plugin.so \
+ ${PREFIX}/lib/dovecot/imap/
+ ${INSTALL_MAN} ${WRKSRC}/antispam.7 \
+ ${MANPREFIX}/man/man7/dovecot-antispam.7
+
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.pre.mk>
+
+do-configure:
+ DOVECOT=`${MAKE} -C ${PORTSDIR}/mail/dovecot -V WRKSRC` && \
+ ${ECHO} "DOVECOT=$$DOVECOT" > ${WRKSRC}/.config
+ ${ECHO} "DOVECOT_VERSION=1.0" >> ${WRKSRC}/.config
+.if defined(WITH_DSPAM)
+ ${ECHO} "BACKEND=dspam-exec" >> ${WRKSRC}/.config
+.endif
+.if defined(WITH_MAILTRAIN)
+ ${ECHO} "BACKEND=mailtrain" >> ${WRKSRC}/.config
+.endif
+ ${ECHO} "PLUGINNAME=antispam" >> ${WRKSRC}/.config
+
+.include <bsd.port.post.mk>
diff --git a/mail/dovecot-antispam/distinfo b/mail/dovecot-antispam/distinfo
new file mode 100644
index 000000000000..f82312a51732
--- /dev/null
+++ b/mail/dovecot-antispam/distinfo
@@ -0,0 +1,3 @@
+MD5 (dovecot-antispam-20071029.tar.bz2) = 128b94b34f81807192256cfed5b3e809
+SHA256 (dovecot-antispam-20071029.tar.bz2) = 7134526bd3edb999c1292f64654f1510b993a82da3fca1c3db442e47ed9a0464
+SIZE (dovecot-antispam-20071029.tar.bz2) = 17205
diff --git a/mail/dovecot-antispam/files/patch-dspam-exec.c b/mail/dovecot-antispam/files/patch-dspam-exec.c
new file mode 100644
index 000000000000..277e5f23874b
--- /dev/null
+++ b/mail/dovecot-antispam/files/patch-dspam-exec.c
@@ -0,0 +1,20 @@
+--- dspam-exec.c.orig 2007-10-29 14:09:16.000000000 +0300
++++ dspam-exec.c 2008-01-05 18:38:37.000000000 +0300
+@@ -127,7 +127,7 @@
+
+ argv[0] = (char *)dspam_binary;
+ argv[1] = "--source=error";
+- argv[2] = "--stdout";
++ argv[2] = "--deliver=";
+ argv[3] = (char *)class_arg;
+ argv[4] = (char *)sign_arg;
+
+@@ -136,7 +136,7 @@
+ * not good with stderr debuggin since we then write to
+ * stderr which our parent takes as a bug
+ */
+- debug("%s --source=error --stdout %s %s ...",
++ debug("%s --source=error --deliver= %s %s ...",
+ dspam_binary, class_arg, sign_arg);
+ #endif
+
diff --git a/mail/dovecot-antispam/pkg-descr b/mail/dovecot-antispam/pkg-descr
new file mode 100644
index 000000000000..3911232abd4e
--- /dev/null
+++ b/mail/dovecot-antispam/pkg-descr
@@ -0,0 +1,16 @@
+The dovecot antispam plugin watches a defined spam folder (defaults to
+"SPAM"). Instead of moving mail into special folders or forwarding
+them to special mail addresses for retraining, the plugin offers two
+actions for the user:
+
+ 1. moving mail out of the SPAM folder and
+
+ 2. moving mail into the SPAM folder.
+
+The dovecot plugin watches these actions (and additionally prohibits
+APPENDs to the SPAM folder, more for technical reasons than others)
+and tells the spam classifier that it made an error and needs to
+re-clas- sify the message (as spam/not spam depending on which way it
+was moved.)
+
+WWW: http://johannes.sipsolutions.net/Projects/dovecot-antispam
diff --git a/mail/dovecot-antispam/pkg-message b/mail/dovecot-antispam/pkg-message
new file mode 100644
index 000000000000..2af0912f09b4
--- /dev/null
+++ b/mail/dovecot-antispam/pkg-message
@@ -0,0 +1,16 @@
+---------------------------------------------------------------------
+
+This port assumes you are known with Dovecot and have it installed and
+running on the system you have installed this plugin on.
+
+You can enable the plugin with this directive in your dovecot.conf:
+
+ protocol imap {
+ mail_plugins = antispam
+ }
+
+Further information on configuration can be found at:
+
+ man 7 dovecot-antispam
+
+---------------------------------------------------------------------
diff --git a/mail/dovecot-antispam/pkg-plist b/mail/dovecot-antispam/pkg-plist
new file mode 100644
index 000000000000..df1a6f894205
--- /dev/null
+++ b/mail/dovecot-antispam/pkg-plist
@@ -0,0 +1,3 @@
+lib/dovecot/imap/lib90_antispam_plugin.so
+@dirrmtry lib/dovecot/imap
+@dirrmtry lib/dovecot