Searching mail archives

Dave C lists at
Thu Jan 17 14:05:56 GMT 2008

Nigel Kendrick wrote:
> Hi,
> I need to search a months-worth of mail archives
> (/var/spool/MailScanner/archive/200611**) for a specific sender, subject and
> attachment. I have had a play with grep and awk but I am not doing very
> well!!
> Are there any utilities to help or can anyone suggest a sensible command
> line that will do the job?
> Thanks
> Nigel Kendrick
This works pretty good for me.. (watch the word wrap and the searchterm 
needs to be in single quotes)

find /var/spool/MailScanner/archive/200611?? -type f -name df\* -exec 
grep -il 'searchterm' {} \;

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list