Shell question

Vince jhary at unsane.co.uk
Wed Oct 25 15:47:48 UTC 2006


Jack Stone wrote:
> Folks:
> I have managed to piece together a shell script that is able to retrieve
> the domains from the spams of the day and summarize those in a special
> file that can then be added to the sendmail's rejects in the access.db.
> But, first I have to eyeball the list and remove any obvious good-guy
> domains.
> 
> I would like to create another list of those same good guys that can be
> added to each day as they show up, then compare it to the above main
> list and delete the good guy domains before adding to the access.db.
> 
> What would be the best way of doing the above in a few lines added to my
> (sh) shell script?
> 
hmm probably not the best but....

egrep -v -f goodguys.txt spamers.txt

will only spit out the domains in spammers.txt that are not in goodguys.txt

goodguys.txt is a file of good guys domains in the format

aa.com|bb.com|cc.com|dd.com

creating this file programaticly shouldnt be too hard. not sure how well
this will scale as i only tested it with 5 or so names.
Vince


> BTW: The "spam" list of domains are listed in a column one below the
> other in a flat file.
> 
> Appreciate your usual fine advice on this. Hope I have been clear.
> 
> Thanks!
> 
> Jack
> 
> _________________________________________________________________
> Find a local pizza place, music store, museum and more…then map the best
> route!  http://local.live.com?FORM=MGA001
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list