Fixed &User::Utmp::USER_PROCESS FC5 incompatiblity.
[PerlMail.git] / perlmail-accept
index f2e12ec..f058618 100755 (executable)
@@ -166,7 +166,7 @@ sub useridle
        my($idlebest,$linebest);
        for my $utmp (User::Utmp::getut(),{ "ut_line"=>"psaux" }) {
                local $_;
-               next if defined($_=$utmp->{"ut_type"}) && $_!=User::Utmp::USER_PROCESS;
+               next if defined($_=$utmp->{"ut_type"}) && $_!=User::Utmp::USER_PROCESS();
                next if defined($_=$utmp->{"ut_user"}) && !$valid_users{$_};
                my $line="/dev/".$utmp->{"ut_line"};
                my $atime=(stat $line)[8];
@@ -192,6 +192,12 @@ sub body_first
        return $first;
 }
 
+sub is_multipart
+{
+       return 0 if !$Audit->is_mime();
+       return $Audit->is_multipart();
+}
+
 sub mimehead
 {
 my($part)=@_;
@@ -512,7 +518,7 @@ sub spamassassin
 {
 my($cmd)=@_;
 
-       $cmd||="$HOME/bin/spamassassin --exit-code 1";
+       $cmd||="spamassassin --exit-code 1";
        # spamassassin has the specified exit code if IS spam, code 0 if NOT spam
        # See &_spamchildcode for the code 1.
        local *CHILD;