Date: Fri, 25 Feb 2005 00:15:45 +0100 From: Piotr Smyrak <piotr.smyrak@heron.pl> To: perl@FreeBSD.org Subject: proposition regarding mail/p5-Mail-SpanAssassin Message-ID: <20050225001545.09220bec@smyru>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Dear Maintainers,
I would like to ask for your opinion on the attached patch to
mail/p5-Spam-Assassin. It adds a knob WITH_SOCKET that enables
starting SA with Unix socket instead of IP port.
This is might be helpful - besides myself - for people that want to
spare some megas of RAM, since socket SA keeps just two pids running
contrary to port SA that starts by default in summary 7 processes.
Best regards,
--
Piotr Smyrak
piotr.smyrak@heron.pl
[-- Attachment #2 --]
diff -Naru p5-Mail-SpamAssassin.orig/Makefile p5-Mail-SpamAssassin/Makefile
--- p5-Mail-SpamAssassin.orig/Makefile Thu Feb 24 23:52:15 2005
+++ p5-Mail-SpamAssassin/Makefile Fri Feb 25 00:06:42 2005
@@ -51,6 +51,10 @@
USE_SQLDB= yes
.endif
+.if defined(WITH_SOCKET)
+SOCKET= --socketpath=${WITH_SOCKET}
+.endif
+
MAN3= Mail::SpamAssassin.3 \
Mail::SpamAssassin::ArchiveIterator.3 \
Mail::SpamAssassin::AutoWhitelist.3 \
@@ -87,7 +91,8 @@
USE_RC_SUBR= yes
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
- -e 's|%%RC_SUBR%%|${RC_SUBR}|g'
+ -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
+ -e 's|%%WITH_SOCKET%%|${WITH_SOCKET}|g'
.if defined(USE_SQLDB)
SED_SCRIPT+= -e 's|%%SQL%%|-Q|g'
.else
@@ -97,13 +102,14 @@
pre-patch:
@${ECHO_MSG} ""
@${ECHO_MSG} "================================================================"
- @${ECHO_MSG} "You can use folowed options to install SpamAssassin with"
+ @${ECHO_MSG} "You can use followed options to install SpamAssassin with"
@${ECHO_MSG} " an addition features:"
@${ECHO_MSG} ""
- @${ECHO_MSG} "WITHOUT_SSL=yes - disable SSL,"
- @${ECHO_MSG} "WITH_MYSQL=yes - add MySQL support,"
- @${ECHO_MSG} "WITH_PGSQL=yes - add PostgreSQL support,"
- @${ECHO_MSG} "WITH_SPF_QUERY=yes - add SPF query support."
+ @${ECHO_MSG} "WITHOUT_SSL=yes - disable SSL,"
+ @${ECHO_MSG} "WITH_MYSQL=yes - add MySQL support,"
+ @${ECHO_MSG} "WITH_PGSQL=yes - add PostgreSQL support,"
+ @${ECHO_MSG} "WITH_SPF_QUERY=yes - add SPF query support."
+ @${ECHO_MSG} "WITH_SOCKET=/socket/path - use Unix socket not IP port"
@${ECHO_MSG} "================================================================"
@${ECHO_MSG} ""
diff -Naru p5-Mail-SpamAssassin.orig/files/spamd.sh p5-Mail-SpamAssassin/files/spamd.sh
--- p5-Mail-SpamAssassin.orig/files/spamd.sh Thu Feb 24 23:52:15 2005
+++ p5-Mail-SpamAssassin/files/spamd.sh Fri Feb 25 00:06:52 2005
@@ -35,7 +35,7 @@
spamd_enable=${spamd_enable:-"NO"}
spamd_pidfile=${spamd_pidfile:-"/var/run/spamd.pid"}
-spamd_flags=${spamd_flags:-"-c -d %%SQL%% -r ${spamd_pidfile}"}
+spamd_flags=${spamd_flags:-"-c -d %%SQL%% -r ${spamd_pidfile}%%SOCKET%%"}
load_rc_config $name
run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050225001545.09220bec>
