Searching mail archives

Denis Beauchemin Denis.Beauchemin at
Thu Jan 17 20:00:23 GMT 2008

Nigel Kendrick a écrit :
> Thanks to all those who replied - I will have a play, but I just wanted to
> make sure that these searches will support multiple criteria - for example,
> I am looking for an email sent by 'joe.bloggs at ...' that probably has
> 'expenses' in the subject line and was sent to 'sue.smith at ..' with an .xls
> spreadsheet attached.
> Can you do that in one pass?
> Nigel 

You could do something like this:
 grep -il 'crit3' $(grep -il 'crit2' $(grep -ril 'crit1' 

Basically the output of one search (the list of matching files) is used 
as the file list to search for the next search.  You can nest this as 
deep as you want.  It would probably be faster if the first search 
criteria returned a small number of hits.


  °v°   Denis Beauchemin, analyste
 /(_)\  Université de Sherbrooke, S.T.I.
  ^ ^   T: 819.821.8000x62252 F: 819.821.8045

More information about the MailScanner mailing list