Package: sa-learn-cyrus
Version: 0.3.2-2
Severity: important
Tags: patch

Users of my system uses russian names of mail folders and these names contain 
spaces. sa-lear-cyrus don;t escape spaces and special character "&" in command 
line.
In result, sa-learn and ipurge don't look these directories.
Second bug: if unixhierarchysep are yes, sa-learn-cyrus replaces only first 
point in mailbox name ("." -> "/"), all other leaves in the path.

Patch:
==============
--- /usr/sbin/sa-learn-cyrus    2013-11-28 20:31:23.000000000 +0000             
                                          
+++ ./sa-learn-cyrus    2013-11-28 20:48:04.000000000 +0000                     
                                          
@@ -262,9 +262,9 @@                                                             
                                          
         for my $learn ('spam' , 'ham') {                                       
                                          
             my $learn_folder = $conf{"mailbox:$learn" . '_folder'};            
                                          
             # if unixhierarchy is set, veryify folderstring [FM]               
                                          
-            $learn_folder =~ s/\./\// if $conf{'imap:unixhierarchysep'} =~ 
/^[yY]/;                                      
+            $learn_folder =~ s/\./\//g if $conf{'imap:unixhierarchysep'} =~ 
/^[yY]/;                                     
             my $learn_path = $learn_folder;                                    
                                          
-            $learn_path =~ s/\./\//;                                           
                                          
+            $learn_path =~ s/\./\//g;
             $learn_folder = 
"$imap_mail_box$imap_unixhierarchysep$learn_folder";
             $learn_path = $imap_mail_path . '/' . $learn_path;
 
@@ -277,7 +277,7 @@
                 $args[0] .= " --prefspath=$conf{'sa:prefs_file'}";
                 $args[0] .= " --siteconfigpath=$conf{'sa:site_config_path'}";
                 $args[0] .= ' --' . $learn; 
-                $args[0] .= " --dir $learn_path";
+                $args[0] .= " --dir '$learn_path'";
                 $args[0] .= " -D" if $conf{'sa:debug'} =~ /^[yY]/;
                 $args[0] .= " 1>$tmp_file";
                 $args[0] .= ' 2>&1';
@@ -307,9 +307,9 @@
                         log_msg('info', "  Purging learned $learn mails from 
folder '$learn_folder'") if $OPT{'verbose'} > 0;
                         my @args;
                         my ($tmp, $tmp_file)  = new_temp_file(\%conf);
-                        my $cmd =  "$conf{'imap:purge_cmd'} -f -b 0 
$learn_folder";
+                        my $cmd =  "$conf{'imap:purge_cmd'} -f -b 0 
'$learn_folder'";
                         $cmd .= '@' . $domain unless $domain eq '';
-                        $args[0] = "su $conf{'imap:user'} -c '$cmd'";
+                        $args[0] = "su $conf{'imap:user'} -c \"$cmd\"";
                         $args[0] .= " 1>$tmp_file";
                         $args[0] .= " 2>&1";
                         log_msg('info', "  Executing '@args'") if 
$OPT{'verbose'} > 2;
==============

-- System Information:
Debian Release: 6.0.8
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.33.7-co-0.7.9 (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages sa-learn-cyrus depends on:
ii  cyrus-imapd-2.2       2.2.13-19+squeeze3 Cyrus mail system - IMAP support
ii  perl                  5.10.1-17squeeze6  Larry Wall's Practical Extraction 
ii  spamassassin          3.3.1-1.1          Perl-based spam filter using text 

sa-learn-cyrus recommends no packages.

sa-learn-cyrus suggests no packages.

-- Configuration Files:
/etc/mail/spamassassin/sa-learn-cyrus.conf changed [not included]

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to