http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5145
[EMAIL PROTECTED] changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.2.0 |3.1.8
------- Additional Comments From [EMAIL PROTECTED] 2006-12-02 20:54 -------
(In reply to comment #0)
> If $self->{determine_receive_date} is true (which there is four ways it can
> be), scan_file() will read the headers to feed them to
> M::SA::Util::receive_date(). Unfortunately, this causes them to be lost if a
> target is '-' (stdin).
Hrm. Yeah, AI doesn't handle STDIN so well. It really expects to get a list of
files and directories, STDIN/"-" is this extra hackish thing mostly because perl
will accept "-" for open().
> Easiest fix would probably be always to write standard input to a temporary
> file in sa-learn (not only if mb[o]x format is specified).
I can live with that.
> $ sa-learn --spam file1 :mbox:- < mbox1
> ? The code in sa-learn only checks $targets[0].)
Part of me would want to tell you to just run "sa-learn --spam file1
:mbox:mbox1" which will work fine.
So IMO what should happen is:
a) go through all the targets and look for "-"
b) the first time "-" is found, generate a temp file and shove STDIN into it
c) if "-" is found more than once, remove it from the target list
I'm tempted to remove the current hackish STDIN/"-" support from ArchiveIterator
and just make it only deal with proper files and directories, perhaps even
punting when it gets "-".
I'll see if I can get a patch done up this week.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.