- 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
This commit is contained in:
parent
a57077a834
commit
5fe3c7426c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=388093
1
GIDs
1
GIDs
|
@ -158,6 +158,7 @@ rancid:*:286:
|
|||
backuppc:*:300:
|
||||
_sphinx:*:312:
|
||||
dkfilter:*:325:
|
||||
smfs:*:326:
|
||||
daapd:*:337:
|
||||
murmur:*:338:
|
||||
wildfire:*:340:
|
||||
|
|
1
MOVED
1
MOVED
|
@ -6675,7 +6675,6 @@ mail/rabl_server||2014-09-01|Not staged
|
|||
mail/relay-ctrl||2014-09-01|Not staged
|
||||
mail/reply-o-matic||2014-09-01|Not staged
|
||||
mail/sccmilter||2014-09-01|Not staged
|
||||
mail/smfsav||2014-09-01|Not staged
|
||||
mail/softfail||2014-09-01|Not staged
|
||||
mail/spmfilter-spamassassin||2014-09-01|Not staged
|
||||
mail/synonym||2014-09-01|Not staged
|
||||
|
|
1
UIDs
1
UIDs
|
@ -164,6 +164,7 @@ rancid:*:286:286::0:0:RANCID daemon user:/usr/local/var/rancid:/bin/sh
|
|||
backuppc:*:300:300::0:0:BackupPC pseudo-user:/nonexistent:/usr/sbin/nologin
|
||||
_sphinx:*:312:312::0:0:Sphinxsearch Owner:/nonexistent:/usr/sbin/nologin
|
||||
dkfilter:*:325:325::0:0:DK Filter Owner:/nonexistent:/usr/sbin/nologin
|
||||
smfs:*:326:326::0:0:SMFSAV Owner:/nonexistent:/usr/sbin/nologin
|
||||
_pma:*:336:80::0:0:phpMyAdmin Owner:/nonexistent:/usr/sbin/nologin
|
||||
daapd:*:337:337::0:0:daapd User:/nonexistent:/usr/sbin/nologin
|
||||
murmur:*:338:338::0:0:& User:/nonexistent:/usr/sbin/nologin
|
||||
|
|
|
@ -599,6 +599,7 @@
|
|||
SUBDIR += simscan
|
||||
SUBDIR += slapd-cyrus
|
||||
SUBDIR += sma
|
||||
SUBDIR += smfsav
|
||||
SUBDIR += smtp-cli
|
||||
SUBDIR += smtp-gated
|
||||
SUBDIR += smtpfeed
|
||||
|
|
44
mail/smfsav/Makefile
Normal file
44
mail/smfsav/Makefile
Normal file
|
@ -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>
|
2
mail/smfsav/distinfo
Normal file
2
mail/smfsav/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (smfsav/smf-sav-1.4.0.tar.gz) = 77a28d012330581b5ecaf126a153f049731c399e294aab0ded53c1b0abab68cc
|
||||
SIZE (smfsav/smf-sav-1.4.0.tar.gz) = 21968
|
28
mail/smfsav/files/patch-readme
Normal file
28
mail/smfsav/files/patch-readme
Normal file
|
@ -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,
|
57
mail/smfsav/files/patch-smf-sav.c
Normal file
57
mail/smfsav/files/patch-smf-sav.c
Normal file
|
@ -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
|
28
mail/smfsav/files/patch-smf-sav.conf
Normal file
28
mail/smfsav/files/patch-smf-sav.conf
Normal file
|
@ -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
|
||||
#
|
9
mail/smfsav/files/pkg-message.in
Normal file
9
mail/smfsav/files/pkg-message.in
Normal file
|
@ -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`
|
||||
=====================================================================================
|
23
mail/smfsav/files/smfsav.in
Normal file
23
mail/smfsav/files/smfsav.in
Normal file
|
@ -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"
|
11
mail/smfsav/pkg-descr
Normal file
11
mail/smfsav/pkg-descr
Normal file
|
@ -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/
|
5
mail/smfsav/pkg-plist
Normal file
5
mail/smfsav/pkg-plist
Normal file
|
@ -0,0 +1,5 @@
|
|||
sbin/smfsav
|
||||
etc/smfsav.conf.sample
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
|
||||
%%PORTDOCS%%%%DOCSDIR%%/readme
|
||||
@dir(smfs,smfs,700) /var/run/smfsav
|
Loading…
Reference in New Issue
Block a user