Programming Wiki: Remove X-Spambayes-Trained Tag From Emails

Programming Wiki : SpambayesRemoveXSpambayesTrained

WikiHomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2007-07-12 00:03:10 by ScottRippee

Additions:

Remove X-Spambayes-Trained Tag From Emails



Deletions:
hoodia online wellbutrin online but sildenafil vigrx online cialis online online levitra order tramadol vicodin online cheap wellbutrin free qwest ringtones propecia online free polyphonic ringtones free cool ringtones polyphonic ringtones mono ringtones hydrocodone online adipex free alltel ringtones cheap valium tenuate online cheap phentermine alprazolam online flexeril online hgh online meridia ultram online free free ringtones free funny ringtones diethylpropion online qwest ringtones real ringtones cheap lipitor cheap ultracet order tramadol cheap cialis free sony ericsson ringtones free funny ringtones zoloft music ringtones cheap carisoprodol cheap zanaflex free nokia ringtones lortab free motorola ringtones free samsung ringtones alltel ringtones free sharp ringtones soma online mtv ringtones cheap levitra cheap pharmacy online free real ringtones ambien online cheap diethylpropion xanax online online lorazepam real ringtones punk ringtones albuterol online cheap xanax fioricet online didrex online free verizon ringtones ultracet online tracfone ringtones cheap clomid online ativan xanax online buy nexium free sonyericsson ringtones clomid online adipex online online cialis hydrocodone online cheap levitra midi ringtones lisinopril online wwe ringtones phentermine online free tracfone ringtones sildenafil online verizon ringtones free midi ringtones buy phentermine rivotril online vicodin online celexa online funny ringtones flexeril online cheap hoodia tenuate online buy prozac sprint ringtones cheap norco meridia free sprint ringtones buy diazepam online fioricet free mp3 ringtones buy paxil buy zanaflex alprazolam soma online diazepam online wwe ringtones cheap zoloft lorazepam online norco online free ringtones carisoprodol online free qwest ringtones clonazepam online celexa online clonazepam online lipitor online free nokia ringtones cheap lisinopril propecia online free nokia ringtones punk ringtones buy carisoprodol ultram online sony ericsson ringtones tracfone ringtones zyban online cheap hoodia order tramadol cingular ringtones free jazz ringtones free alltel ringtones but flexeril nextel ringtones kyocera ringtones free samsung ringtones motorola ringtones meridia online xenical online free sony ringtones cheap paxil free sagem ringtones ativan online cheap rivotril order ortho cheap celexa sharp ringtones adipex online ortho online hydrocodone cheap propecia cingular ringtones nextel ringtones sagem ringtones adipex online free punk ringtones didrex online sonyericsson ringtones cheap didrex diazepam online samsung ringtones free sharp ringtones meridia online mono ringtones cheap valium hgh online nextel ringtones funny ringtones cheap lortab cheap ultracet viagra online online albuterol cheap vicodin motorola ringtones lorazepam online free ericsson ringtones free mp3 ringtones free sonyericsson ringtones viagra online cheap cyclobenzaprine vigrx free wwe ringtones zoloft online cheap clomid order fioricet samsung ringtones albuterol online buy tramadol xenical online alprazolam cheap clonazepam free mp3 ringtones cheap norco online xanax free mtv ringtones free qwest ringtones valium cheap sildenafil cheap zyban alprazolam online levitra cheap soma

Remove X-Spambayes-Trained Tag From Emails





Edited on 2007-07-07 04:48:03 by VxrVo3

Additions:
hoodia online wellbutrin online but sildenafil vigrx online cialis online online levitra order tramadol vicodin online cheap wellbutrin free qwest ringtones propecia online free polyphonic ringtones free cool ringtones polyphonic ringtones mono ringtones hydrocodone online adipex free alltel ringtones cheap valium tenuate online cheap phentermine alprazolam online flexeril online hgh online meridia ultram online free free ringtones free funny ringtones diethylpropion online qwest ringtones real ringtones cheap lipitor cheap ultracet order tramadol cheap cialis free sony ericsson ringtones free funny ringtones zoloft music ringtones cheap carisoprodol cheap zanaflex free nokia ringtones lortab free motorola ringtones free samsung ringtones alltel ringtones free sharp ringtones soma online mtv ringtones cheap levitra cheap pharmacy online free real ringtones ambien online cheap diethylpropion xanax online online lorazepam real ringtones punk ringtones albuterol online cheap xanax fioricet online didrex online free verizon ringtones ultracet online tracfone ringtones cheap clomid online ativan xanax online buy nexium free sonyericsson ringtones clomid online adipex online online cialis hydrocodone online cheap levitra midi ringtones lisinopril online wwe ringtones phentermine online free tracfone ringtones sildenafil online verizon ringtones free midi ringtones buy phentermine rivotril online vicodin online celexa online funny ringtones flexeril online cheap hoodia tenuate online buy prozac sprint ringtones cheap norco meridia free sprint ringtones buy diazepam online fioricet free mp3 ringtones buy paxil buy zanaflex alprazolam soma online diazepam online wwe ringtones cheap zoloft lorazepam online norco online free ringtones carisoprodol online free qwest ringtones clonazepam online celexa online clonazepam online lipitor online free nokia ringtones cheap lisinopril propecia online free nokia ringtones punk ringtones buy carisoprodol ultram online sony ericsson ringtones tracfone ringtones zyban online cheap hoodia order tramadol cingular ringtones free jazz ringtones free alltel ringtones but flexeril nextel ringtones kyocera ringtones free samsung ringtones motorola ringtones meridia online xenical online free sony ringtones cheap paxil free sagem ringtones ativan online cheap rivotril order ortho cheap celexa sharp ringtones adipex online ortho online hydrocodone cheap propecia cingular ringtones nextel ringtones sagem ringtones adipex online free punk ringtones didrex online sonyericsson ringtones cheap didrex diazepam online samsung ringtones free sharp ringtones meridia online mono ringtones cheap valium hgh online nextel ringtones funny ringtones cheap lortab cheap ultracet viagra online online albuterol cheap vicodin motorola ringtones lorazepam online free ericsson ringtones free mp3 ringtones free sonyericsson ringtones viagra online cheap cyclobenzaprine vigrx free wwe ringtones zoloft online cheap clomid order fioricet samsung ringtones albuterol online buy tramadol xenical online alprazolam cheap clonazepam free mp3 ringtones cheap norco online xanax free mtv ringtones free qwest ringtones valium cheap sildenafil cheap zyban alprazolam online levitra cheap soma

Remove X-Spambayes-Trained Tag From Emails



Deletions:

Remove X-Spambayes-Trained Tag From Emails





Edited on 2007-07-05 12:59:09 by MarkEdgar [revert spam]

Additions:

Remove X-Spambayes-Trained Tag From Emails



