Networking Forums

Networking Forums > Computer Networking > Linux Networking > bogofilter

Reply
 
 
Tim Hammerquist
Guest
Posts: n/a

 
      09-23-2003, 01:53 AM
Greg graced us by uttering:
> When I cd to the $HOME/myname/Mail/spam/cur, where I have 6000
> spam messages and type bogofilter -S, nothing happens. It
> neither returns to the command line nor provides any indication
> that it's rating the spam.


It's not rating the spam. It's blocking for input. If you type:

% bogofilter -S

at the shell prompt, bogofilter will wait, blocking for input on
stdin. If you type:

% bogofilter -S *

it will abort execution with an error message. bogofilter's
manpage says:

DESCRIPTION

[...] In its normal mode of operation, it takes an email
message or other text on standard input

This means that data for bogofilter to process comes on stdin; it
does not take input as arguments on the command line, and it does
not automatically process mail in the current directory.

> Is this something to do with the format of the mail files


No.

> or have I got to use different syntax when telling bogofilter
> to rate all the files in a directory
> (eg bogofilter -S < /home/myname/Mail/spam/cur)


You're almost there.

% bogofilter -S < /home/myname/Mail/spam/cur/*
Here's the trick -----^

HTH,
Tim Hammerquist
--
Engineers understand that their appearance only bothers
other people and therefore it is not worth optimizing.
-- Scott Adams, "The Dilbert Principle"
 
Reply With Quote
 
 
 
 
Bill Marcum
Guest
Posts: n/a

 
      09-23-2003, 06:02 PM
On Wed, 24 Sep 2003 10:01:15 +0100, Greg
<(E-Mail Removed)> wrote:
>
>> % bogofilter -S < /home/myname/Mail/spam/cur/*
>> Here's the trick -----^

>
> Thanks for the prompt response Tim.
>
> When I do that on bash, bogofilter reports
> "ambiguous redirect"
>
> Am I still doing something wrong? Perhaps I need a more up-to-date version
> (not sure which version I've got but I downloaded it about a year ago)?
>
> Cheers,
>
> Greg #)


Try this:
cat /home/myname/Mail/spam/cur/* | bogofilter -S

--
Commander Spiral Pyjama Pseudo-Rhinocerous Feline Thingamajig Bill Marcum
(the First)
Ozy and Millie Name Generator http://heifong.phase.org/omname.php
 
Reply With Quote
 
Tim Hammerquist
Guest
Posts: n/a

 
      09-23-2003, 07:27 PM
Greg graced us by uttering:
>
>> % bogofilter -S < /home/myname/Mail/spam/cur/*
>> Here's the trick -----^

>
> Thanks for the prompt response Tim.
>
> When I do that on bash, bogofilter reports
> "ambiguous redirect"
>
> Am I still doing something wrong? Perhaps I need a more
> up-to-date version (not sure which version I've got but I
> downloaded it about a year ago)?


I typically use zsh for interactive session and it works fine
with the above syntax.

When I try bash, I get the same result as you:

bash: Mail/spam/cur/*: ambiguous redirect

BTW, that's _bash_ reporting the ambiguous redirect, not
bogofilter. Note the "bash: " prefixed to the error msg.

I'm not sure why bash thinks that's ambiguous, or maybe it's
input redirection isn't as robust as zsh, but you can try:

cat /home/myname/Mail/spam/cur/* | bogofilter -S

....which works for me in bash.

BTW, as I note you're sending the contents of the spam/ folder to
bogofilter, you're aware that the -S tells bogofilter to
UNregister the content as spam, right?

-n -- content on stdin is to be registered as NOT_SPAM
-N -- content on stdin is to be UNregistered as NOT_SPAM
-s -- content on stdin is to be registered as SPAM
-S -- content on stdin is to be UNregistered as SPAM

HTH,
Tim Hammerquist
--
It is my job in life to travel all roads, so that some may take the road
less travelled, and others the road more travelled, and all have a
pleasant day.
-- Larry Wall in <(E-Mail Removed)>
 
Reply With Quote
 
Tim Hammerquist
Guest
Posts: n/a

 
      09-23-2003, 07:36 PM
Tim Hammerquist graced us by uttering:
> I'm not sure why bash thinks that's ambiguous, or maybe it's
> input redirection isn't as robust as zsh, but you can try:
>
> cat /home/myname/Mail/spam/cur/* | bogofilter -S
>
> ...which works for me in bash.


The above looks obscene to me, and a sure candidate for the UUOC
Award, but I can't seem to think of a solution that works with
bash's input redirection. Can anyone think of a more graceful
solution for bash?

Tim Hammerquist
--
When you say "I wrote a program that crashed Windows", people just stare at
you blankly and say "Hey, I got those with the system, *for free*".
-- Linus Torvalds
 
Reply With Quote
 
Greg
Guest
Posts: n/a

 
      09-24-2003, 02:03 AM
When I cd to the
$HOME/myname/Mail/spam/cur, where I have 6000 spam messages and type
bogofilter -S, nothing happens. It neither returns to the command line nor
provides any indication that it's rating the spam.

Is this something to do with the format of the mail files (plain text in
normal directories - not MDX??) or have I got to use different syntax when
telling bogofilter to rate all the files in a directory (eg bogofilter -S
< /home/myname/Mail/spam/cur) though, as it happens, this guess doesn't
work!!

HELP PLEASE

Greg, again ;o)
 
Reply With Quote
 
Greg
Guest
Posts: n/a

 
      09-24-2003, 09:01 AM

> % bogofilter -S < /home/myname/Mail/spam/cur/*
> Here's the trick -----^


Thanks for the prompt response Tim.

When I do that on bash, bogofilter reports
"ambiguous redirect"

Am I still doing something wrong? Perhaps I need a more up-to-date version
(not sure which version I've got but I downloaded it about a year ago)?

Cheers,

Greg #)
 
Reply With Quote
 
Tim Hammerquist
Guest
Posts: n/a

 
      09-24-2003, 02:57 PM
Greg graced us by uttering:
> BTW what is UUOC?


http://google.com/search?q=UUOC

Cheers!
Tim Hammerquist
--
'Manners' evolve to avoid conflict in crowded situations.
Usenet (and this newsgroup in particular) is crowded.
-- Tad McClellan in comp.lang.perl.misc
 
Reply With Quote
 
Greg
Guest
Posts: n/a

 
      09-25-2003, 10:19 AM
I installed the z shell (ZSH) and
"bogofilter -s < /home/myname/Mail/spam/cur/*" worked fine.

BTW what is UUOC?

Thanks Tim & others )

Greg

 
Reply With Quote
 
Greg
Guest
Posts: n/a

 
      09-26-2003, 12:45 AM
On Wed, 24 Sep 2003 07:57:04 -0700, Tim Hammerquist wrote:

> Greg graced us by uttering:
>> BTW what is UUOC?

>
> http://google.com/search?q=UUOC
>
> Cheers!
> Tim Hammerquist


WTACT.CG = Well That's All Clear Then. Cheers, Greg

YNFAN; = You 'Nix folk are nutty ;o)
YUFAN;
YLFAN;
...
 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      10-10-2003, 05:44 PM
On 23 Sep 2003 12:36:15 -0700, Tim Hammerquist
<(E-Mail Removed)> wrote:
> Tim Hammerquist graced us by uttering:
>> I'm not sure why bash thinks that's ambiguous, or maybe it's
>> input redirection isn't as robust as zsh, but you can try:
>>
>> cat /home/myname/Mail/spam/cur/* | bogofilter -S
>>
>> ...which works for me in bash.

>
> The above looks obscene to me, and a sure candidate for the UUOC
> Award, but I can't seem to think of a solution that works with
> bash's input redirection. Can anyone think of a more graceful
> solution for bash?
>

That's not a useless use of cat, that's what cat is for. You can't
redirect a file descriptor to more than one file at a time, except in
zsh.


--
Cheops' Law:
Nothing ever gets built on schedule or within budget.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bogofilter training and fetchmail multiple collects Greg Linux Networking 1 09-21-2003 07:07 PM



1 2 3 4 5 6 7 8 9 10 11