Browse Source

dovecot-antispam: Updated (1.3 -> 2.0.0-9ce38021e8e7)

user/chris/test/early-mdev
Christian Wiese 14 years ago committed by Christian Wiese
parent
commit
c3f56dd856
  1. 48
      mail/dovecot-antispam/antispam-plugin.h.patch
  2. 20
      mail/dovecot-antispam/dovecot-antispam.conf
  3. 12
      mail/dovecot-antispam/dovecot-antispam.desc

48
mail/dovecot-antispam/antispam-plugin.h.patch

@ -1,48 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../dovecot-antispam/antispam-plugin.h.patch
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
X-Git-Url: http://git.sipsolutions.net/gitweb.cgi?p=dovecot-antispam.git;a=blobdiff_plain;f=antispam-plugin.h;h=493fd1eb0f6b4643e059e660b25aee81dd1336ba;hp=df59e88e10ce68bc4f6a2ea012487d566f6f3e14;hb=af0f8f8de27901e2efb9560a1fc66c7af3cd810b;hpb=8f7c08bc8a39c22b3cca1e306cf454d64b405b8c
diff --git a/antispam-plugin.h b/antispam-plugin.h
index df59e88..493fd1e 100644
--- a/antispam-plugin.h
+++ b/antispam-plugin.h
@@ -113,11 +113,24 @@ o_stream_create_from_fd(int fd, pool_t pool ATTR_UNUSED)
return o_stream_create_fd(fd, 0, TRUE);
}
+#if DOVECOT_VERSION_CODE(1, 2) == DOVECOT_VERSION
+static inline struct dict *
+string_dict_init(const char *uri, const char *username)
+{
+ const char *base_dir;
+
+ base_dir = getenv("BASE_DIR");
+ if (base_dir == NULL)
+ base_dir = "/var/run/dovecot";
+ return dict_init(uri, DICT_DATA_TYPE_STRING, username, base_dir);
+}
+#else /* 1.1 */
static inline struct dict *
string_dict_init(const char *uri, const char *username)
{
return dict_init(uri, DICT_DATA_TYPE_STRING, username);
}
+#endif
#elif DOVECOT_VERSION_CODE(1, 0) == DOVECOT_VERSION
#define ME(err)
#define PLUGIN_ID

20
mail/dovecot-antispam/dovecot-antispam.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../dovecot-antispam/dovecot-antispam.conf
# Copyright (C) 2008 - 2009 The OpenSDE Project
# Copyright (C) 2008 - 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -12,14 +12,15 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
autogen=0
hook_add preconf 5 "autoreconf -ivs -I m4 -I $( pkgprefix -r datadir dovecot )/aclocal"
# dovecot is mandantory
pkgprefix -t dovecot
# just doing minimal config adjustments, because the rest is done via makeopt's
hook_add preconf 5 "sed -e 's,\(DOVECOT\=\).*,\1,' defconfig > .config"
# we need to guide a bit where the dovecot headers are installed
var_append makeopt ' ' "DOVECOT=$root$( pkgprefix includedir dovecot )/dovecot"
# provide the path to 'dovecot-config'
var_append extraconfopt ' ' "--with-dovecot=$( pkgprefix -r libdir dovecot )/dovecot"
# backend (select exactly one)
# dspam-exec - direct dspam training by calling dspam executable
@ -30,10 +31,3 @@ var_append makeopt ' ' "DOVECOT=$root$( pkgprefix includedir dovecot )/dovecot"
if pkginstalled crm114 crm114-gerh; then
var_append makeopt ' ' "BACKEND=crm114-exec"
fi
# setting the right install directory
var_append makeopt ' ' "INSTALLDIR=$root$( pkgprefix libdir dovecot )/dovecot/imap"
makeinstopt="$makeopt install"
hook_add postmake 7 'cp -v antispam.7 $root$mandir/man7/'

12
mail/dovecot-antispam/dovecot-antispam.desc

@ -27,16 +27,18 @@
[T] tells the spam classifier that it made an error and needs to reclassify
[T] the message (as spam/not spam depending on which way it was moved.
[U] http://johannes.sipsolutions.net/Projects/dovecot-antispam
[U] http://wiki2.dovecot.org/Plugins/Antispam
[U] http://johannes.sipsolutions.net/Projects/dovecot-antispam (dovecot 1.x)
[A] Johannes Berg <johannes@sipsolutions.net>
[M] Christian Wiese <morfoh@opensde.org>
[A] Eugene Paskevich <eugene@raptor.kiev.ua>
[A] Johannes Berg <johannes@sipsolutions.net> (original author)
[M] Christian Wiese <chris@opensde.org>
[C] extra/tool
[L] GPL
[S] Beta
[V] 1.3
[V] 2.0.0-9ce38021e8e7
[P] X -----5---9 800.000
[D] 1600699422 dovecot-antispam-1.3.tar.bz2 http://johannes.sipsolutions.net/download/dovecot-antispam/
[D] 2922240569 dovecot-antispam-plugin-2.0.0-9ce38021e8e7.tar.bz2 !http://hg.dovecot.org/dovecot-antispam-plugin/archive/9ce38021e8e7.tar.bz2

Loading…
Cancel
Save