Deletions:
diazepam online order tramadol cheap wellbutrin free jazz ringtones rivotril online free mtv ringtones lipitor online cheap celexa cheap ativan nokia ringtones norco online motorola ringtones but ultram ultram online norco free mono ringtones celexa online didrex online online pharmacy cheap propecia phentermine online buy viagra cheap vicodin but sildenafil lisinopril online sharp ringtones levitra online funny ringtones but hydrocodone valium online free cool ringtones cheap clonazepam cyclobenzaprine online verizon ringtones buy hgh ambien online sony ringtones cialis online cingular ringtones cialis online cheap prozac free qwest ringtones didrex online free punk ringtones jazz ringtones free free ringtones cheap ultracet flexeril online free nokia ringtones cheap ativan viagra online midi ringtones free sony ericsson ringtones free real ringtones adipex online free funny ringtones free punk ringtones tenuate online meridia online free kyocera ringtones sprint ringtones meridia tenuate online clomid online cheap ambien sonyericsson ringtones clomid online free music ringtones free ericsson ringtones cheap levitra wwe ringtones kyocera ringtones nexium online mp3 ringtones hgh online xanax online free sagem ringtones xenical online cheap alprazolam music ringtones zanaflex online free verizon ringtones free nextel ringtones free tracfone ringtones buy diethylpropion albuterol online tramadol online samsung ringtones free mp3 ringtones wwe ringtones cheap soma free sharp ringtones lisinopril online paxil online free motorola ringtones free samsung ringtones online vigrx sildenafil online paxil online zanaflex online rivotril online cheap diethylpropion sprint ringtones polyphonic ringtones sagem ringtones cheap nexium cingular ringtones cyclobenzaprine online pharmacy online online alltel ringtones free sonyericsson ringtones sony ericsson ringtones cheap diazepam vicodin online lipitor online vigrx online mtv ringtones cheap soma buy lorazepam real ringtones zyban online buy albuterol free ericsson ringtones lorazepam online zoloft adipex buy wellbutrin alltel ringtones cool ringtones nextel ringtones zoloft cheap clonazepam cheap valium cheap fioricet midi ringtones xanax online polyphonic ringtones hoodia online but lortab cheap alprazolam cheap hydrocodone lortab online cheap ultracet free ringtones mono ringtones carisoprodol online free sony ringtones ortho online free tracfone ringtones but phentermine cheap ortho cheap xenical cheap prozac carisoprodol online cheap propecia flexeril free qwest ringtones fioricet online cheap hoodia zyban online

Remove X-Spambayes-Trained Tag From Emails





Edited on 2007-07-04 13:06:14 by VxrVo3

Additions:
diazepam online order tramadol cheap wellbutrin free jazz ringtones rivotril online free mtv ringtones lipitor online cheap celexa cheap ativan nokia ringtones norco online motorola ringtones but ultram ultram online norco free mono ringtones celexa online didrex online online pharmacy cheap propecia phentermine online buy viagra cheap vicodin but sildenafil lisinopril online sharp ringtones levitra online funny ringtones but hydrocodone valium online free cool ringtones cheap clonazepam cyclobenzaprine online verizon ringtones buy hgh ambien online sony ringtones cialis online cingular ringtones cialis online cheap prozac free qwest ringtones didrex online free punk ringtones jazz ringtones free free ringtones cheap ultracet flexeril online free nokia ringtones cheap ativan viagra online midi ringtones free sony ericsson ringtones free real ringtones adipex online free funny ringtones free punk ringtones tenuate online meridia online free kyocera ringtones sprint ringtones meridia tenuate online clomid online cheap ambien sonyericsson ringtones clomid online free music ringtones free ericsson ringtones cheap levitra wwe ringtones kyocera ringtones nexium online mp3 ringtones hgh online xanax online free sagem ringtones xenical online cheap alprazolam music ringtones zanaflex online free verizon ringtones free nextel ringtones free tracfone ringtones buy diethylpropion albuterol online tramadol online samsung ringtones free mp3 ringtones wwe ringtones cheap soma free sharp ringtones lisinopril online paxil online free motorola ringtones free samsung ringtones online vigrx sildenafil online paxil online zanaflex online rivotril online cheap diethylpropion sprint ringtones polyphonic ringtones sagem ringtones cheap nexium cingular ringtones cyclobenzaprine online pharmacy online online alltel ringtones free sonyericsson ringtones sony ericsson ringtones cheap diazepam vicodin online lipitor online vigrx online mtv ringtones cheap soma buy lorazepam real ringtones zyban online buy albuterol free ericsson ringtones lorazepam online zoloft adipex buy wellbutrin alltel ringtones cool ringtones nextel ringtones zoloft cheap clonazepam cheap valium cheap fioricet midi ringtones xanax online polyphonic ringtones hoodia online but lortab cheap alprazolam cheap hydrocodone lortab online cheap ultracet free ringtones mono ringtones carisoprodol online free sony ringtones ortho online free tracfone ringtones but phentermine cheap ortho cheap xenical cheap prozac carisoprodol online cheap propecia flexeril free qwest ringtones fioricet online cheap hoodia zyban online

Remove X-Spambayes-Trained Tag From Emails



Deletions:

Remove X-Spambayes-Trained Tag From Emails





Edited on 2006-08-04 11:14:56 by ScottRippee

Additions:
In practice it would be better to use sed

Deletions:
In practicality it would be better to use



Edited on 2006-04-16 20:20:40 by ScottRippee

Additions:

Python



Deletions:

Python





Edited on 2005-10-29 23:22:55 by adsl-69-106-179-40.dsl.frs2ca.pacbell.net

Additions:

Python

Remove X-Spambayes-Trained Tag From Emails

Move through email directories removing the X-Spambayes-Trained tag from e-mail headers so that Spambayes will retrain on the e-mails. This is usefull if you are starting training fresh.

Second Approach

Use one Python script using os.path.walk method.
Out of time for this right now as os.path.walk isn't as simple as it seems like it should be.
Looked into path.py. May be quicker/easier for this kind of stuff.

First Approach

Messy but works.. I use bash scripts to make the python script work.
This is the python that replaces text from one file and writes the text with the replaced text to another file. It can't write it to the same file that it is reading from.
In practicality it would be better to use
sed -i 's/x/y/' file_name

to accomplish this. This sed command would find x and replace it with y and save it in the same file that it read it from.
string_replace.py
#!/usr/bin/env python
import os, sys
nargs = len(sys.argv)
if not 3 <= nargs <= 5:
    print "usage: %s search_text replace_text [infile [outfile]]" % \
          os.path.basename(sys.argv[0])
else:
    stext = sys.argv[1]
    rtext = sys.argv[2]
    input = sys.stdin
    output = sys.stdout
    if nargs > 3:
        input = open(sys.argv[3])
        if nargs > 4:
            output = open(sys.argv[4], 'w')
            for s in input.xreadlines():
                output.write(s.replace(stext, rtext))
                pass
            output.close()
            pass
        input.close()

