diff options
author | krion <krion@FreeBSD.org> | 2010-05-06 02:08:18 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2010-05-06 02:08:18 +0800 |
commit | db1ed2ada76e917c1b79f6fde9d43a29cbbc900d (patch) | |
tree | 053a6facb34f9e1ddf5a8dd6c45538a1c801692c /mail/exim | |
parent | b3a7f1d5c84ccc99c1a1f9618911ebb46f458e60 (diff) | |
download | freebsd-ports-gnome-db1ed2ada76e917c1b79f6fde9d43a29cbbc900d.tar.gz freebsd-ports-gnome-db1ed2ada76e917c1b79f6fde9d43a29cbbc900d.tar.zst freebsd-ports-gnome-db1ed2ada76e917c1b79f6fde9d43a29cbbc900d.zip |
"Spamooborona 1024" software by Yandex allows to filter up to 1024
good messages per day for any mailhost. It is to note: 1024 - it is
not the total amount of messages scanned but the only good ones,
which aren't considered as spam. Once 1024 good messages get passed
through the filter, the rest of mail traffic will be passed without
considering spam or ham until the end of the day.
http://so.yandex.ru/companies/so1024.xml
The patch allows use of "Spamooborona 1024" with Exim by using
Local_scan()'s functionality provided by Yandex LLC.
PR: ports/146215
Submitted by: Alexey V.Degtyarev <alexey@renatasystems.org>
Diffstat (limited to 'mail/exim')
-rw-r--r-- | mail/exim/Makefile | 41 | ||||
-rw-r--r-- | mail/exim/Makefile.options | 2 | ||||
-rw-r--r-- | mail/exim/distinfo | 3 | ||||
-rw-r--r-- | mail/exim/options | 1 | ||||
-rw-r--r-- | mail/exim/pkg-plist | 2 |
5 files changed, 48 insertions, 1 deletions
diff --git a/mail/exim/Makefile b/mail/exim/Makefile index b71026019872..602375eb0372 100644 --- a/mail/exim/Makefile +++ b/mail/exim/Makefile @@ -27,6 +27,21 @@ MAKE_JOBS_UNSAFE= yes .include <bsd.port.pre.mk> +.if defined(WITH_SA_EXIM) +.if defined(WITH_KAS) +IGNORE= You cannot select both SA_EXIM and KAS options +.endif +.if defined(WITH_SO_1024) +IGNORE= You cannot select both SA_EXIM and SO_1024 options +.endif +.endif + +.if defined(WITH_KAS) +.if defined(WITH_SO_1024) +IGNORE= You cannot select both SA_KAS and SO_1024 options +.endif +.endif + .if defined(WITH_SA_EXIM) MASTER_SITES+= http://marc.merlins.org/linux/exim/files/:sa_exim \ SF/sa-exim/sa-exim/${SA_EXIM_VERSION}:sa_exim @@ -34,8 +49,18 @@ MASTER_SITE_SUBDIR+= sa-exim/:sa_exim DISTFILES+= sa-exim-${SA_EXIM_VERSION}.tar.gz:sa_exim .endif +.if defined(WITH_SO_1024) +MASTER_SITES+= ftp://ftp.renatasystems.org/pub/FreeBSD/ports/distfiles/:so_1024 +DISTFILES+= spamooborona1024-src-${SO_1024_VERSION}.tar.gz:so_1024 +LDFLAGS+= -lz +PLIST_SUB+= SO_1024="" +.else +PLIST_SUB+= SO_1024="@comment " +.endif + EXIM_VERSION= 4.71 SA_EXIM_VERSION=4.2 +SO_1024_VERSION=3.2 .if !defined(EXIMON_ONLY) .if defined(PKGNAMESUFFIX) @@ -101,7 +126,7 @@ SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ -e 's,%%EXIM_GROUP%%,${EXIM_GROUP},g' \ -e 's,%%LOGDIR%%,${LOGDIR},g' -PLIST_SUB= EXIM_VERSION="${EXIM_VERSION}-${PORTREVISION}" \ +PLIST_SUB+= EXIM_VERSION="${EXIM_VERSION}-${PORTREVISION}" \ EXIM_USER=${EXIM_USER} \ EXIM_GROUP=${EXIM_GROUP} \ LOGDIR="${LOGDIR}" @@ -439,6 +464,9 @@ post-extract: .if defined(WITH_SA_EXIM) @cd ${WRKDIR} && ${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/sa-exim-${SA_EXIM_VERSION}.tar.gz ${EXTRACT_AFTER_ARGS} .endif +.if defined(WITH_SO_1024) + @cd ${WRKDIR} && ${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/spamooborona1024-src-${SO_1024_VERSION}.tar.gz ${EXTRACT_AFTER_ARGS} +.endif do-configure: @${MKDIR} ${WRKSRC}/Local @@ -467,6 +495,11 @@ do-configure: @${REINPLACE_CMD} -e 's,/usr/bin/spamc,${LOCALBASE}/bin/spamc,' \ ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.conf .endif +.if defined(WITH_SO_1024) + @${REINPLACE_CMD} -E -e 's/^(LOCAL_SCAN_SOURCE=).*/\1Local\/local_scan_1024.c/' \ + ${WRKSRC}/OS/Makefile-Default + @${CP} ${WRKDIR}/local_scan_1024.c ${WRKSRC}/Local +.endif @${REINPLACE_CMD} -E -e 's/XX_STRIPCMD_XX/${STRIP_CMD:S,/,\/,g}/' \ ${WRKSRC}/OS/Makefile-FreeBSD @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} configure) @@ -524,6 +557,12 @@ post-install: ${CP} ${PREFIX}/etc/exim/sa-exim.conf.default \ ${PREFIX}/etc/exim/sa-exim.conf .endif +.if defined(WITH_SO_1024) +.if !exists(/var/spool/spamooborona) + @${MKDIR} -m 750 /var/spool/spamooborona + @${CHOWN} ${EXIM_USER}:${EXIM_GROUP} /var/spool/spamooborona +.endif +.endif @${CAT} ${PKGMESSAGE} @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL diff --git a/mail/exim/Makefile.options b/mail/exim/Makefile.options index a7b029c253c9..ceadc83bb75c 100644 --- a/mail/exim/Makefile.options +++ b/mail/exim/Makefile.options @@ -49,6 +49,7 @@ PGSQL = "Link against libpq" READLINE = "Enable readline(3) library" SASLAUTHD = "Enable use of Cyrus SASL auth daemon" SA_EXIM = "SA-Exim support" +SO_1024 = "Build with Spamooborona-1024 local scan" SPF = "Enable Sender Policy Framework checking" SQLITE = "Enable SQLite lookups" SRS = "Enable Sender Rewriting Scheme" @@ -96,6 +97,7 @@ DISABLED_OPTIONS+= \ READLINE \ SASLAUTHD \ SA_EXIM \ + SO_1024 \ SPF \ SQLITE \ SRS \ diff --git a/mail/exim/distinfo b/mail/exim/distinfo index 369fc9aba564..ed44d9d86a3e 100644 --- a/mail/exim/distinfo +++ b/mail/exim/distinfo @@ -4,3 +4,6 @@ SIZE (exim/exim-4.71.tar.bz2) = 1560170 MD5 (exim/sa-exim-4.2.tar.gz) = ad76f73c6b3d01caa88078e3e622745a SHA256 (exim/sa-exim-4.2.tar.gz) = 72e0a735547f18b05785e6c58a71d24623858f0f5234a5dc0e24cb453999e99a SIZE (exim/sa-exim-4.2.tar.gz) = 66575 +MD5 (exim/spamooborona1024-src-3.2.tar.gz) = f7d23edf02752633377b08b1f2c413d7 +SHA256 (exim/spamooborona1024-src-3.2.tar.gz) = ab22a430f3860460045f6b213c68c89700a0cd10cbb6c7a808ece326c53787ee +SIZE (exim/spamooborona1024-src-3.2.tar.gz) = 8537 diff --git a/mail/exim/options b/mail/exim/options index f6619e8a4db7..b160f3e4d6aa 100644 --- a/mail/exim/options +++ b/mail/exim/options @@ -33,6 +33,7 @@ OPTIONS+= \ READLINE "Enable readline(3) library" off \ SASLAUTHD "Enable use of Cyrus SASL auth daemon" off \ SA_EXIM "SA-Exim support" off \ + SO_1024 "Build with Spamoborona-1024 local scan" off \ SPF "Enable Sender Policy Framework checking" off \ SQLITE "Enable SQLite lookups" off \ SRS "Enable Sender Rewriting Scheme" off \ diff --git a/mail/exim/pkg-plist b/mail/exim/pkg-plist index 31de806fdf32..ba5ebb09c7fb 100644 --- a/mail/exim/pkg-plist +++ b/mail/exim/pkg-plist @@ -52,3 +52,5 @@ etc/exim/configure.default %%SA_EXIM%%@exec [ -f %B/sa-exim.conf ] || cp %B/%f %B/sa-exim.conf @unexec rmdir %B 2> /dev/null || true @unexec rmdir %%LOGDIR%% 2> /dev/null || true +%%SO_1024%%@exec [ ! -d /var/spool/spamooborona ] && mkdir -m 750 /var/spool/spamooborona && chown %%EXIM_USER%%:%%EXIM_GROUP%% /var/spool/spamooborona || true +%%SO_1024%%@unexec rmdir /var/spool/spamooborona 2> /dev/null || true |