diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2015-05-31 22:16:19 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2015-05-31 22:16:19 +0800 |
commit | ffc820460a1b7929c1a03a8a7d20bf31f6ff0ef7 (patch) | |
tree | fcf171063e920724185a8543392bdcb788a5136a /mail | |
parent | a7781cae72f0bec8cec00e677e8bb7bed9029649 (diff) | |
download | freebsd-ports-gnome-ffc820460a1b7929c1a03a8a7d20bf31f6ff0ef7.tar.gz freebsd-ports-gnome-ffc820460a1b7929c1a03a8a7d20bf31f6ff0ef7.tar.zst freebsd-ports-gnome-ffc820460a1b7929c1a03a8a7d20bf31f6ff0ef7.zip |
- Revive mail/smfsav
- Fix staging
- Add LICENSE_FILE
- Modernize pthread flags usage
- Modernize user/group handling
- Regenerate patches
- Pass maintainership to submitter
PR: 199081
Submitted by: sasaki@fcc.ad.jp
Diffstat (limited to 'mail')
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/smfsav/Makefile | 44 | ||||
-rw-r--r-- | mail/smfsav/distinfo | 2 | ||||
-rw-r--r-- | mail/smfsav/files/patch-readme | 28 | ||||
-rw-r--r-- | mail/smfsav/files/patch-smf-sav.c | 57 | ||||
-rw-r--r-- | mail/smfsav/files/patch-smf-sav.conf | 28 | ||||
-rw-r--r-- | mail/smfsav/files/pkg-message.in | 9 | ||||
-rw-r--r-- | mail/smfsav/files/smfsav.in | 23 | ||||
-rw-r--r-- | mail/smfsav/pkg-descr | 11 | ||||
-rw-r--r-- | mail/smfsav/pkg-plist | 5 |
10 files changed, 208 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index ca30952c93fc..576d96894f95 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -599,6 +599,7 @@ SUBDIR += simscan SUBDIR += slapd-cyrus SUBDIR += sma + SUBDIR += smfsav SUBDIR += smtp-cli SUBDIR += smtp-gated SUBDIR += smtpfeed diff --git a/mail/smfsav/Makefile b/mail/smfsav/Makefile new file mode 100644 index 000000000000..be42fa67475a --- /dev/null +++ b/mail/smfsav/Makefile @@ -0,0 +1,44 @@ +# Created by: Anton Lysenok <bart@tapolsky.net.ua> +# $FreeBSD$ + +PORTNAME= smfsav +PORTVERSION= 1.4.0 +PORTREVISION= 1 +CATEGORIES= mail +MASTER_SITES= SF/smfs +DISTNAME= smf-sav-${PORTVERSION} +DIST_SUBDIR= ${PORTNAME} + +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/smfsav +SUB_FILES+= pkg-message + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/readme + +do-build: + cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${STAGEDIR}${PREFIX}/sbin/smfsav + ${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${STAGEDIR}${PREFIX}/etc/smfsav.conf.sample + @${MKDIR} ${STAGEDIR}${SMFSAV_RUN_DIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ChangeLog readme ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> diff --git a/mail/smfsav/distinfo b/mail/smfsav/distinfo new file mode 100644 index 000000000000..d0d4b3c15b33 --- /dev/null +++ b/mail/smfsav/distinfo @@ -0,0 +1,2 @@ +SHA256 (smfsav/smf-sav-1.4.0.tar.gz) = 77a28d012330581b5ecaf126a153f049731c399e294aab0ded53c1b0abab68cc +SIZE (smfsav/smf-sav-1.4.0.tar.gz) = 21968 diff --git a/mail/smfsav/files/patch-readme b/mail/smfsav/files/patch-readme new file mode 100644 index 000000000000..9b25eef732d5 --- /dev/null +++ b/mail/smfsav/files/patch-readme @@ -0,0 +1,28 @@ +--- readme.orig 2006-10-25 20:15:10 UTC ++++ readme +@@ -38,21 +38,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/smfsav.conf file. + +-/usr/local/sbin/smf-sav ++%%PREFIX%%/sbin/smfsav + or +-/usr/local/sbin/smf-sav -c /etc/mail/smfs/smf-sav.conf ++%%PREFIX%%/sbin/smfsav -c %%PREFIX%%/etc/smfsav.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 +- +-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. ++INPUT_MAIL_FILTER(`smfsav', `S=unix:/var/run/smfsav/smfsav.sock, T=S:30s;R:4m')dnl + + IMPORTANT: make sure that libmilter is compiled with BROKEN_PTHREAD_SLEEP defined. + If this symbol is not defined, libmilter will use sleep() in signal-handler thread, diff --git a/mail/smfsav/files/patch-smf-sav.c b/mail/smfsav/files/patch-smf-sav.c new file mode 100644 index 000000000000..0aca2ba525e0 --- /dev/null +++ b/mail/smfsav/files/patch-smf-sav.c @@ -0,0 +1,57 @@ +--- smf-sav.c.orig 2006-10-25 20:15:10 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 "/usr/local/etc/smfsav.conf" + #define PUBLIC_NAME "yourhost.yourdomain.tld" + #define SAFE_CALLBACK "postmaster@yourdomain.tld" + #define SYSLOG_FACILITY LOG_MAIL +@@ -81,9 +69,9 @@ + #define TO_PASS_TTL 3600 + #define TO_TEMPFAIL_TTL 300 + #define TO_FAIL_TTL 3600 +-#define WORK_SPACE "/var/run/smfs" +-#define OCONN "unix:" WORK_SPACE "/smf-sav.sock" +-#define USER "smfs" ++#define WORK_SPACE "/var/run/smfsav" ++#define OCONN "unix:" WORK_SPACE "/smfsav.sock" ++#define USER "smfsav" + + #define DNS_RETRANS 7 + #define DNS_RETRY 4 diff --git a/mail/smfsav/files/patch-smf-sav.conf b/mail/smfsav/files/patch-smf-sav.conf new file mode 100644 index 000000000000..7795ab461591 --- /dev/null +++ b/mail/smfsav/files/patch-smf-sav.conf @@ -0,0 +1,28 @@ +--- smf-sav.conf.orig 2006-10-25 20:15:10 UTC ++++ smf-sav.conf +@@ -1,4 +1,4 @@ +-# /etc/mail/smfs/smf-sav.conf ++# /usr/local/etc/smfsav.conf + # + # smf-sav configuration file v1.4.0 (it's read at start) + # +@@ -97,15 +97,15 @@ SafeCallBack postmaster@yourdomain.tld # + + # Run as a selected user (smf-sav must be started by root) + # +-# Default: smfs ++# Default: smfsav + # +-#User smfs ++#User smfsav + + # Socket used to communicate with a Sendmail daemon + # +-# Default: unix:/var/run/smfs/smf-sav.sock ++# Default: unix:/var/run/smfsav/smfsav.sock + # +-#Socket unix:/var/run/smfs/smf-sav.sock ++#Socket unix:/var/run/smfsav/smfsav.sock + + # Facility for logging via a Syslog daemon + # diff --git a/mail/smfsav/files/pkg-message.in b/mail/smfsav/files/pkg-message.in new file mode 100644 index 000000000000..fb09e6b3bee6 --- /dev/null +++ b/mail/smfsav/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(`smfsav', `S=unix:/var/run/smfsav/smfsav.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/files/smfsav.in b/mail/smfsav/files/smfsav.in new file mode 100644 index 000000000000..3611ba7b9096 --- /dev/null +++ b/mail/smfsav/files/smfsav.in @@ -0,0 +1,23 @@ +#!/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 +command="%%PREFIX%%/sbin/smfsav" + +load_rc_config ${name} +run_rc_command "$1" diff --git a/mail/smfsav/pkg-descr b/mail/smfsav/pkg-descr new file mode 100644 index 000000000000..77a6b0ac559b --- /dev/null +++ b/mail/smfsav/pkg-descr @@ -0,0 +1,11 @@ + 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. + +WWW: http://smfs.sourceforge.net/ diff --git a/mail/smfsav/pkg-plist b/mail/smfsav/pkg-plist new file mode 100644 index 000000000000..570e129f7bae --- /dev/null +++ b/mail/smfsav/pkg-plist @@ -0,0 +1,5 @@ +sbin/smfsav +etc/smfsav.conf.sample +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/readme +@dir(smfs,smfs,700) /var/run/smfsav |