<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,8 +33,8 @@ sub initDaemon
     my ($self) = @_;
     
     unless (POSIX::setsid) {
-	EBox::debug ('Cannot start new session for ', $self-&gt;{'name'});
-	exit 1;
+        EBox::debug ('Cannot start new session for ', $self-&gt;{'name'});
+        exit 1;
     }
     
  #   foreach my $fd (0 .. 64) { POSIX::close($fd); }
@@ -42,8 +42,8 @@ sub initDaemon
     my $tmp = EBox::Config::tmp();
     open(STDIN,  &quot;+&lt;$tmp/stdin&quot;);
     if (EBox::Config::configkey('debug') eq 'yes') {
-	open(STDOUT, &quot;+&gt;$tmp/stout&quot;);
-	open(STDERR, &quot;+&gt;$tmp/stderr&quot;);
+        open(STDOUT, &quot;+&gt;$tmp/stout&quot;);
+        open(STDERR, &quot;+&gt;$tmp/stderr&quot;);
     }
     
 }
@@ -52,7 +52,7 @@ sub initDaemon
 sub run 
 {
     my ($self) = @_;
-	
+        
     EBox::init();
     
     $self-&gt;_checkMailfilter();
@@ -72,10 +72,10 @@ sub _checkMailfilter
     my $mf = EBox::Global-&gt;modInstance('mailfilter');
 
     if (not $mf-&gt;configured()) {
-	die &quot;Mailfilter module is not configured&quot;;
+        die &quot;Mailfilter module is not configured&quot;;
     }
     elsif (not $mf-&gt;isEnabled()) {
-	die &quot;Mailfilter module is not enabled&quot;;
+        die &quot;Mailfilter module is not enabled&quot;;
     }
 
     my $antispam = $mf-&gt;antispam();
@@ -104,32 +104,21 @@ sub _prepare
 
     my @users = qw(spam ham);
     foreach my $user (@users) {
-	my $account = $mailUserLdap-&gt;userAccount($user);
-	defined $account or
-	    next; 
-	
-	my ($mailName, $vdomain) = split '@', $account;
-	my $mailDir    = $mailUserLdap-&gt;maildir($mailName, $vdomain);
-	my $newMailDir = $mailDir. &quot;new&quot;;
-
-	$mailDirsByType{$user} = $newMailDir;
+        my $account = $mailUserLdap-&gt;userAccount($user);
+        defined $account or
+            next; 
+        
+        my ($mailName, $vdomain) = split '@', $account;
+        my $mailDir    = $mailUserLdap-&gt;maildir($mailName, $vdomain);
+        my $newMailDir = $mailDir. &quot;new&quot;;
+
+        $mailDirsByType{$user} = $newMailDir;
     }
 
 
 }
 
 
-sub _users
-{
-    my @users;
-    my $vdomains = EBox::MailFilter::VDomainsLdap-&gt;new();
-
-    push @users, 'spam' if $vdomains-&gt;spamAccount;
-    push @users, 'ham'  if $vdomains-&gt;hamAccount;
-
-    return \@users;
-}
-
 
 sub _mainloop
 {
@@ -138,34 +127,34 @@ sub _mainloop
     my $antispam =  EBox::Global-&gt;modInstance('mailfilter')-&gt;antispam();
 
     while (1) {
-	if ($wait) {
-	    sleep WAIT_INTERVAL;
-	}
-	$wait = 1;
-
-	while (my ($type, $dir) = each %mailDirsByType) {
-	    my $isSpam = ($type eq 'spam');
-
-	    opendir my $DH,  $dir or
-		die &quot;Cannot open directory $dir&quot;;
-	    while (my $msg = readdir($DH)) {
-		if (($msg eq '.') or ($msg eq '..')) {
-		    next;
-		}
-
-		my $path = &quot;$dir/$msg&quot;;
-
-		$antispam-&gt;learn(
-				 input =&gt; $path,
-				 isSpam =&gt; $isSpam,
-				);
-		unlink $path;
-		$wait = 0;
-	    }
-	    
-	    closedir $DH;
-	}
-	
+        if ($wait) {
+            sleep WAIT_INTERVAL;
+        }
+        $wait = 1;
+
+        while (my ($type, $dir) = each %mailDirsByType) {
+            my $isSpam = ($type eq 'spam');
+
+            opendir my $DH,  $dir or
+                die &quot;Cannot open directory $dir&quot;;
+            while (my $msg = readdir($DH)) {
+                if (($msg eq '.') or ($msg eq '..')) {
+                    next;
+                }
+
+                my $path = &quot;$dir/$msg&quot;;
+
+                $antispam-&gt;learn(
+                                 input =&gt; $path,
+                                 isSpam =&gt; $isSpam,
+                                );
+                unlink $path;
+                $wait = 0;
+            }
+            
+            closedir $DH;
+        }
+        
 
     }
     </diff>
      <filename>client/mailfilter/src/libexec/learnspamd</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>93eaedc48d0b15394f3df99026e571d17d15fe41</id>
    </parent>
  </parents>
  <author>
    <name>Javier Amor</name>
    <email>javier.amor.garcia@ebox-platform.com</email>
  </author>
  <url>http://github.com/koke/ebox/commit/38750c9ff750f4c32577d424cc19de75267e9edb</url>
  <id>38750c9ff750f4c32577d424cc19de75267e9edb</id>
  <committed-date>2009-06-17T19:10:44-07:00</committed-date>
  <authored-date>2009-04-13T00:32:04-07:00</authored-date>
  <message>untabified and removed unused sub

git-svn-id: file:///home/koke/ebox2git/svn/trunk@13200 866bc4c1-54da-0310-a958-9d5a9a0e8d04

Signed-off-by: Jorge Bernal &lt;jbernal@warp.es&gt;</message>
  <tree>a27ad7134c70c62baf00e15a3ace3c97fdbb83c8</tree>
  <committer>
    <name>Jorge Bernal</name>
    <email>jbernal@warp.es</email>
  </committer>
</commit>
