I'm trying to create a script that periodically emails a report to a user with the 
sender and subjects of the emails that got flagged as spam.  The snippet below is from 
my spamlog.  Does anyone know how to extract just the "From: somesender <[EMAIL 
PROTECTED]>" and "Subject: details of transaction" portions using SED or some other 
unix tool?


2003-08-20 08:44:32 From: somesender <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 
Subject: details of transaction
Received: by system1.ida.org with spam-scanned
        for <[EMAIL PROTECTED]>; Wed, 20 Aug 2003 08:44:32 -0400
from localhost [127.0.0.1] by exim
        with SpamAssassin (2.60-cvs 1.193-2003-06-13-exp);
        Wed, 20 Aug 2003 08:44:32 -0400
         X-Spam-Status: Yes, hits=5.0 required=5.0 
tests=DATE_IN_PAST_03_06,FORGED_MUA_OUTLOOK
        INVALID_DATE,MIME_BOUND_NEXTPART,MISSING_MIMEOLE,MSGID_FROM_MTA_BACKUP
        NO_REAL_NAME,RCVD_IN_DYNABLOCK Sender: [EMAIL PROTECTED]


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to