I'm running spamassassin-2.55 and calling the sa-learn command from a perl script. In this script, I pipe the content of the message I want to learn from to the command:

my $cmd = "$path_to_sa_learn --spam --single -p $path_to_user_prefs";
my $fh = IO::File->new("| $cmd");
print $fh <STDIN>;

The problem is that I get a SIGPIPE after line 265 of my standard input. For example, if I set the following handler before the code above, I know it is being called:

$SIG{'PIPE'} = sub {
  die "error writing to pipe: $!";
};

So, is sa-learn meant to exit after reading so many lines from standard input? Is the number of lines defined somewhere? Is the number of lines configurable?

--
Marc Tardif
Sitepak
(514) 866-8883



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to