Tatsuki Sugiura wrote on 29/06/2006 05:55:
> "--config" option do not work properly, because $options{'config'}
> has scalar reference. Mail::SpamAassasin always fail to read config file.
> 
> Please remove key from %options, or use dereference (like
> ${options{'config'}}).
> # Now, I'll attach a patch of key remove version.

To be honest, I don't really understand your patch. How does removing
'config' from %options help? With that path, $options('config') is never
defined and thus spampd will never even try to read a config file.
Also, I must admit I'm not Perl expert, but why do the other references
work as expected while this one doesn't?

As far as I understand the problem, this should fix it, right? (Just
pasted here, so mind the unintended linebreaks)

Index: debian/patches/60-use-spampd-conf.dpatch
===================================================================
--- debian/patches/60-use-spampd-conf.dpatch    (revision 154)
+++ debian/patches/60-use-spampd-conf.dpatch    (revision 155)
@@ -5,9 +5,9 @@
 ## DP: Dont open user preferences for spamassassin

 @DPATCH@
-diff -urNad trunk/spampd /tmp/dpep.IFxtvg/trunk/spampd
---- trunk/spampd       2006-06-13 20:06:05.000000000 +0200
-+++ /tmp/dpep.IFxtvg/trunk/spampd      2006-06-13 20:07:52.078374699 +0200
+diff -urNad trunk/spampd /tmp/dpep.MJGYOf/trunk/spampd
+--- trunk/spampd       2006-06-29 16:15:09.000000000 +0200
++++ /tmp/dpep.MJGYOf/trunk/spampd      2006-06-29 16:28:56.009335675 +0200
 @@ -778,6 +778,7 @@
  my $satimeout = 285; # SpamAssassin timeout in seconds (15s less than
Postfix
                       # default for smtp_data_done_timeout)
@@ -42,7 +42,7 @@
 +      $assassin=Mail::SpamAssassin->new({
                'dont_copy_prefs' => 1,
                'debug' => $debug,
-+              'userprefs_filename' => $options{'config'},
++              'userprefs_filename' => ${$options{'config'}},
                'local_tests_only' => $options{'local-only'} || 0 });
 +} else {
 +      $assassin=Mail::SpamAssassin->new({


Regards,
Sven

PS: Other bug fixed in SVN, will wait with the upload until this one is
also resolved.

> -- System Information:
> Debian Release: testing/unstable
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: i386 (i686)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.16-2-k7-smp
> Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
> 
> Versions of packages spampd depends on:
> ii  adduser                       3.87       Add and remove users and groups
> ii  dpkg                          1.13.22    package maintenance system for 
> Deb
> ii  libnet-server-perl            0.90-1     An extensible, general perl 
> server
> ii  lsb-base                      3.1-10     Linux Standard Base 3.1 init 
> scrip
> ii  perl                          5.8.8-6    Larry Wall's Practical 
> Extraction 
> ii  spamassassin                  3.1.3-1    Perl-based spam filter using 
> text 
> 
> spampd recommends no packages.
> 
> -- no debconf information
> 
> 
> ------------------------------------------------------------------------
> 
> diff -ru spampd-2.30.old/debian/patches/60-use-spampd-conf.dpatch 
> spampd-2.30/debian/patches/60-use-spampd-conf.dpatch
> --- spampd-2.30.old/debian/patches/60-use-spampd-conf.dpatch  2006-06-29 
> 12:37:38.000000000 +0900
> +++ spampd-2.30/debian/patches/60-use-spampd-conf.dpatch      2006-06-29 
> 12:44:21.000000000 +0900
> @@ -5,9 +5,9 @@
>  ## DP: Dont open user preferences for spamassassin
>  
>  @DPATCH@
> -diff -urNad trunk/spampd /tmp/dpep.IFxtvg/trunk/spampd
> ---- trunk/spampd     2006-06-13 20:06:05.000000000 +0200
> -+++ /tmp/dpep.IFxtvg/trunk/spampd    2006-06-13 20:07:52.078374699 +0200
> +diff -urNad spampd-2.30~/spampd spampd-2.30/spampd
> +--- spampd-2.30~/spampd      2006-06-29 12:42:12.531795613 +0900
> ++++ spampd-2.30/spampd       2006-06-29 12:43:32.885080927 +0900
>  @@ -778,6 +778,7 @@
>   my $satimeout = 285; # SpamAssassin timeout in seconds (15s less than 
> Postfix 
>                        # default for smtp_data_done_timeout)
> @@ -16,15 +16,7 @@
>   my $user = 'mail'; # user to run as
>   my $group = 'mail'; # group to run as
>   my $tagall = 0; # mark-up all msgs with SA, not just spam
> -@@ -809,6 +810,7 @@
> -            relayhost => \$relayhost,
> -            relayport => \$relayport,
> -            pid => \$pidfile,
> -+           config => \$configfile,
> -            user => \$user,
> -            group => \$group,
> -            maxrequests => \$maxrequests,
> -@@ -845,6 +847,7 @@
> +@@ -845,6 +846,7 @@
>                  'debug|d',
>                  'help|h|?',
>                  'local-only|l',
> @@ -32,7 +24,7 @@
>                  'log-rules-hit|rh',
>                  'dose',
>                  'add-sc-header|ash',  # deprecated
> -@@ -884,10 +887,19 @@
> +@@ -884,10 +886,19 @@
>   $host = $tmp[0];
>   if ( $tmp[1] ) { $port = $tmp[1]; }
>   
> @@ -53,7 +45,7 @@
>   
>   $options{'auto-whitelist'} and eval {
>      require Mail::SpamAssassin::DBBasedAddrList;
> -@@ -897,7 +909,11 @@
> +@@ -897,7 +908,11 @@
>      $assassin->set_persistent_address_list_factory ($addrlistfactory);
>   };
>   
> @@ -66,7 +58,7 @@
>   
>   # thanks to Kurt Andersen for the 'uname -s' fix
>   if ( !$options{logsock} ) {
> -@@ -1087,6 +1103,7 @@
> +@@ -1087,6 +1102,7 @@
>   [B<--set-envelope-from|sef>]
>   [B<--auto-whitelist|aw>]
>   [B<--local-only|L>]
> @@ -74,7 +66,7 @@
>   [B<--debug|d>]
>   
>   B<spampd> B<--help>
> -@@ -1416,6 +1433,12 @@
> +@@ -1416,6 +1432,12 @@
>   
>   Turn off all SA network-based tests (DNS, Razor, etc).
>   



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to