Package: spfmilter
Severity: important
Due to the way start-stop-daemon works, it is impossible (or at least
very difficult) to specify a useful -g option from the init script with
spfmilter. The start-stop-daemon program prevents arguments from being
properly quoted when specified in /etc/default/spfmilter, because it
does its own parsing of arguments, based upon whitespace.
The -g option specifies a default SPF record for domains which specify
none. SPF records normally contain spaces.
I have included a patch workaround with this report.
This could probably also be fixed with a patch to start-stop-daemon.
*** spfmilter.patch
--- spfmilter.c 2005-06-20 20:28:57.000000000 -0500
+++ spfmilter.c.new 2010-08-01 15:58:01.000000000 -0500
@@ -287,7 +287,7 @@
int
main( int argc, char** argv )
{
- char* guess_str;
+ char* guess_str, *tmp;
char* fallback_filename;
char* whitelist_filename;
char* user;
@@ -405,6 +405,12 @@
init_daemon();
init_pidfile( pidfile );
+ for (tmp = guess_str; *tmp; tmp++) {
+ if (*tmp == '_') {
+ *tmp = ' ';
+ }
+ }
+
syslog( LOG_NOTICE, "%s %s with %s starting", SPFMILTER_PROGRAM,
SPFMILTER_VERSION, lib_version() );
if ( smfi_main() == MI_FAILURE )
{
--- spfmilter.8 2005-05-20 14:10:24.000000000 -0500
+++ spfmilter.8.new 2010-08-01 16:07:50.000000000 -0500
@@ -49,7 +49,9 @@
.TP
.B --guess or -g
SPF mechanisms to use for any site which doesn't specify SPF rules of its
own.
-Something like "+a/24 +mx/24 +ptr ~all" might be good.
+Something like "+a/24_+mx/24_+ptr_~all" might be good. (Note: spaces are
+replaced with underscores, to ensure that this option works with
+start-stop-daemon.)
.TP
.B --fallback or -f
A file of SPF mechanisms to use for specific sites that don't specify
-- System Information:
Debian Release: lenny/sid
APT prefers hardy-updates
APT policy: (500, 'hardy-updates'), (500, 'hardy-security'),
(500, 'hardy-backports'), (500, 'hardy')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-23-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]