I am going to use find to call this script with the correct parameters to remove the trained spam tag.
Call the python script to replace the text.
exec_string_replace
#!/bin/bash
./string_replace.py 'X-Spambayes-Trained: spam' '' "$1" temp
mv temp "$1"
./string_replace.py 'X-Spambayes-Trained: ham' '' "$1" temp
mv temp "$1"

Now call find command that will execute the bash script above on every e-mail file it finds.. (all of my emails start with 1)
rm_trained_tag
#!/bin/bash
find . -name '1*' -type f -exec ./exec_string_replace {} \;

Calling rm_trained_tag from the base directory of your e-mail will remove the tags.


Deletions:
!'[http://generic-viagra.land.ru/ | Generic viagra online] !'
!'[http://cheap-phentermine.hotmail.ru/ | buy phentermine cheap phentermine online] !'
!'[http://best-phentermine.hotmail.ru/ | buy cheap phentermine online] !'
!'[http://fha_mortgage.chat.ru/ | buy cheap phentermine online] !'
!'[http://ticket1_broker.chat.ru/ | Ticket Broker] !'
!'[http://buy_phent.chat.ru/ | buy adipex phentermine] !'
!'[http://cheap--viagra.fromru.com/ | Cheap viagra] !'!
!'[http://united-airline.boom.ru/ | United Airlines tickets flights] !'!
!'[http://computer-desk.fromru.com/ | Computer desk] !'!
[http://online1degree.chat.ru/ | Online degree]
[http://camel-cig.newmail.ru | Cheap camel cigarettes]
[http://marlb-cigarette.newmail.ru | marlboro cigarettes]
[http://gift_basket.chat.ru/ | Gift basket]
[http://find-tires.com/ | Best Tires]
[http://caribbean2cruise.boom.ru/ | caribbean cruise]
[http://caribbean2cruise.chat.ru/ | caribbean cruise]
[http://cruise4vacation.chat.ru/ | cruise vacation]
[http://asia-cruise.boom.ru/ | asia cruise]
[http://asiacruise.chat.ru/ | asia cruise]
[http://princescruiselin.boom.ru/ | princess cruise line]
[http://princescruiselin.chat.ru/ | princess cruise line]
[http://italy2cruise.boom.ru/ | italy cruise]
[http://tom-cruise.boom.ru/ | tom cruise]
[http://tom4cruise.chat.ru/ | tom cruise]
[http://bermuda2cruise.boom.ru/ | bermuda cruise]
[http://bermuda4cruise.chat.ru/ | bermuda cruise]
[http://disneycruiseline.boom.ru/ | disney cruise line]
[http://disneycruiseline.chat.ru/ | disney cruise line]
[http://lastminutcruises.chat.ru/ | last minute cruises]
[http://european-cruise.boom.ru/ | european cruise]
[http://europeancruise.chat.ru/ | european cruise]
[http://norwegian2cruise.boom.ru/ | norwegian cruise]
[http://norwegian4cruise.chat.ru/ | norwegian cruise]
[http://barge-cruise.boom.ru/ | barge cruise]
[http://bargecruise.chat.ru/ | barge cruise]
[http://tropical-cruise.boom.ru/ | tropical cruise]
[http://mexico2-cruise.boom.ru/ | mexico cruise]
[http://canada-cruise.boom.ru/ | canada cruise]
[http://canada2cruise.chat.ru/ | canada cruise]
[http://cruise4special.boom.ru/ | cruise special]
[http://cruise4special.chat.ru/ | cruise special]
[http://single4cruises.chat.ru/ | single cruises]
[http://cruise4-review.boom.ru/ | cruise review]
[http://cruise2review.chat.ru/ | cruise review]
[http://cruise2bahamas.chat.ru/ | bahamas cruise]
[http://nile2cruises.chat.ru/ | nile cruises]
Best links: 'crystal cruise'
[http://crystalcruise.chat.ru/ | crystal cruise]
[http://crystal1cruise.boom.ru/ | crystal cruise]
Best links: 'dealer'
[http://cars_dealers.euro.ru/ | car dealer]
Best links: 'debt help self'
[http://debt_help_self.chat.ru/ | debt help self]
Best links: 'decorating'
[http://interior-decorating.fromru.com/ | interior decorating]
[http://interior_decorat.chat.ru/ | interior decorating]
[http://interior-decorating.pochta.ru/ | interior decorating]
[http://interior_deco.chat.ru/ | interior decorating]
[http://interior-deco.pochta.ru/ | interior decorating]
Best links: 'delivery flowers'
[http://delivery_flowers.chat.ru/ | delivery flower]
Best links: 'dell laptop used'
[http://dell_laptop_used.chat.ru/ | dell laptop used]
Best links: 'dental'
[http://dental_schools.chat.ru/ | dental schools]
Best links: 'dental care'
[http://dental-care.fromru.com/ | dental care]
Best links: 'detroit car insurance'
[http://detroit-car-insurance.fromru.com/ | detroit car insurance]
Best links: 'diabetic'
[http://diabetic-supply.fromru.com/ | diabetic supply]
[http://diabetic_supply.chat.ru/ | diabetic supply]
[http://diabetic2_supply.chat.ru/ | diabetic supply]
[http://diabetic-supply.pochta.ru/ | diabetic supply]
Best links: 'didrex'
[http://didrex1.chat.ru/ | didrex]
Best links: 'digital photo'
[http://digital_photo.euro.ru/ | digital photo]
Best links: 'diploma'
[http://high-school-diploma.fromru.com/ | high school diploma]
[http://fake-diploma-.pochta.ru/ | fake diploma]
[http://high_sch_diploma.chat.ru/ | high school diploma]
[http://fake1_diploma.chat.ru/ | fake diploma]
Best links: 'direct car insurance'
[http://direct-car-insurance.fromru.com/ | direct car insurance]
Best links: 'direct line car insurance'
[http://direct-line-car-insurance.fromru.com/ | direct line car insurance]
Best links: 'discount bedroom furniture'
[http://discount_room.chat.ru/ | discount bedroom furniture]
Best links: 'discount car insurance'
[http://discount-car-insurance.fromru.com/ | discount car insurance]
Best links: 'discount computer'
[http://discountcomputer.euro.ru/ | discount computer]
Best links: 'discount cruises'
[http://discount_cruises.euro.ru/ | discount cruise]
Best links: 'discount furniture'
[http://discountfurnitur.chat.ru/ | discount furniture]
Best links: 'discount hotel new york'
[http://discounthotelny.chat.ru/ | discount hotel new york]
Best links: 'discount hotels'
[http://discount-hotels.fromru.com/ | discount hotel]
Best links: 'Disney Hotel'
[http://disneyhotel2.chat.ru/ | Disney Hotel]
Best links: 'divorce'
[http://floridadivorce.chat.ru/ | divorce florida]
[http://ncarolinadivorce.chat.ru/ | carolina divorce north]
[http://divorce1help.chat.ru/ | divorce help]
[http://divorce1form.chat.ru/ | divorce form]
[http://divorce1advice.chat.ru/ | advice divorce]
[http://nydivorce.chat.ru/ | divorce new york]
[http://divorceuncont.chat.ru/ | divorce uncontested]
Best links: 'dog'
[http://dog-breed.pochta.ru/ | dog breed]
[http://dog_health.chat.ru/ | dog health]
[http://dog-health.pochta.ru/ | dog health]
[http://dog_collar.chat.ru/ | dog collar]
[http://dog-collar.pochta.ru/ | dog collar]
[http://dog_grooming.chat.ru/ | dog grooming]
[http://dog-grooming.pochta.ru/ | dog grooming]
[http://dog_bone.chat.ru/ | dog bone]
[http://dog-bone.pochta.ru/ | dog bone]
[http://dog1-house.chat.ru/ | dog house]
[http://dog-house.pochta.ru/ | dog house]
[http://dog_t_shirt.chat.ru/ | dog t shirt]
[http://dog-t-shirt.pochta.ru/ | dog t shirt]
Best links: 'dog bed'
[http://dog_bed.chat.ru/ | dog bed]
[http://dog-bed.pochta.ru/ | dog bed]
Best links: 'dog breed'
[http://dog1_breed.chat.ru/ | dog breed]
Best links: 'dog care'
[http://dog_care.chat.ru/ | dog care]
[http://dog-care.pochta.ru/ | dog care]
Best links: 'dog food'
[http://dog_food.chat.ru/ | dog food]
[http://dog-food.pochta.ru/ | dog food]
Best links: 'dog gift'
[http://dog_gift.chat.ru/ | dog gift]
[http://dog-gift.pochta.ru/ | dog gift]
Best links: 'dog pile'
[http://dog_pile.chat.ru/ | dog pile]
[http://dog-pile.pochta.ru/ | dog pile]
Best links: 'dog supply'
[http://dog_supply.chat.ru/ | dog supply]
[http://dog-supply.pochta.ru/ | dog supply]
Best links: 'dog toy'
[http://dog_toy.chat.ru/ | dog toy]
[http://dog-toy.pochta.ru/ | dog toy]
Best links: 'dog training'
[http://dog_training.chat.ru/ | dog training]
[http://dog-training.pochta.ru/ | dog training]
Best links: 'dog treat'
[http://dog_treat.chat.ru/ | dog treat]
[http://dog-treat.pochta.ru/ | dog treat]
Best links: 'donation'
[http://car_donation.chat.ru/ | car donation]
[http://car-donation.boom.ru/ | car donation]
Best links: 'driver car insurance'
[http://driver-car-insurance.fromru.com/ | driver car insurance]
Best links: 'drug valium'
[http://valium_drug.chat.ru/ | drug valium]
Best links: 'drugs'
[http://cheap-phentermine.hotmail.ru/ | buy phentermine cheap phentermine online]
[http://best-phent.boom.ru/ | buy phentermine]
[http://best-phentermine.hotmail.ru/ | buy cheap phentermine online]
Best links: 'education'
[http://online-education.fromru.com/ | online education]
[http://contin_education.chat.ru/ | online education]
[http://online_education.chat.ru/ | online education]
[http://online1-education.pochta.ru/ | online education]
Best links: 'equipment'
[http://exe-equipment.boom.ru/ | exercise equipment]
[http://heavy-equipment.boom.ru/ | heavy equipment]
[http://construction-eq.boom.ru/ | construction equipment]
[http://home-fitness-eq.boom.ru/ | home fitness equipment]
[http://surv-equipment.boom.ru/ | surveillance equipment]
[http://scuba-equipment.boom.ru/ | scuba equipment]
[http://eq-leasing.boom.ru/ | equipment leasing]
[http://sauna_equipment.chat.ru/ | sauna equipment]
[http://sauna-equipment.fromru.com/ | sauna equipment]
[http://spy_equipment.chat.ru/ | spy equipment]
[http://spa_equipment.chat.ru/ | spa equipment]
[http://salon_equipment.chat.ru/ | salon equipment]
[http://salon-equipment.fromru.com/ | salon equipment]
[http://spa-equipment.fromru.com/ | spa equipment]
[http://spy-equipment.pisem.net/ | spy equipment]
[http://constr_equipment.chat.ru/ | construction equipment]
[http://construction-equipment.land.ru/ | construction equipment]
[http://equipmnt_leasing.chat.ru/ | equipment leasing]
[http://equipmnt-leasing.pochta.ru/ | equipment leasing]
Best links: 'executive recruiting'
[http://executive-recruiting.fromru.com/ | executive recruiting]
Best links: 'farm car insurance state'
[http://farm-car-insurance-state.fromru.com/ | farm car insurance state]
Best links: 'fhome loan'
[http://pennsylvania-home-equity-loan.fromru.com/ | pennsylvania home equity loan]
Best links: 'filter'
[http://water1_filter.chat.ru/ | water filter]
[http://air1filter.chat.ru/ | air filter]
Best links: 'financial aid'
[http://financial1aid.chat.ru/ | financial aid]
Best links: 'fioricet'
[http://fioricet-online.land.ru/ | fioricet online]
Best links: 'first aid'
[http://first1aid.chat.ru/ | first aid]
Best links: 'florida hotel'
[http://florida_hotels.chat.ru/ | florida hotels]
Best links: 'florida real estate'
[http://florida-real-estate.fromru.com/ | florida real estate]
Best links: 'florida timeshare'
[http://florida-timsh.chat.ru/ | florida timeshare]
Best links: 'flower delivery'
[http://flower-1delivery.boom.ru/ | flower delivery]
[http://flower1delivery.chat.ru/ | flower delivery]
[http://flower_delivery.chat.ru/ | flower delivery]
Best links: 'flower send'
[http://flower_online.chat.ru/ | flower send]
Best links: 'flowers'
[http://birthday-flower.boom.ru/ | birthday flower]
[http://send-flower.boom.ru/ | send flower]
[http://flower-shop.boom.ru/ | flower shop]
[http://order-flower.boom.ru/ | order flower]
[http://flower-arrange.boom.ru/ | flower arrangement]
[http://a-1-800-flower.boom.ru/ | 1 800 flower]
Best links: 'flowers shop'
[http://flowershop.euro.ru/ | flowers shop]
Best links: 'ford'
[http://ford1mustang.chat.ru/ | ford mustang]
[http://ford2truck.chat.ru/ | ford truck]
[http://ford4truck.chat.ru/ | ford truck]
[http://ford1explorer.chat.ru/ | ford explorer]
[http://ford2part.chat.ru/ | ford part]
[http://ford1focus.chat.ru/ | ford focus]
[http://ford2ranger.chat.ru/ | ford ranger]
[http://ford2escape.chat.ru/ | ford escape]
[http://ford2dealer.chat.ru/ | ford dealer]
[http://ford2expedition.chat.ru/ | ford expedition]
[http://ford_car.chat.ru/ | ford car]
[http://ford_f150.chat.ru/ | ford f150]
[http://ford_escort1.chat.ru/ | ford escort]
[http://ford_taurus1.chat.ru/ | ford taurus]
[http://ford_thunderbird.chat.ru/ | ford thunderbird]
Best links: 'ford engine'
[http://engine4ford.chat.ru/ | ford engine]
Best links: 'foreclosure'
[http://foreclosure_help.chat.ru/ | foreclosure help]
[http://foreclosurehome.chat.ru/ | foreclosure home]
[http://foreclosure_prop.chat.ru/ | foreclosure property]
[http://foreclosure-prevention.fromru.com/ | foreclosure prevention]
Best links: 'free car insurance quotes online'
[http://free-car-insurance-quotes-online.fromru.com/ | free car insurance quotes online]
Best links: 'gambling'
[http://football-gambling.fromru.com/ | football gambling]
[http://online_blackjack.chat.ru/ | gambling]
[http://online-black-jack.fromru.com/ | gambling]
[http://online-wagering.fromru.com/ | gambling]
[http://sports_wagering.chat.ru/ | sports wagering]
[http://online2_wagering.chat.ru/ | online wagering]
[http://online1_wagering.chat.ru/ | online wagering]
[http://sports-wagering.fromru.com/ | sports wagering]
[http://internet_wagerin.chat.ru/ | internet wagering]
[http://internet-wagering.fromru.com/ | internet wagering]
[http://onli_casino_wage.chat.ru/ | online casino wagering]
[http://online-casino-wagering.fromru.com/ | online casino wagering]
Best links: 'Garage Door'
[http://garage-door.fromru.com/ | garage door]
Best links: 'geico car insurance'
[http://geico-car-insurance.fromru.com/ | geico car insurance]
Best links: 'generic ultram'
[http://generic_ultram.chat.ru/ | generic ultram]
Best links: 'gift'
[http://corporate-gift.pochta.ru/ | corporate gift]
[http://gift_4.chat.ru/ | gift]
[http://gift-4.fromru.com/ | gift]
[http://food_gift.chat.ru/ | food gift]
[http://baby_gift.chat.ru/ | baby gift]
[http://baby_shower_gift.chat.ru/ | baby shower gift]
[http://corporate4_gift.chat.ru/ | corporate gift]
[http://gift_certificate.chat.ru/ | gift certificate]
[http://gift_for_him.chat.ru/ | gift for him]
[http://gift_card.chat.ru/ | gift card]
[http://anniversary_gift.chat.ru/ | anniversary gift]
[http://corporate_gift_basket.chat.ru/ | corporate gift basket]
[http://unique_gift.chat.ru/ | unique gift]
[http://buy_baby_gift.chat.ru/ | buy baby gift]
[http://person_baby_gift.chat.ru/ | personalized baby gift]
[http://birthday_gift.chat.ru/ | birthday gift]
[http://wine2_gift.chat.ru/ | wine gift]
[http://business_gift.chat.ru/ | business gift]
[http://gift_shop.chat.ru/ | gift shop]
[http://personalized_gift.chat.ru/ | personalized gift]
[http://gift_for_her.chat.ru/ | gift for her]
[http://holiday_gift.chat.ru/ | holiday gift]
[http://animal_lover_gift.chat.ru/ | animal lover gift]
[http://animal_lover_gif.chat.ru/ | animal lover gift]
[http://candy_gift.chat.ru/ | candy gift]
[http://flower_gift.chat.ru/ | flower gift]
[http://win2_gift_basket.chat.ru/ | wine gift basket]
[http://sympathy-giftb.fromru.com/ | sympathy gift basket] [http://baby-gb.pochta.ru/ | baby gift basket] [http://food_gb.chat.ru/ | food gift basket] [http://gourmet_gb.chat.ru/ | gourmet gift basket] [http://cookie_gift_b.chat.ru/ | cookie gift basket]




Edited on 2005-10-28 20:20:09 by 150.188.15.200

Additions:
!'[http://generic-viagra.land.ru/ | Generic viagra online] !'
!'[http://cheap-phentermine.hotmail.ru/ | buy phentermine cheap phentermine online] !'
!'[http://best-phentermine.hotmail.ru/ | buy cheap phentermine online] !'
!'[http://fha_mortgage.chat.ru/ | buy cheap phentermine online] !'
!'[http://ticket1_broker.chat.ru/ | Ticket Broker] !'
!'[http://buy_phent.chat.ru/ | buy adipex phentermine] !'
!'[http://cheap--viagra.fromru.com/ | Cheap viagra] !'!
!'[http://united-airline.boom.ru/ | United Airlines tickets flights] !'!
!'[http://computer-desk.fromru.com/ | Computer desk] !'!
[http://online1degree.chat.ru/ | Online degree]
[http://camel-cig.newmail.ru | Cheap camel cigarettes]
[http://marlb-cigarette.newmail.ru | marlboro cigarettes]
[http://gift_basket.chat.ru/ | Gift basket]
[http://find-tires.com/ | Best Tires]
[http://caribbean2cruise.boom.ru/ | caribbean cruise]
[http://caribbean2cruise.chat.ru/ | caribbean cruise]
[http://cruise4vacation.chat.ru/ | cruise vacation]
[http://asia-cruise.boom.ru/ | asia cruise]
[http://asiacruise.chat.ru/ | asia cruise]
[http://princescruiselin.boom.ru/ | princess cruise line]
[http://princescruiselin.chat.ru/ | princess cruise line]
[http://italy2cruise.boom.ru/ | italy cruise]
[http://tom-cruise.boom.ru/ | tom cruise]
[http://tom4cruise.chat.ru/ | tom cruise]
[http://bermuda2cruise.boom.ru/ | bermuda cruise]
[http://bermuda4cruise.chat.ru/ | bermuda cruise]
[http://disneycruiseline.boom.ru/ | disney cruise line]
[http://disneycruiseline.chat.ru/ | disney cruise line]
[http://lastminutcruises.chat.ru/ | last minute cruises]
[http://european-cruise.boom.ru/ | european cruise]
[http://europeancruise.chat.ru/ | european cruise]
[http://norwegian2cruise.boom.ru/ | norwegian cruise]
[http://norwegian4cruise.chat.ru/ | norwegian cruise]
[http://barge-cruise.boom.ru/ | barge cruise]
[http://bargecruise.chat.ru/ | barge cruise]
[http://tropical-cruise.boom.ru/ | tropical cruise]
[http://mexico2-cruise.boom.ru/ | mexico cruise]
[http://canada-cruise.boom.ru/ | canada cruise]
[http://canada2cruise.chat.ru/ | canada cruise]
[http://cruise4special.boom.ru/ | cruise special]
[http://cruise4special.chat.ru/ | cruise special]
[http://single4cruises.chat.ru/ | single cruises]
[http://cruise4-review.boom.ru/ | cruise review]
[http://cruise2review.chat.ru/ | cruise review]
[http://cruise2bahamas.chat.ru/ | bahamas cruise]
[http://nile2cruises.chat.ru/ | nile cruises]
Best links: 'crystal cruise'
[http://crystalcruise.chat.ru/ | crystal cruise]
[http://crystal1cruise.boom.ru/ | crystal cruise]
Best links: 'dealer'
[http://cars_dealers.euro.ru/ | car dealer]
Best links: 'debt help self'
[http://debt_help_self.chat.ru/ | debt help self]
Best links: 'decorating'
[http://interior-decorating.fromru.com/ | interior decorating]
[http://interior_decorat.chat.ru/ | interior decorating]
[http://interior-decorating.pochta.ru/ | interior decorating]
[http://interior_deco.chat.ru/ | interior decorating]
[http://interior-deco.pochta.ru/ | interior decorating]
Best links: 'delivery flowers'
[http://delivery_flowers.chat.ru/ | delivery flower]
Best links: 'dell laptop used'
[http://dell_laptop_used.chat.ru/ | dell laptop used]
Best links: 'dental'
[http://dental_schools.chat.ru/ | dental schools]
Best links: 'dental care'
[http://dental-care.fromru.com/ | dental care]
Best links: 'detroit car insurance'
[http://detroit-car-insurance.fromru.com/ | detroit car insurance]
Best links: 'diabetic'
[http://diabetic-supply.fromru.com/ | diabetic supply]
[http://diabetic_supply.chat.ru/ | diabetic supply]
[http://diabetic2_supply.chat.ru/ | diabetic supply]
[http://diabetic-supply.pochta.ru/ | diabetic supply]
Best links: 'didrex'
[http://didrex1.chat.ru/ | didrex]
Best links: 'digital photo'
[http://digital_photo.euro.ru/ | digital photo]
Best links: 'diploma'
[http://high-school-diploma.fromru.com/ | high school diploma]
[http://fake-diploma-.pochta.ru/ | fake diploma]
[http://high_sch_diploma.chat.ru/ | high school diploma]
[http://fake1_diploma.chat.ru/ | fake diploma]
Best links: 'direct car insurance'
[http://direct-car-insurance.fromru.com/ | direct car insurance]
Best links: 'direct line car insurance'
[http://direct-line-car-insurance.fromru.com/ | direct line car insurance]
Best links: 'discount bedroom furniture'
[http://discount_room.chat.ru/ | discount bedroom furniture]
Best links: 'discount car insurance'
[http://discount-car-insurance.fromru.com/ | discount car insurance]
Best links: 'discount computer'
[http://discountcomputer.euro.ru/ | discount computer]
Best links: 'discount cruises'
[http://discount_cruises.euro.ru/ | discount cruise]
Best links: 'discount furniture'
[http://discountfurnitur.chat.ru/ | discount furniture]
Best links: 'discount hotel new york'
[http://discounthotelny.chat.ru/ | discount hotel new york]
Best links: 'discount hotels'
[http://discount-hotels.fromru.com/ | discount hotel]
Best links: 'Disney Hotel'
[http://disneyhotel2.chat.ru/ | Disney Hotel]
Best links: 'divorce'
[http://floridadivorce.chat.ru/ | divorce florida]
[http://ncarolinadivorce.chat.ru/ | carolina divorce north]
[http://divorce1help.chat.ru/ | divorce help]
[http://divorce1form.chat.ru/ | divorce form]
[http://divorce1advice.chat.ru/ | advice divorce]
[http://nydivorce.chat.ru/ | divorce new york]
[http://divorceuncont.chat.ru/ | divorce uncontested]
Best links: 'dog'
[http://dog-breed.pochta.ru/ | dog breed]
[http://dog_health.chat.ru/ | dog health]
[http://dog-health.pochta.ru/ | dog health]
[http://dog_collar.chat.ru/ | dog collar]
[http://dog-collar.pochta.ru/ | dog collar]
[http://dog_grooming.chat.ru/ | dog grooming]
[http://dog-grooming.pochta.ru/ | dog grooming]
[http://dog_bone.chat.ru/ | dog bone]
[http://dog-bone.pochta.ru/ | dog bone]
[http://dog1-house.chat.ru/ | dog house]
[http://dog-house.pochta.ru/ | dog house]
[http://dog_t_shirt.chat.ru/ | dog t shirt]
[http://dog-t-shirt.pochta.ru/ | dog t shirt]
Best links: 'dog bed'
[http://dog_bed.chat.ru/ | dog bed]
[http://dog-bed.pochta.ru/ | dog bed]
Best links: 'dog breed'
[http://dog1_breed.chat.ru/ | dog breed]
Best links: 'dog care'
[http://dog_care.chat.ru/ | dog care]
[http://dog-care.pochta.ru/ | dog care]
Best links: 'dog food'
[http://dog_food.chat.ru/ | dog food]
[http://dog-food.pochta.ru/ | dog food]
Best links: 'dog gift'
[http://dog_gift.chat.ru/ | dog gift]
[http://dog-gift.pochta.ru/ | dog gift]
Best links: 'dog pile'
[http://dog_pile.chat.ru/ | dog pile]
[http://dog-pile.pochta.ru/ | dog pile]
Best links: 'dog supply'
[http://dog_supply.chat.ru/ | dog supply]
[http://dog-supply.pochta.ru/ | dog supply]
Best links: 'dog toy'
[http://dog_toy.chat.ru/ | dog toy]
[http://dog-toy.pochta.ru/ | dog toy]
Best links: 'dog training'
[http://dog_training.chat.ru/ | dog training]
[http://dog-training.pochta.ru/ | dog training]
Best links: 'dog treat'
[http://dog_treat.chat.ru/ | dog treat]
[http://dog-treat.pochta.ru/ | dog treat]
Best links: 'donation'
[http://car_donation.chat.ru/ | car donation]
[http://car-donation.boom.ru/ | car donation]
Best links: 'driver car insurance'
[http://driver-car-insurance.fromru.com/ | driver car insurance]
Best links: 'drug valium'
[http://valium_drug.chat.ru/ | drug valium]
Best links: 'drugs'
[http://cheap-phentermine.hotmail.ru/ | buy phentermine cheap phentermine online]
[http://best-phent.boom.ru/ | buy phentermine]
[http://best-phentermine.hotmail.ru/ | buy cheap phentermine online]
Best links: 'education'
[http://online-education.fromru.com/ | online education]
[http://contin_education.chat.ru/ | online education]
[http://online_education.chat.ru/ | online education]
[http://online1-education.pochta.ru/ | online education]
Best links: 'equipment'
[http://exe-equipment.boom.ru/ | exercise equipment]
[http://heavy-equipment.boom.ru/ | heavy equipment]
[http://construction-eq.boom.ru/ | construction equipment]
[http://home-fitness-eq.boom.ru/ | home fitness equipment]
[http://surv-equipment.boom.ru/ | surveillance equipment]
[http://scuba-equipment.boom.ru/ | scuba equipment]
[http://eq-leasing.boom.ru/ | equipment leasing]
[http://sauna_equipment.chat.ru/ | sauna equipment]
[http://sauna-equipment.fromru.com/ | sauna equipment]
[http://spy_equipment.chat.ru/ | spy equipment]
[http://spa_equipment.chat.ru/ | spa equipment]
[http://salon_equipment.chat.ru/ | salon equipment]
[http://salon-equipment.fromru.com/ | salon equipment]
[http://spa-equipment.fromru.com/ | spa equipment]
[http://spy-equipment.pisem.net/ | spy equipment]
[http://constr_equipment.chat.ru/ | construction equipment]
[http://construction-equipment.land.ru/ | construction equipment]
[http://equipmnt_leasing.chat.ru/ | equipment leasing]
[http://equipmnt-leasing.pochta.ru/ | equipment leasing]
Best links: 'executive recruiting'
[http://executive-recruiting.fromru.com/ | executive recruiting]
Best links: 'farm car insurance state'
[http://farm-car-insurance-state.fromru.com/ | farm car insurance state]
Best links: 'fhome loan'
[http://pennsylvania-home-equity-loan.fromru.com/ | pennsylvania home equity loan]
Best links: 'filter'
[http://water1_filter.chat.ru/ | water filter]
[http://air1filter.chat.ru/ | air filter]
Best links: 'financial aid'
[http://financial1aid.chat.ru/ | financial aid]
Best links: 'fioricet'
[http://fioricet-online.land.ru/ | fioricet online]
Best links: 'first aid'
[http://first1aid.chat.ru/ | first aid]
Best links: 'florida hotel'
[http://florida_hotels.chat.ru/ | florida hotels]
Best links: 'florida real estate'
[http://florida-real-estate.fromru.com/ | florida real estate]
Best links: 'florida timeshare'
[http://florida-timsh.chat.ru/ | florida timeshare]
Best links: 'flower delivery'
[http://flower-1delivery.boom.ru/ | flower delivery]
[http://flower1delivery.chat.ru/ | flower delivery]
[http://flower_delivery.chat.ru/ | flower delivery]
Best links: 'flower send'
[http://flower_online.chat.ru/ | flower send]
Best links: 'flowers'
[http://birthday-flower.boom.ru/ | birthday flower]
[http://send-flower.boom.ru/ | send flower]
[http://flower-shop.boom.ru/ | flower shop]
[http://order-flower.boom.ru/ | order flower]
[http://flower-arrange.boom.ru/ | flower arrangement]
[http://a-1-800-flower.boom.ru/ | 1 800 flower]
Best links: 'flowers shop'
[http://flowershop.euro.ru/ | flowers shop]
Best links: 'ford'
[http://ford1mustang.chat.ru/ | ford mustang]
[http://ford2truck.chat.ru/ | ford truck]
[http://ford4truck.chat.ru/ | ford truck]
[http://ford1explorer.chat.ru/ | ford explorer]
[http://ford2part.chat.ru/ | ford part]
[http://ford1focus.chat.ru/ | ford focus]
[http://ford2ranger.chat.ru/ | ford ranger]
[http://ford2escape.chat.ru/ | ford escape]
[http://ford2dealer.chat.ru/ | ford dealer]
[http://ford2expedition.chat.ru/ | ford expedition]
[http://ford_car.chat.ru/ | ford car]
[http://ford_f150.chat.ru/ | ford f150]
[http://ford_escort1.chat.ru/ | ford escort]
[http://ford_taurus1.chat.ru/ | ford taurus]
[http://ford_thunderbird.chat.ru/ | ford thunderbird]
Best links: 'ford engine'
[http://engine4ford.chat.ru/ | ford engine]
Best links: 'foreclosure'
[http://foreclosure_help.chat.ru/ | foreclosure help]
[http://foreclosurehome.chat.ru/ | foreclosure home]
[http://foreclosure_prop.chat.ru/ | foreclosure property]
[http://foreclosure-prevention.fromru.com/ | foreclosure prevention]
Best links: 'free car insurance quotes online'
[http://free-car-insurance-quotes-online.fromru.com/ | free car insurance quotes online]
Best links: 'gambling'
[http://football-gambling.fromru.com/ | football gambling]
[http://online_blackjack.chat.ru/ | gambling]
[http://online-black-jack.fromru.com/ | gambling]
[http://online-wagering.fromru.com/ | gambling]
[http://sports_wagering.chat.ru/ | sports wagering]
[http://online2_wagering.chat.ru/ | online wagering]
[http://online1_wagering.chat.ru/ | online wagering]
[http://sports-wagering.fromru.com/ | sports wagering]
[http://internet_wagerin.chat.ru/ | internet wagering]
[http://internet-wagering.fromru.com/ | internet wagering]
[http://onli_casino_wage.chat.ru/ | online casino wagering]
[http://online-casino-wagering.fromru.com/ | online casino wagering]
Best links: 'Garage Door'
[http://garage-door.fromru.com/ | garage door]
Best links: 'geico car insurance'
[http://geico-car-insurance.fromru.com/ | geico car insurance]
Best links: 'generic ultram'
[http://generic_ultram.chat.ru/ | generic ultram]
Best links: 'gift'
[http://corporate-gift.pochta.ru/ | corporate gift]
[http://gift_4.chat.ru/ | gift]
[http://gift-4.fromru.com/ | gift]
[http://food_gift.chat.ru/ | food gift]
[http://baby_gift.chat.ru/ | baby gift]
[http://baby_shower_gift.chat.ru/ | baby shower gift]
[http://corporate4_gift.chat.ru/ | corporate gift]
[http://gift_certificate.chat.ru/ | gift certificate]
[http://gift_for_him.chat.ru/ | gift for him]
[http://gift_card.chat.ru/ | gift card]
[http://anniversary_gift.chat.ru/ | anniversary gift]
[http://corporate_gift_basket.chat.ru/ | corporate gift basket]
[http://unique_gift.chat.ru/ | unique gift]
[http://buy_baby_gift.chat.ru/ | buy baby gift]
[http://person_baby_gift.chat.ru/ | personalized baby gift]
[http://birthday_gift.chat.ru/ | birthday gift]
[http://wine2_gift.chat.ru/ | wine gift]
[http://business_gift.chat.ru/ | business gift]
[http://gift_shop.chat.ru/ | gift shop]
[http://personalized_gift.chat.ru/ | personalized gift]
[http://gift_for_her.chat.ru/ | gift for her]
[http://holiday_gift.chat.ru/ | holiday gift]
[http://animal_lover_gift.chat.ru/ | animal lover gift]
[http://animal_lover_gif.chat.ru/ | animal lover gift]
[http://candy_gift.chat.ru/ | candy gift]
[http://flower_gift.chat.ru/ | flower gift]
[http://win2_gift_basket.chat.ru/ | wine gift basket]
[http://sympathy-giftb.fromru.com/ | sympathy gift basket] [http://baby-gb.pochta.ru/ | baby gift basket] [http://food_gb.chat.ru/ | food gift basket] [http://gourmet_gb.chat.ru/ | gourmet gift basket] [http://cookie_gift_b.chat.ru/ | cookie gift basket]


Deletions:

Python

Remove X-Spambayes-Trained Tag From Emails

Move through email directories removing the X-Spambayes-Trained tag from e-mail headers so that Spambayes will retrain on the e-mails. This is usefull if you are starting training fresh.

Second Approach

Use one Python script using os.path.walk method.
Out of time for this right now as os.path.walk isn't as simple as it seems like it should be.
Looked into path.py. May be quicker/easier for this kind of stuff.

First Approach

Messy but works.. I use bash scripts to make the python script work.
This is the python that replaces text from one file and writes the text with the replaced text to another file. It can't write it to the same file that it is reading from.
In practicality it would be better to use
sed -i 's/x/y/' file_name

to accomplish this. This sed command would find x and replace it with y and save it in the same file that it read it from.
string_replace.py
#!/usr/bin/env python
import os, sys
nargs = len(sys.argv)
if not 3 <= nargs <= 5:
    print "usage: %s search_text replace_text [infile [outfile]]" % \
          os.path.basename(sys.argv[0])
else:
    stext = sys.argv[1]
    rtext = sys.argv[2]
    input = sys.stdin
    output = sys.stdout
    if nargs > 3:
        input = open(sys.argv[3])
        if nargs > 4:
            output = open(sys.argv[4], 'w')
            for s in input.xreadlines():
                output.write(s.replace(stext, rtext))
                pass
            output.close()
            pass
        input.close()

I am going to use find to call this script with the correct parameters to remove the trained spam tag.
Call the python script to replace the text.
exec_string_replace
#!/bin/bash
./string_replace.py 'X-Spambayes-Trained: spam' '' "$1" temp
mv temp "$1"
./string_replace.py 'X-Spambayes-Trained: ham' '' "$1" temp
mv temp "$1"

Now call find command that will execute the bash script above on every e-mail file it finds.. (all of my emails start with 1)
rm_trained_tag
#!/bin/bash
find . -name '1*' -type f -exec ./exec_string_replace {} \;

Calling rm_trained_tag from the base directory of your e-mail will remove the tags.




Edited on 2005-10-11 08:38:29 by 12.44.178.253

Additions:

Python

Remove X-Spambayes-Trained Tag From Emails



Deletions:

Remove X-Spambayes-Trained Tag From Emails





Edited on 2005-10-11 08:37:13 by 12.44.178.253

Additions:

Remove X-Spambayes-Trained Tag From Emails





Edited on 2005-09-25 20:36:58 by ScottRippee

Additions:
In practicality it would be better to use
sed -i 's/x/y/' file_name
to accomplish this.  This sed command would find x and replace it with y and save it in the same file that it read it from.
(bash)


Deletions:
In practicality it would be better to use "sed -i 's/x/y/' file" to accomplish this. This sed command would find x and replace it with y and save it in the same file that it read it from.



Edited on 2005-09-16 11:37:41 by 12.44.178.253

Additions:
In practicality it would be better to use "sed -i 's/x/y/' file" to accomplish this. This sed command would find x and replace it with y and save it in the same file that it read it from.

Deletions:
In practicality it would be better to use sed -e 's/x/y/' to accomplish this.



Edited on 2005-09-16 11:24:31 by 12.44.178.253

Additions:
This is the python that replaces text from one file and writes the text with the replaced text to another file. It can't write it to the same file that it is reading from.
In practicality it would be better to use sed -e 's/x/y/' to accomplish this.


Deletions:
This is the python that replaces text from one file and writes the text with the replaced textit to another file. It can't write it to the same file that it is reading from.



Edited on 2005-07-25 01:07:24 by 71.128.254.173

Additions:
Use one Python script using os.path.walk method.
Out of time for this right now as os.path.walk isn't as simple as it seems like it should be.
Looked into path.py. May be quicker/easier for this kind of stuff.


Deletions:

Acutally is another problem of it not being able to find the scripts when it moves into branches.




Oldest known version of this page was edited on 2005-07-24 14:42:33 by 71.128.254.173 []
Page view:
Move through email directories removing the X-Spambayes-Trained tag from e-mail headers so that Spambayes will retrain on the e-mails. This is usefull if you are starting training fresh.

Second Approach



First Approach

Messy but works.. I use bash scripts to make the python script work.
This is the python that replaces text from one file and writes the text with the replaced textit to another file. It can't write it to the same file that it is reading from.

string_replace.py
#!/usr/bin/env python

import os, sys

nargs = len(sys.argv)

if not 3 <= nargs <= 5:
    print "usage: %s search_text replace_text [infile [outfile]]" % \
          os.path.basename(sys.argv[0])
else:
    stext = sys.argv[1]
    rtext = sys.argv[2]
    input = sys.stdin
    output = sys.stdout
    if nargs > 3:
        input = open(sys.argv[3])
        if nargs > 4:
            output = open(sys.argv[4], 'w')
            for s in input.xreadlines():
                output.write(s.replace(stext, rtext))
                pass
            output.close()
            pass
        input.close()



I am going to use find to call this script with the correct parameters to remove the trained spam tag.
Call the python script to replace the text.

exec_string_replace
#!/bin/bash

./string_replace.py 'X-Spambayes-Trained: spam' '' "$1" temp
mv temp "$1"
./string_replace.py 'X-Spambayes-Trained: ham' '' "$1" temp
mv temp "$1"



Now call find command that will execute the bash script above on every e-mail file it finds.. (all of my emails start with 1)
rm_trained_tag
#!/bin/bash
find . -name '1*' -type f -exec ./exec_string_replace {} \;


Calling rm_trained_tag from the base directory of your e-mail will remove the tags.
Acutally is another problem of it not being able to find the scripts when it moves into branches.
Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 0.2357 seconds