Re: Finding all e-mail addresses in files on server.

From: c0ldbyte (c0ldbyte_at_comp.unix.admin)
Date: 04/04/05


Date: Mon, 04 Apr 2005 13:13:03 GMT

On 2005-04-04, Alan Connor <zzzzzz@xxx.yyy> wrote:
> On comp.unix.shell, in
><1112576768.533990.100930@z14g2000cwz.googlegroups.com>,
> "ifoutch@gmail.com" wrote:
>
>
>> Looking for advice and/or examples on how to audit a server
>> to find all possible e-mail addresses listed in files. Need
>> to verify and possibly consolidate addresses for server
>> monitoring and administration. What I have been doing is
>> greping thru the filesystem and checking for matches to entries
>> in /etc/mail/aliases, /etc/password and any lines containing
>> "mail" (case insensitive) or "@" in crontabs, and scripts.
>>
>> What I would like to do is create an exclude list of certain
>> directories. Then go through the remaining dirs. and extract
>> mail addresses and print them to a file with the filename. This
>> would be run on a production systems during off hours but still
>> needs to be "nice" to system resources. I want to automate this
>> as much as possible. So that we can periodically do an audit of
>> all our systems.
>>
>> Has anybody done anything like this previously? Any pointers or
>> advice greatly appreciated.
>>
>
> I ran a search at http://groups.google.com/advanced_group_search
>
> on ifoutch@gmail.com
>
> This is the only post ever made on a Usenet textgroup under that
> alias.
>
> If you feel the need to hide, and want to extract email addresses
> from a bunch of dirs, then you are probably a spammer. Or a
> wannabee spammer.
>
> Here's the script I wrote that does everything you want. All the
> numbers and letters have been converted to Os with my handy
> vi macro.
>
> I learned some good things putting it together. Thanks.
>
> And *** off.
>
>
> (OOO OOO OOO OOOO)
>
> #!/OOO/OOOO
>
> OOO _OOOO OO $(OOOO / -OOOO "/OOO" -O -OOOO "/OOOO" -O \
> -OOOO "/OOOO"\) -OOOOO -O -OOOO O -OOOOO)
>
> do
>
> OOO -O 'O/\(.*\)\([O-OO-OO-O_.+-]+@[O-OO-OO-O_.+-\
> ]+\.[O-OO-OO-O]+\)\(.*\)/\O/O' $_OOOO >> OOOOOOOOOO
>
> OOOO
>
> #OO OOOO OO OOO OOO OOOO OOOOO OOO OOO OOOO \
> #(OOO,OOOO...) OO OOO OOOO OOOOOO.
>
> OOOO O
>
> AC
>

LOL I like that hahahahaha.

-- 
( When in doubt, use brute force. -- Ken Thompson 1998 )