1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

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>
This commit is contained in:
Emanuel Haupt 2008-01-28 20:22:05 +00:00
parent f22ca11950
commit e3a9521247
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=206332
7 changed files with 111 additions and 0 deletions

View File

@ -88,6 +88,7 @@
SUBDIR += dkimap4
SUBDIR += dkimproxy
SUBDIR += dovecot
SUBDIR += dovecot-antispam
SUBDIR += dovecot-sieve
SUBDIR += drac
SUBDIR += drbl

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
---------------------------------------------------------------------

View File

@ -0,0 +1,3 @@
lib/dovecot/imap/lib90_antispam_plugin.so
@dirrmtry lib/dovecot/imap
@dirrmtry lib/dovecot