You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Daniel Seichter <da...@dseichter.de> on 2006/10/09 20:08:59 UTC

sa-learn: option to delete "learn-mails"

Hello,

Is there a way to delete all "learned" mails out of a mbox folder? I want to
add a standard folder on my IMAP server which is called spam_learn and the
user (at the moment only myself) can move messages to this folder in his
mailreader. A cronjob now check this folder and learns what is spam. At the
moment it works fine, but the problem is, that I want to delete this
messages after they are read. But within the help of sa-learn I didn't find
an option like --delete-learned or something else.
Do you have any ideas how to resolve this?

Using:
Spamassassin 3.1.3 on ubuntu 6.06.1

Thank you

Daniel 


Re: sa-learn: option to delete "learn-mails"

Posted by Bob McClure Jr <bo...@bobcatos.com>.
On Mon, Oct 09, 2006 at 02:38:41PM -0700, John D. Hardin wrote:
> On Mon, 9 Oct 2006, Bob McClure Jr wrote:
> 
> > Why not add "; > $myuser/spam_learn"
> 
> "&& > $myuser/spam_learn"  would be better. "&&" means "only execute
> if the preceding step completed successfully". That way if sa-learn
> fails you won't delete an unlearned mailbox.

Good point.  I was hasty.

Also the OP emailed me directly asking (implying, actually) about the
need for locking.  I thought the risk pretty small, but suggested
"lockmail" available in the maildrop package.

> --
>  John Hardin KA7OHZ    ICQ#15735746    http://www.impsec.org/~jhardin/
>  jhardin@impsec.org    FALaholic #11174    pgpk -a jhardin@impsec.org
>  key: 0xB8732E79 - 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
bob@bobcatos.com             http://www.bobcatos.com
"Where you go in the hereafter depends on what you were after here."
  - Thanks to Graffiti, 2 March 2004

Re: sa-learn: option to delete "learn-mails"

Posted by "John D. Hardin" <jh...@impsec.org>.
On Mon, 9 Oct 2006, Bob McClure Jr wrote:

> Why not add "; > $myuser/spam_learn"

"&& > $myuser/spam_learn"  would be better. "&&" means "only execute
if the preceding step completed successfully". That way if sa-learn
fails you won't delete an unlearned mailbox.

--
 John Hardin KA7OHZ    ICQ#15735746    http://www.impsec.org/~jhardin/
 jhardin@impsec.org    FALaholic #11174    pgpk -a jhardin@impsec.org
 key: 0xB8732E79 - 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
 Windows and its users got mentioned at home today, after my wife the
 psych major brought up Seligman's theory of "learned helplessness."
					     -- Dan Birchall in a.s.r
-----------------------------------------------------------------------


Re: sa-learn: option to delete "learn-mails"

Posted by Bob McClure Jr <bo...@bobcatos.com>.
On Mon, Oct 09, 2006 at 08:08:59PM +0200, Daniel Seichter wrote:
> Hello,
> 
> Is there a way to delete all "learned" mails out of a mbox folder? I want to
> add a standard folder on my IMAP server which is called spam_learn and the
> user (at the moment only myself) can move messages to this folder in his
> mailreader. A cronjob now check this folder and learns what is spam. At the
> moment it works fine, but the problem is, that I want to delete this
> messages after they are read. But within the help of sa-learn I didn't find
> an option like --delete-learned or something else.
> Do you have any ideas how to resolve this?
> 
> Using:
> Spamassassin 3.1.3 on ubuntu 6.06.1
> 
> Thank you
> 
> Daniel 

Why not add "; > $myuser/spam_learn" (where $myuser is the path to the
directory containing spam_learn) to then end of the cronjob?  That
will leave the file intact with existing perms, but make it zero
length.

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
bob@bobcatos.com             http://www.bobcatos.com
"Where you go in the hereafter depends on what you were after here."
  - Thanks to Graffiti, 2 March 2004