RE: Script question.
Kyle Quillen wrote: > Hello all, > > I have a bit of a problem. I am trying to come up with a solution > that I think will help a lot of people who use the qmail toaster mail > server. I have my toaster setup to drop mail tagged as spam into spam > directories in each users mailbox. I am planning on putting a Ham box > in their web mail as well. I would like to come up with a script for > the toaster community that will tell spamassassin to learn from the > mail in each of these directories on a regular basis. I would like > the script to delete mail in the spam and ham dirs on a regular basis. That is fairly easy to do and I think there has already been one script posted. I just wanted to comment on what it sounds like you are doing. Please make sure that you are only learning messages that have been sorted by a person. Otherwise, false positives and false negatives will very quickly make your Bayes DB useless. Leave the autolearning on if you like, but manual learning should be limited to manually sorted mail, otherwise it is not helpful. -- Bowie
Re: Script question.
On Tue, 31 Oct 2006, Kyle Quillen wrote: > I have my toaster setup to drop mail tagged as spam into spam > directories in each users mailbox. I am planning on putting a Ham box > in their web mail as well. I would like to come up with a script for > the toaster community that will tell spamassassin to learn from the mail > in each of these directories on a regular basis. I would like the > script to delete mail in the spam and ham dirs on a regular basis. I posted a script that does that (at least for mailboxes, not maildir) a bit ago... http://www.nabble.com/sa-learn-question-tf2320488.html#a6456600 Rather than deleting the messages, you might be better served by aging the files. If you need to wipe and retrain your Bayes database, or find out where it was mistrained, having the SPAM and HAM corpa can help a lot. -- John Hardin KA7OHZICQ#15735746http://www.impsec.org/~jhardin/ [EMAIL PROTECTED]FALaholic #11174pgpk -a [EMAIL PROTECTED] key: 0xB8732E79 - 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 --- ...the Fates notice those who buy chainsaws... -- www.darwinawards.com --- Today: Halloween
Script question.
Hello all, I have a bit of a problem. I am trying to come up with a solution that I think will help a lot of people who use the qmail toaster mail server. I have my toaster setup to drop mail tagged as spam into spam directories in each users mailbox. I am planning on putting a Ham box in their web mail as well. I would like to come up with a script for the toaster community that will tell spamassassin to learn from the mail in each of these directories on a regular basis. I would like the script to delete mail in the spam and ham dirs on a regular basis. Any help on this would be greatly apperciated. Thanks Kyle Quillen
Re: Dumb script question
Matt Kettler wrote: Jonathan Nichols wrote: Hi, for i in `ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur`; do sudo rm /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur/$i; done Although imapsalearn is easier. Regards, Rick I should get an extra shot of espresso when I hit up the coffee shop in the morning. That worked fine. thanks :D but, what is this imapsalearn you speak of? Google tells me "Your search - imapsalearn - did not match any documents. " I assume he means imap-sa-learn.pl: http://tirian.magd.ox.ac.uk/~nick/code/ Hi, Yup. that's the one I use. I recognise a programmers web page :) Regards, Rick
Re: Dumb script question
Jonathan Nichols wrote: > >> Hi, >> >> for i in `ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur`; do >> sudo rm /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur/$i; done >> >> Although imapsalearn is easier. >> >> Regards, >> >> Rick >> > > I should get an extra shot of espresso when I hit up the coffee shop in > the morning. That worked fine. thanks :D > > but, what is this imapsalearn you speak of? Google tells me "Your search > - imapsalearn - did not match any documents. " > I assume he means imap-sa-learn.pl: http://tirian.magd.ox.ac.uk/~nick/code/
Re: Dumb script question
Jonathan Nichols wrote: I should get an extra shot of espresso when I hit up the coffee shop in the morning. That worked fine. thanks :D but, what is this imapsalearn you speak of? Google tells me "Your search - imapsalearn - did not match any documents. " :( Hi, Glad it worked. I should have said imap sa-learn and a google search would have turned it right up. http://wiki.apache.org/spamassassin/RemoteImapFolder I use the dmzs (http://www.dmzs.com/tools/files/spam.phtml) program here (or something very similar, I installed it a year or more ago so I'm not sure which exact program I'm using) Regards, Rick
Re: Dumb script question
Hi, for i in `ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur`; do sudo rm /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur/$i; done Although imapsalearn is easier. Regards, Rick I should get an extra shot of espresso when I hit up the coffee shop in the morning. That worked fine. thanks :D but, what is this imapsalearn you speak of? Google tells me "Your search - imapsalearn - did not match any documents. " :(
Re: Dumb script question
Jonathan Nichols wrote: I have POP/IMAP/SMTP on a seperate box from the spamassassin/amavis box, and I'm trying to come up with a script to take stuff out of the shared-maildir where users deposit spam that slipped through, tar it up, and move it to the other box, where yet another script will feed it to bayes. Most everything works, except for the cleanup! For the life of me, I can't manage to not screw this step up. heh. [EMAIL PROTECTED] bin $ cat clear_up_spam.sh #!/bin/sh for i in `ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur`; do sudo rm $i; done [EMAIL PROTECTED] bin $ Ok, so if I do a ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur then I see all the files in the directory. If I run this script as it is, i get stuff like this: rm: cannot remove `1118786978.M908087P32756V0303I0010F8DD_119.mail,S=2390:2,S': No such file or directory rm: cannot remove `1118786978.M908337P32756V0303I0010F8DE_120.mail,S=2381:2,S': No such file or directory rm: cannot remove `1118786978.M908585P32756V0303I0010F8DF_121.mail,S=2381:2,S': No such file or directory rm: cannot remove `1118786978.M908831P32756V0303I0010F8E0_122.mail,S=1910:2,S': No such file or directory rm: cannot remove `1118786978.M909071P32756V0303I0010F8E1_123.mail,S=2456:2,S': No such file or directory rm: cannot remove `1118786978.M909318P32756V0303I0010F8E2_124.mail,S=3858:2,S': No such file or directory rm: cannot remove `1118787339.M455809P32750V0303I0010F695_10.mail,S=2855:2,S': No such file or directory if I do "cd /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur" and then "for i in `ls`; do sudo rm $i; done it works just fine. I just can't manage to delete the files *without* actually sitting there and manually going into the directory and deleting them. (I know the "for, do" loop is probably slow but I also screw up xargs every time I try to use it.) Most everyone on here could probably beat me at shell scripting and Perl, and this is totally spamassassin stuff related, so I'm asking.. help me! :) -Jonathan Scripting idiot Hi, for i in `ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur`; do sudo rm /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur/$i; done Although imapsalearn is easier. Regards, Rick
Dumb script question
I have POP/IMAP/SMTP on a seperate box from the spamassassin/amavis box, and I'm trying to come up with a script to take stuff out of the shared-maildir where users deposit spam that slipped through, tar it up, and move it to the other box, where yet another script will feed it to bayes. Most everything works, except for the cleanup! For the life of me, I can't manage to not screw this step up. heh. [EMAIL PROTECTED] bin $ cat clear_up_spam.sh #!/bin/sh for i in `ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur`; do sudo rm $i; done [EMAIL PROTECTED] bin $ Ok, so if I do a ls /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur then I see all the files in the directory. If I run this script as it is, i get stuff like this: rm: cannot remove `1118786978.M908087P32756V0303I0010F8DD_119.mail,S=2390:2,S': No such file or directory rm: cannot remove `1118786978.M908337P32756V0303I0010F8DE_120.mail,S=2381:2,S': No such file or directory rm: cannot remove `1118786978.M908585P32756V0303I0010F8DF_121.mail,S=2381:2,S': No such file or directory rm: cannot remove `1118786978.M908831P32756V0303I0010F8E0_122.mail,S=1910:2,S': No such file or directory rm: cannot remove `1118786978.M909071P32756V0303I0010F8E1_123.mail,S=2456:2,S': No such file or directory rm: cannot remove `1118786978.M909318P32756V0303I0010F8E2_124.mail,S=3858:2,S': No such file or directory rm: cannot remove `1118787339.M455809P32750V0303I0010F695_10.mail,S=2855:2,S': No such file or directory if I do "cd /home/vmail/shared-maildirs/Spamdrop/.Incoming/cur" and then "for i in `ls`; do sudo rm $i; done it works just fine. I just can't manage to delete the files *without* actually sitting there and manually going into the directory and deleting them. (I know the "for, do" loop is probably slow but I also screw up xargs every time I try to use it.) Most everyone on here could probably beat me at shell scripting and Perl, and this is totally spamassassin stuff related, so I'm asking.. help me! :) -Jonathan Scripting idiot