Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Oct 2006 16:47:18 +0100
From:      Vince <jhary@unsane.co.uk>
To:        Jack Stone <antennex@hotmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Shell question
Message-ID:  <453F8706.5010204@unsane.co.uk>
In-Reply-To: <BAY106-F3222330AF276AB9714149FCC060@phx.gbl>
References:  <BAY106-F3222330AF276AB9714149FCC060@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help

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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?453F8706.5010204>