aboutsummaryrefslogtreecommitdiff
path: root/mail/smfsav/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2008-02-17 21:16:46 +0000
committerPav Lucistnik <pav@FreeBSD.org>2008-02-17 21:16:46 +0000
commitc80e1983fbabc35a806e5bb81b8e4e01af02efb9 (patch)
treee287fbfa3c52c1fe70be85dcf01cfcc651e52005 /mail/smfsav/files
parente3301dcda29c98536690fdf6cdd74af25afc4e57 (diff)
downloadports-c80e1983fbabc35a806e5bb81b8e4e01af02efb9.tar.gz
ports-c80e1983fbabc35a806e5bb81b8e4e01af02efb9.zip
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/ PR: ports/116948 Submitted by: Anton Lysenok / Bart Tapolsky <bart@tapolsky.net.ua>
Notes
Notes: svn path=/head/; revision=207486
Diffstat (limited to 'mail/smfsav/files')
-rw-r--r--mail/smfsav/files/patch-Makefile48
-rw-r--r--mail/smfsav/files/patch-readme28
-rw-r--r--mail/smfsav/files/patch-smf-sav.c57
-rw-r--r--mail/smfsav/files/patch-smf-sav.conf28
-rw-r--r--mail/smfsav/files/pkg-message.in9
-rw-r--r--mail/smfsav/files/smfsav.in24
6 files changed, 194 insertions, 0 deletions
diff --git a/mail/smfsav/files/patch-Makefile b/mail/smfsav/files/patch-Makefile
new file mode 100644
index 000000000000..24e9994745eb
--- /dev/null
+++ b/mail/smfsav/files/patch-Makefile
@@ -0,0 +1,48 @@
+--- Makefile.orig 2006-10-25 23:15:10.000000000 +0300
++++ Makefile 2008-02-17 14:19:30.000000000 +0200
+@@ -1,17 +1,17 @@
+ CC = gcc
+ PREFIX = /usr/local
+ SBINDIR = $(PREFIX)/sbin
+-DATADIR = /var/run/smfs
+-CONFDIR = /etc/mail/smfs
+-USER = smfs
+-GROUP = smfs
+-CFLAGS = -O2 -D_REENTRANT -fomit-frame-pointer -I/usr/local/include
++DATADIR = /var/run/smfsav
++CONFDIR = $(PREFIX)/etc
++USER = smfsav
++GROUP = smfsav
++CFLAGS = -O2 -D_REENTRANT -fomit-frame-pointer -I../src/include
+
+ # Linux
+-LDFLAGS = -lmilter -lpthread -lresolv
++#LDFLAGS = -lmilter -lpthread -lresolv
+
+ # FreeBSD (BIND v8 is required)
+-#LDFLAGS = -lmilter -pthread -L/usr/local/lib -lbind_r
++LDFLAGS = -lmilter -pthread -L../src/lib -lbind_r
+
+ # Solaris
+ #LDFLAGS = -lmilter -lpthread -lsocket -lnsl -lresolv
+@@ -30,20 +30,3 @@
+
+ clean:
+ rm -f smf-sav.o smf-sav
+-
+-install:
+- @./install.sh
+- @cp -f -p smf-sav $(SBINDIR)
+- @if test ! -d $(DATADIR); then \
+- mkdir -m 700 $(DATADIR); \
+- chown $(USER):$(GROUP) $(DATADIR); \
+- fi
+- @if test ! -d $(CONFDIR); then \
+- mkdir -m 755 $(CONFDIR); \
+- fi
+- @if test ! -f $(CONFDIR)/smf-sav.conf; then \
+- cp -p smf-sav.conf $(CONFDIR)/smf-sav.conf; \
+- else \
+- cp -p smf-sav.conf $(CONFDIR)/smf-sav.conf.new; \
+- fi
+- @echo Please, inspect and edit the $(CONFDIR)/smf-sav.conf file.
diff --git a/mail/smfsav/files/patch-readme b/mail/smfsav/files/patch-readme
new file mode 100644
index 000000000000..d2daf8a5bc52
--- /dev/null
+++ b/mail/smfsav/files/patch-readme
@@ -0,0 +1,28 @@
+--- readme.orig 2006-10-25 23:15:10.000000000 +0300
++++ readme 2008-02-17 14:50:09.000000000 +0200
+@@ -38,21 +38,18 @@
+ make
+ make install
+
+- Inspect and edit the /etc/mail/smfs/smf-sav.conf file.
++ Inspect and edit the /usr/local/etc/smfsav.conf file.
+
+-/usr/local/sbin/smf-sav
++/usr/local/sbin/smfsav
+ or
+-/usr/local/sbin/smf-sav -c /etc/mail/smfs/smf-sav.conf
++/usr/local/sbin/smfsav -c /usr/local/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..6c1bbc21004a
--- /dev/null
+++ b/mail/smfsav/files/patch-smf-sav.c
@@ -0,0 +1,57 @@
+--- smf-sav.c.orig Wed Oct 25 23:15:10 2006
++++ smf-sav.c Wed Aug 29 15:54:13 2007
+@@ -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..e2d4aa44bb1f
--- /dev/null
+++ b/mail/smfsav/files/patch-smf-sav.conf
@@ -0,0 +1,28 @@
+--- smf-sav.conf.orig 2006-10-25 23:15:10.000000000 +0300
++++ smf-sav.conf 2008-02-17 14:25:26.000000000 +0200
+@@ -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 @@
+
+ # 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..8bfaf8488b02
--- /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 %%PREFIX%%/etc/rc.d/smfsav start
+=====================================================================================
diff --git a/mail/smfsav/files/smfsav.in b/mail/smfsav/files/smfsav.in
new file mode 100644
index 000000000000..0bb9d2a54208
--- /dev/null
+++ b/mail/smfsav/files/smfsav.in
@@ -0,0 +1,24 @@
+#!/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"
+
+. %%RC_SUBR%%
+
+name="smfsav"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/smfsav"
+
+load_rc_config ${name}
+run_rc_command "$1"
+