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

Collapse All | Expand All

(-)Makefile (-4 / +6 lines)
Lines 25-42 Link Here
25
CPPFLAGS+=	-D_REENTRANT
25
CPPFLAGS+=	-D_REENTRANT
26
LDFLAGS+=	-lmilter -lpthread
26
LDFLAGS+=	-lmilter -lpthread
27
27
28
SMFSAV_RUN_DIR?=/var/run/smfsav
28
SMFSAV_RUN_DIR?=/var/run/smfs
29
SUB_FILES+=	pkg-message
29
SUB_FILES+=	pkg-message
30
30
31
post-patch:
31
post-patch:
32
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/readme
32
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/readme
33
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.c
34
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.conf
33
35
34
do-build:
36
do-build:
35
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS}
37
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS}
36
38
37
do-install:
39
do-install:
38
	${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${STAGEDIR}${PREFIX}/sbin/smfsav
40
	${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${STAGEDIR}${PREFIX}/sbin
39
	${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${STAGEDIR}${PREFIX}/etc/smfsav.conf.sample
41
	${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${STAGEDIR}${PREFIX}/etc/smf-sav.conf.sample
40
	@${MKDIR} ${STAGEDIR}${SMFSAV_RUN_DIR}
42
	@${MKDIR} ${STAGEDIR}${SMFSAV_RUN_DIR}
41
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
43
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
42
	cd ${WRKSRC} && ${INSTALL_DATA} ChangeLog readme ${STAGEDIR}${DOCSDIR}
44
	cd ${WRKSRC} && ${INSTALL_DATA} ChangeLog readme ${STAGEDIR}${DOCSDIR}
(-)files/patch-readme (-17 / +6 lines)
Lines 1-28 Link Here
1
--- readme.orig	2006-10-25 20:15:10 UTC
1
--- readme.orig	2006-10-26 05:15:10.000000000 +0900
2
+++ readme
2
+++ readme	2015-06-02 13:24:39.167974000 +0900
3
@@ -38,21 +38,18 @@ Under FreeBSD the BIND v8 is required (p
3
@@ -38,11 +38,11 @@
4
 make
4
 make
5
 make install
5
 make install
6
 
6
 
7
-  Inspect and edit the /etc/mail/smfs/smf-sav.conf file.
7
-  Inspect and edit the /etc/mail/smfs/smf-sav.conf file.
8
+  Inspect and edit the %%PREFIX%%/etc/smfsav.conf file.
8
+  Inspect and edit the %%PREFIX%%/etc/smf-sav.conf file.
9
 
9
 
10
-/usr/local/sbin/smf-sav
10
-/usr/local/sbin/smf-sav
11
+%%PREFIX%%/sbin/smfsav
11
+%%PREFIX%%/sbin/smf-sav
12
 or
12
 or
13
-/usr/local/sbin/smf-sav -c /etc/mail/smfs/smf-sav.conf
13
-/usr/local/sbin/smf-sav -c /etc/mail/smfs/smf-sav.conf
14
+%%PREFIX%%/sbin/smfsav -c %%PREFIX%%/etc/smfsav.conf
14
+%%PREFIX%%/sbin/smf-sav -c %%PREFIX%%/etc/smf-sav.conf
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
-
23
-IMPORTANT: make sure that /var/run is not a group writable directory! If so,
24
-or chmod 755 /var/run, or if it's impossible switch to another directory.
25
+INPUT_MAIL_FILTER(`smfsav', `S=unix:/var/run/smfsav/smfsav.sock, T=S:30s;R:4m')dnl
26
 
27
 IMPORTANT: make sure that libmilter is compiled with BROKEN_PTHREAD_SLEEP defined.
28
 If this symbol is not defined, libmilter will use sleep() in signal-handler thread,
(-)files/patch-smf-sav.c (-16 / +3 lines)
Lines 1-5 Link Here
1
--- smf-sav.c.orig	2006-10-25 20:15:10 UTC
1
--- smf-sav.c.orig	2006-10-26 05:15:10.000000000 +0900
2
+++ smf-sav.c
2
+++ smf-sav.c	2015-06-02 13:30:44.250725000 +0900
3
@@ -20,11 +20,7 @@
3
@@ -20,11 +20,7 @@
4
 #endif
4
 #endif
5
 
5
 
Lines 38-57 Link Here
38
 #define hash_mask(x)		(hash_size(x) - 1)
38
 #define hash_mask(x)		(hash_size(x) - 1)
39
 
39
 
40
-#define CONFIG_FILE		"/etc/mail/smfs/smf-sav.conf"
40
-#define CONFIG_FILE		"/etc/mail/smfs/smf-sav.conf"
41
+#define CONFIG_FILE		"/usr/local/etc/smfsav.conf"
41
+#define CONFIG_FILE		"%%PREFIX%%/etc/smf-sav.conf"
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,9 +69,9 @@
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 OCONN			"unix:" WORK_SPACE "/smf-sav.sock"
51
-#define USER			"smfs"
52
+#define WORK_SPACE		"/var/run/smfsav"
53
+#define OCONN			"unix:" WORK_SPACE "/smfsav.sock"
54
+#define USER			"smfsav"
55
 
56
 #define DNS_RETRANS		7
57
 #define DNS_RETRY		4
(-)files/patch-smf-sav.conf (-23 / +3 lines)
Lines 1-28 Link Here
1
--- smf-sav.conf.orig	2006-10-25 20:15:10 UTC
1
--- smf-sav.conf.orig	2006-10-26 05:15:10.000000000 +0900
2
+++ smf-sav.conf
2
+++ smf-sav.conf	2015-06-02 13:32:07.814150000 +0900
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
+# /usr/local/etc/smfsav.conf
5
+# %%PREFIX%%/etc/smf-sav.conf
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
@@ -97,15 +97,15 @@ SafeCallBack	postmaster@yourdomain.tld	#
10
 
11
 # Run as a selected user (smf-sav must be started by root)
12
 #
13
-# Default: smfs
14
+# Default: smfsav
15
 #
16
-#User		smfs
17
+#User		smfsav
18
 
19
 # Socket used to communicate with a Sendmail daemon
20
 #
21
-# Default: unix:/var/run/smfs/smf-sav.sock
22
+# Default: unix:/var/run/smfsav/smfsav.sock
23
 #
24
-#Socket		unix:/var/run/smfs/smf-sav.sock
25
+#Socket		unix:/var/run/smfsav/smfsav.sock
26
 
27
 # Facility for logging via a Syslog daemon
28
 #
(-)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(`smfsav', `S=unix:/var/run/smfsav/smfsav.sock, T=S:30s;R:4m')dnl
6
    INPUT_MAIL_FILTER(`smf-sav', `S=unix:/var/run/smfs/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
=====================================================================================
(-)files/smfsav.in (-1 / +5 lines)
Lines 17-23 Link Here
17
17
18
name="smfsav"
18
name="smfsav"
19
rcvar=smfsav_enable
19
rcvar=smfsav_enable
20
command="%%PREFIX%%/sbin/smfsav"
21
20
22
load_rc_config ${name}
21
load_rc_config ${name}
22
23
required_files=${smfsav_config:="%%PREFIX%%/etc/smf-sav.conf"}
24
command="%%PREFIX%%/sbin/smf-sav"
25
command_args="-c ${required_files}"
26
23
run_rc_command "$1"
27
run_rc_command "$1"
(-)pkg-plist (-3 / +3 lines)
Lines 1-5 Link Here
1
sbin/smfsav
1
sbin/smf-sav
2
etc/smfsav.conf.sample
2
etc/smf-sav.conf.sample
3
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
3
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
4
%%PORTDOCS%%%%DOCSDIR%%/readme
4
%%PORTDOCS%%%%DOCSDIR%%/readme
5
@dir(smfs,smfs,700) /var/run/smfsav
5
@dir(smfs,smfs,700) /var/run/smfs

Return to bug 199081