diff options
author | dbaio <dbaio@FreeBSD.org> | 2017-08-26 09:18:16 +0800 |
---|---|---|
committer | dbaio <dbaio@FreeBSD.org> | 2017-08-26 09:18:16 +0800 |
commit | 5b7b66aac8372d32b0b8b1e0de1bf0d645c277f6 (patch) | |
tree | 7f4c4a014f78c228a3ec52fb09f990ac31a30276 /mail | |
parent | b0a6ddc1b825ec43062f1b6be0c5f5fcfed83ae5 (diff) | |
download | freebsd-ports-gnome-5b7b66aac8372d32b0b8b1e0de1bf0d645c277f6.tar.gz freebsd-ports-gnome-5b7b66aac8372d32b0b8b1e0de1bf0d645c277f6.tar.zst freebsd-ports-gnome-5b7b66aac8372d32b0b8b1e0de1bf0d645c277f6.zip |
New port: mail/smfsav-devel
mail/smfsav -> mail/smfsav-devel
This is a fork of smf-sav which was originally written by Eugene Kurmanin.
It is a "reloaded" version with heavy bugfixes maintained by Gabriele
Maria Plutzar.
WWW: http://smf-sav.anw.at/
PR: 216669
Submitted by: Kan Sasaki <sasaki@fcc.ad.jp>
Diffstat (limited to 'mail')
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/smfsav-devel/Makefile | 52 | ||||
-rw-r--r-- | mail/smfsav-devel/distinfo | 3 | ||||
-rw-r--r-- | mail/smfsav-devel/files/patch-readme | 25 | ||||
-rw-r--r-- | mail/smfsav-devel/files/patch-smf-sav.c | 53 | ||||
-rw-r--r-- | mail/smfsav-devel/files/patch-smf-sav.conf | 20 | ||||
-rw-r--r-- | mail/smfsav-devel/files/pkg-message.in | 9 | ||||
-rw-r--r-- | mail/smfsav-devel/files/smfsav.in | 27 | ||||
-rw-r--r-- | mail/smfsav-devel/pkg-descr | 15 | ||||
-rw-r--r-- | mail/smfsav-devel/pkg-plist | 5 | ||||
-rw-r--r-- | mail/smfsav/Makefile | 2 |
11 files changed, 212 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index ce95095e454d..8a461d3321c2 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -643,6 +643,7 @@ SUBDIR += slapd-cyrus SUBDIR += sma SUBDIR += smfsav + SUBDIR += smfsav-devel SUBDIR += smtp-cli SUBDIR += smtp-gated SUBDIR += smtpfeed diff --git a/mail/smfsav-devel/Makefile b/mail/smfsav-devel/Makefile new file mode 100644 index 000000000000..08eb8b70cbe8 --- /dev/null +++ b/mail/smfsav-devel/Makefile @@ -0,0 +1,52 @@ +# Created by: Anton Lysenok <bart@tapolsky.net.ua> +# $FreeBSD$ + +PORTNAME= smfsav +PORTVERSION= 2.1 +CATEGORIES= mail +MASTER_SITES= http://smf-sav.anw.at/ +PKGNAMESUFFIX= -devel +DISTNAME= smf-sav-reloaded-${PORTVERSION} + +MAINTAINER= sasaki@fcc.ad.jp +COMMENT= Sendmail Sender Address Validator + +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +USERS= smfs +GROUPS= smfs + +OPTIONS_DEFINE= DOCS + +USE_RC_SUBR= smfsav + +CPPFLAGS+= -D_REENTRANT +LDFLAGS+= -lmilter -lpthread + +SMFSAV_RUN_DIR?=/var/run/smfs +PLIST_SUB= SMFSAV_RUN_DIR=${SMFSAV_RUN_DIR} +SUB_FILES+= pkg-message +SUB_LIST= ${PLIST_SUB} + +CONFLICTS= smfsav + +.include <bsd.port.pre.mk> +.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/readme + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.c + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.conf + +do-build: + cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${STAGEDIR}${PREFIX}/etc/smf-sav.conf.sample + @${MKDIR} ${STAGEDIR}${SMFSAV_RUN_DIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ChangeLog readme ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.post.mk> diff --git a/mail/smfsav-devel/distinfo b/mail/smfsav-devel/distinfo new file mode 100644 index 000000000000..369eeaee5eb8 --- /dev/null +++ b/mail/smfsav-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1503277712 +SHA256 (smf-sav-reloaded-2.1.tar.gz) = 3e3fd5deed7ea30204b8ed1be0bba7da8bd0b5af055aa72e9094e2a6b5891760 +SIZE (smf-sav-reloaded-2.1.tar.gz) = 23356 diff --git a/mail/smfsav-devel/files/patch-readme b/mail/smfsav-devel/files/patch-readme new file mode 100644 index 000000000000..53b9e9d0af20 --- /dev/null +++ b/mail/smfsav-devel/files/patch-readme @@ -0,0 +1,25 @@ +--- readme.orig 2012-04-08 16:07:48 UTC ++++ readme +@@ -50,18 +50,18 @@ Under FreeBSD the BIND v8 is required (p + make + make install + +- Inspect and edit the /etc/mail/smfs/smf-sav.conf file. ++ Inspect and edit the %%PREFIX%%/etc/smf-sav.conf file. + +-/usr/local/sbin/smf-sav ++%%PREFIX%%/sbin/smf-sav + or +-/usr/local/sbin/smf-sav -c /etc/mail/smfs/smf-sav.conf ++%%PREFIX%%/sbin/smf-sav -c %%PREFIX%%/etc/smf-sav.conf + + Add this milter to start-up scripts before starting a Sendmail daemon. + Look at the contributed samples of start-up scripts. + + Add these lines to your Sendmail configuration file (usually sendmail.mc): + define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')dnl +-INPUT_MAIL_FILTER(`smf-sav', `S=unix:/var/run/smfs/smf-sav.sock, T=S:30s;R:4m')dnl ++INPUT_MAIL_FILTER(`smf-sav', `S=unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock, T=S:30s;R:4m')dnl + + IMPORTANT: make sure that /var/run is not a group writable directory! If so, + or chmod 755 /var/run, or if it's impossible switch to another directory. diff --git a/mail/smfsav-devel/files/patch-smf-sav.c b/mail/smfsav-devel/files/patch-smf-sav.c new file mode 100644 index 000000000000..2a0377158cef --- /dev/null +++ b/mail/smfsav-devel/files/patch-smf-sav.c @@ -0,0 +1,53 @@ +--- smf-sav.c.orig 2013-05-25 11:48:52 UTC ++++ smf-sav.c +@@ -20,11 +20,7 @@ + #endif + + #include <arpa/inet.h> +-#if __linux__ || __sun__ + #include <arpa/nameser.h> +-#else +-#include <bind/arpa/nameser.h> +-#endif + #include <ctype.h> + #include <errno.h> + #include <fcntl.h> +@@ -33,20 +29,12 @@ + #endif + #include <grp.h> + #include <libmilter/mfapi.h> +-#if __linux__ || __sun__ + #include <netdb.h> +-#else +-#include <bind/netdb.h> +-#endif + #include <netinet/in.h> + #include <pthread.h> + #include <pwd.h> + #include <regex.h> +-#if __linux__ || __sun__ + #include <resolv.h> +-#else +-#include <bind/resolv.h> +-#endif + #include <signal.h> + #include <stdio.h> + #include <stdlib.h> +@@ -68,7 +56,7 @@ + #define hash_size(x) ((unsigned long) 1 << x) + #define hash_mask(x) (hash_size(x) - 1) + +-#define CONFIG_FILE "/etc/mail/smfs/smf-sav.conf" ++#define CONFIG_FILE "%%PREFIX%%/etc/smf-sav.conf" + #define PUBLIC_NAME "yourhost.yourdomain.tld" + #define SAFE_CALLBACK "postmaster@yourdomain.tld" + #define SYSLOG_FACILITY LOG_MAIL +@@ -81,7 +69,7 @@ + #define TO_PASS_TTL 3600 + #define TO_TEMPFAIL_TTL 300 + #define TO_FAIL_TTL 3600 +-#define WORK_SPACE "/var/run/smfs" ++#define WORK_SPACE "%%SMFSAV_RUN_DIR%%" + #define OCONN "unix:" WORK_SPACE "/smf-sav.sock" + #define USER "smfs" + diff --git a/mail/smfsav-devel/files/patch-smf-sav.conf b/mail/smfsav-devel/files/patch-smf-sav.conf new file mode 100644 index 000000000000..afc32277eaf1 --- /dev/null +++ b/mail/smfsav-devel/files/patch-smf-sav.conf @@ -0,0 +1,20 @@ +--- smf-sav.conf.orig 2012-04-08 17:04:38 UTC ++++ smf-sav.conf +@@ -1,4 +1,4 @@ +-# /etc/mail/smfs/smf-sav.conf ++# %%PREFIX%%/etc/smf-sav.conf + # + # smf-sav configuration file v2.0 + # pre initialisised with useful values +@@ -173,9 +173,9 @@ ToFailTTL 10h # recipients that did not + + # Socket used to communicate with a Sendmail daemon + # +-# Default: unix:/var/run/smfs/smf-sav.sock ++# Default: unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock + # +-Socket unix:/var/run/smfs/smf-sav.sock ++Socket unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock + + # Facility for logging via a Syslog daemon + # diff --git a/mail/smfsav-devel/files/pkg-message.in b/mail/smfsav-devel/files/pkg-message.in new file mode 100644 index 000000000000..77bae9cd74a6 --- /dev/null +++ b/mail/smfsav-devel/files/pkg-message.in @@ -0,0 +1,9 @@ + +===================================================================================== +1. Inspect and edit the %%PREFIX%%/etc/smfsav.conf file +2. Add these lines to your Sendmail configuration file (usually sendmail.mc): + define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')dnl + INPUT_MAIL_FILTER(`smf-sav', `S=unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock, T=S:30s;R:4m')dnl +3. Put line smfsav_enable="YES" to /etc/rc.conf file +4. Run `service smfsav start` +===================================================================================== diff --git a/mail/smfsav-devel/files/smfsav.in b/mail/smfsav-devel/files/smfsav.in new file mode 100644 index 000000000000..1d2da180a471 --- /dev/null +++ b/mail/smfsav-devel/files/smfsav.in @@ -0,0 +1,27 @@ +#!/bin/sh + +# PROVIDE: smfsav +# REQUIRE: NETWORKING +# BEFORE: sendmail + +# Written for FreeBSD. +# +# $FreeBSD$ +# +# Copy this file into /usr/local/etc/rc.d as /usr/local/etc/rc.d/smfsav +# Add this line to /etc/rc.conf: +# +# smfsav_enable="YES" + +. /etc/rc.subr + +name="smfsav" +rcvar=smfsav_enable + +load_rc_config ${name} + +required_files=${smfsav_config:="%%PREFIX%%/etc/smf-sav.conf"} +command="%%PREFIX%%/sbin/smf-sav" +command_args="-c ${required_files}" + +run_rc_command "$1" diff --git a/mail/smfsav-devel/pkg-descr b/mail/smfsav-devel/pkg-descr new file mode 100644 index 000000000000..a03e9cf403a5 --- /dev/null +++ b/mail/smfsav-devel/pkg-descr @@ -0,0 +1,15 @@ +It's a lightweight, fast and reliable Sendmail milter that implements +a real-time Sender e-Mail Address Verification technology. This technology +can stop some kinds of SPAM with a spoofed sender's e-Mail address. +Also it implements a real-time Recipient e-Mail Address Verification +technology. It can be useful if your machine is a backup MX for the recipient's +domains or if your machine forwards all e-Mail messages as a relay host for your +domains to another internal or external e-Mail servers. +It's a lite alternative for the spamilter, milter-sender and milter-ahead +milters. + +This is a fork of smf-sav which was originally written by Eugene Kurmanin. +It is a "reloaded" version with heavy bugfixes maintained by Gabriele +Maria Plutzar. + +WWW: http://smf-sav.anw.at/ diff --git a/mail/smfsav-devel/pkg-plist b/mail/smfsav-devel/pkg-plist new file mode 100644 index 000000000000..57d750adc6fb --- /dev/null +++ b/mail/smfsav-devel/pkg-plist @@ -0,0 +1,5 @@ +sbin/smf-sav +@sample etc/smf-sav.conf.sample +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/readme +@dir(smfs,smfs,700) %%SMFSAV_RUN_DIR%% diff --git a/mail/smfsav/Makefile b/mail/smfsav/Makefile index 32d7c56868a3..78755ce4e55b 100644 --- a/mail/smfsav/Makefile +++ b/mail/smfsav/Makefile @@ -29,6 +29,8 @@ SMFSAV_RUN_DIR?=/var/run/smfs PLIST_SUB= SMFSAV_RUN_DIR=${SMFSAV_RUN_DIR} SUB_FILES+= pkg-message +CONFLICTS= smfsav-devel + .include <bsd.port.pre.mk> .include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" |