Quantcast
Channel: grep out unique senders from a huge list of emails - Server Fault
Viewing all articles
Browse latest Browse all 4

grep out unique senders from a huge list of emails

0
0

I just found a huge list of emails under my user account in Centos /home/user/mail/new

I opened some of them and noticed they were sent from a particular cron job. From address is root@hostname.com. I need to find out if all these emails were sent by root@hostname.com - It's about 30GBs of email. Is there a way to grep out a list of unique list of From addresses? The format of the email is something like this:

Return-path:

Envelope-to: user@hostname.com

Delivery-date: Thu, 11 Aug 2011 04:34:02 -0400

Received: from user by hostname.com with local (Exim 4.69)

(envelope-from )

id 1QrQiI-0004qM-6V

for user@hostname.com; Thu, 11 Aug 2011 04:34:02 -0400

From: root@hostname.com (Cron Daemon)

To: user@hostname.com

Subject: Cron /opt/gsn/reports/pr.sh

Content-Type: text/plain; charset=UTF-8

Auto-Submitted: auto-generated

Message-Id:

Date: Thu, 11 Aug 2011 04:34:02 -0400

[MESSAGE CONTENT]


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images