View | Details | Raw Unified | Return to bug 216652 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-3 / +5 lines)
Lines 28-41 Link Here
28
SMFSAV_RUN_DIR?=/var/run/smfs
28
SMFSAV_RUN_DIR?=/var/run/smfs
29
PLIST_SUB=	SMFSAV_RUN_DIR=${SMFSAV_RUN_DIR}
29
PLIST_SUB=	SMFSAV_RUN_DIR=${SMFSAV_RUN_DIR}
30
SUB_FILES+=	pkg-message
30
SUB_FILES+=	pkg-message
31
SUB_LIST:=	${PLIST_SUB}
31
32
32
.include <bsd.port.pre.mk>
33
.include <bsd.port.pre.mk>
33
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
34
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
34
35
35
post-patch:
36
post-patch:
36
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/readme
37
.for f in readme smf-sav.c smf-sav.conf
37
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.c
38
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
38
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.conf
39
		-e 's|%%SMFSAV_RUN_DIR%%|${SMFSAV_RUN_DIR}|g' ${WRKSRC}/${f}
40
.endfor
39
41
40
do-build:
42
do-build:
41
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS}
43
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS}
(-)files/patch-readme (-3 / +18 lines)
Lines 1-6 Link Here
1
--- readme.orig	2006-10-26 05:15:10.000000000 +0900
1
--- readme.orig	2006-10-25 20:15:10 UTC
2
+++ readme	2015-06-02 13:24:39.167974000 +0900
2
+++ readme
3
@@ -38,11 +38,11 @@
3
@@ -38,18 +38,18 @@ Under FreeBSD the BIND v8 is required (p
4
 make
4
 make
5
 make install
5
 make install
6
 
6
 
Lines 15-17 Link Here
15
 
15
 
16
   Add this milter to start-up scripts before starting a Sendmail daemon.
16
   Add this milter to start-up scripts before starting a Sendmail daemon.
17
 Look at the contributed samples of start-up scripts.
17
 Look at the contributed samples of start-up scripts.
18
 
19
   Add these lines to your Sendmail configuration file (usually sendmail.mc):
20
 define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')dnl
21
-INPUT_MAIL_FILTER(`smf-sav', `S=unix:/var/run/smfs/smf-sav.sock, T=S:30s;R:4m')dnl
22
+INPUT_MAIL_FILTER(`smf-sav', `S=unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock, T=S:30s;R:4m')dnl
23
 
24
 IMPORTANT: make sure that /var/run is not a group writable directory! If so,
25
 or chmod 755 /var/run, or if it's impossible switch to another directory.
26
@@ -145,4 +145,4 @@ SMFS development blog (opened for all):
27
 http://smfs.sourceforge.net/
28
 http://sourceforge.net/projects/smfs/
29
 http://kurmanin.info/
30
-    
31
\ No newline at end of file
32
+    
(-)files/patch-smf-sav.c (-2 / +11 lines)
Lines 1-5 Link Here
1
--- smf-sav.c.orig	2006-10-26 05:15:10.000000000 +0900
1
--- smf-sav.c.orig	2006-10-25 20:15:10 UTC
2
+++ smf-sav.c	2015-06-02 13:30:44.250725000 +0900
2
+++ smf-sav.c
3
@@ -20,11 +20,7 @@
3
@@ -20,11 +20,7 @@
4
 #endif
4
 #endif
5
 
5
 
Lines 42-44 Link Here
42
 #define PUBLIC_NAME		"yourhost.yourdomain.tld"
42
 #define PUBLIC_NAME		"yourhost.yourdomain.tld"
43
 #define SAFE_CALLBACK		"postmaster@yourdomain.tld"
43
 #define SAFE_CALLBACK		"postmaster@yourdomain.tld"
44
 #define SYSLOG_FACILITY		LOG_MAIL
44
 #define SYSLOG_FACILITY		LOG_MAIL
45
@@ -81,7 +69,7 @@
46
 #define TO_PASS_TTL		3600
47
 #define TO_TEMPFAIL_TTL		300
48
 #define TO_FAIL_TTL		3600
49
-#define WORK_SPACE		"/var/run/smfs"
50
+#define WORK_SPACE		"%%SMFSAV_RUN_DIR%%"
51
 #define OCONN			"unix:" WORK_SPACE "/smf-sav.sock"
52
 #define USER			"smfs"
53
 
(-)files/patch-smf-sav.conf (-2 / +14 lines)
Lines 1-5 Link Here
1
--- smf-sav.conf.orig	2006-10-26 05:15:10.000000000 +0900
1
--- smf-sav.conf.orig	2006-10-25 20:15:10 UTC
2
+++ smf-sav.conf	2015-06-02 13:32:07.814150000 +0900
2
+++ smf-sav.conf
3
@@ -1,4 +1,4 @@
3
@@ -1,4 +1,4 @@
4
-# /etc/mail/smfs/smf-sav.conf
4
-# /etc/mail/smfs/smf-sav.conf
5
+# %%PREFIX%%/etc/smf-sav.conf
5
+# %%PREFIX%%/etc/smf-sav.conf
Lines 6-8 Link Here
6
 #
6
 #
7
 # smf-sav configuration file v1.4.0 (it's read at start)
7
 # smf-sav configuration file v1.4.0 (it's read at start)
8
 #
8
 #
9
@@ -103,9 +103,9 @@ SafeCallBack	postmaster@yourdomain.tld	#
10
 
11
 # Socket used to communicate with a Sendmail daemon
12
 #
13
-# Default: unix:/var/run/smfs/smf-sav.sock
14
+# Default: unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock
15
 #
16
-#Socket		unix:/var/run/smfs/smf-sav.sock
17
+#Socket		unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock
18
 
19
 # Facility for logging via a Syslog daemon
20
 #
(-)files/pkg-message.in (-1 / +1 lines)
Lines 3-9 Link Here
3
1. Inspect and edit the %%PREFIX%%/etc/smfsav.conf file
3
1. Inspect and edit the %%PREFIX%%/etc/smfsav.conf file
4
2. Add these lines to your Sendmail configuration file (usually sendmail.mc):
4
2. Add these lines to your Sendmail configuration file (usually sendmail.mc):
5
    define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')dnl
5
    define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')dnl
6
    INPUT_MAIL_FILTER(`smf-sav', `S=unix:/var/run/smfs/smf-sav.sock, T=S:30s;R:4m')dnl
6
    INPUT_MAIL_FILTER(`smf-sav', `S=unix:%%SMFSAV_RUN_DIR%%/smf-sav.sock, T=S:30s;R:4m')dnl
7
3. Put line smfsav_enable="YES" to /etc/rc.conf file
7
3. Put line smfsav_enable="YES" to /etc/rc.conf file
8
4. Run `service smfsav start`
8
4. Run `service smfsav start`
9
=====================================================================================
9
=====================================================================================

Return to bug 216652