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>
This commit is contained in:
parent
2ab318bfcd
commit
004fd3218c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=448747
@ -643,6 +643,7 @@
|
||||
SUBDIR += slapd-cyrus
|
||||
SUBDIR += sma
|
||||
SUBDIR += smfsav
|
||||
SUBDIR += smfsav-devel
|
||||
SUBDIR += smtp-cli
|
||||
SUBDIR += smtp-gated
|
||||
SUBDIR += smtpfeed
|
||||
|
52
mail/smfsav-devel/Makefile
Normal file
52
mail/smfsav-devel/Makefile
Normal file
@ -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>
|
3
mail/smfsav-devel/distinfo
Normal file
3
mail/smfsav-devel/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1503277712
|
||||
SHA256 (smf-sav-reloaded-2.1.tar.gz) = 3e3fd5deed7ea30204b8ed1be0bba7da8bd0b5af055aa72e9094e2a6b5891760
|
||||
SIZE (smf-sav-reloaded-2.1.tar.gz) = 23356
|
25
mail/smfsav-devel/files/patch-readme
Normal file
25
mail/smfsav-devel/files/patch-readme
Normal file
@ -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.
|
53
mail/smfsav-devel/files/patch-smf-sav.c
Normal file
53
mail/smfsav-devel/files/patch-smf-sav.c
Normal file
@ -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"
|
||||
|
20
mail/smfsav-devel/files/patch-smf-sav.conf
Normal file
20
mail/smfsav-devel/files/patch-smf-sav.conf
Normal file
@ -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
|
||||
#
|
9
mail/smfsav-devel/files/pkg-message.in
Normal file
9
mail/smfsav-devel/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(`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`
|
||||
=====================================================================================
|
27
mail/smfsav-devel/files/smfsav.in
Normal file
27
mail/smfsav-devel/files/smfsav.in
Normal file
@ -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"
|
15
mail/smfsav-devel/pkg-descr
Normal file
15
mail/smfsav-devel/pkg-descr
Normal file
@ -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/
|
5
mail/smfsav-devel/pkg-plist
Normal file
5
mail/smfsav-devel/pkg-plist
Normal file
@ -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%%
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user