[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Grep only mail headers via STDIN?



Joost De Cock wrote:

> On Friday 05 March 2004 10:37, Jens Benecke shoved this in my mailbox:
>> I want to create a script that greps for a specific mail header coming
>> from STDIN. "mailgrep" and "mboxgrep" don't work, they need files to work
>> on, but the mail comes via STDIN.
> 
> I'm not saying this can't be done from a shell script, but it seems like a
> typical job for Perl to me. If you are a bit familiar with it, it has some
> CPAN modules that make it very easy to do all sorts of message filtering.

Hi,

Yup. But this program will be called tens of thousands of times per day,
probably per hour, on our mail server, and I don't like the idea of firing
up a several MB large interpreter with tons of libraries for each instance.
 
> This may be overkill for you if it means you have to pick up Perl for just
> this, but you may find it to be usefull so...

Yes. :)
I already have a perl implementation (forgot to say). It just doesn't scale.



 
> DISCLAIMER
> This e-mail and any attached files are confidential and may be legally
> privileged. If you are not the addressee, any disclosure, reproduction,

... and this mail has just been archived in thousands of list archives, on
GMane, on probably thousands of harddisks of completely different people.
These disclaimers are completely useless, unless you put them on each piece
of paper that leaves your business as well.


-- 
Jens Benecke (jens at spamfreemail.de)
http://www.hitchhikers.de - Europaweite kostenlose Mitfahrzentrale
http://www.spamfreemail.de - 100% saubere Postfächer - garantiert!
http://www.rb-hosting.de - PHP ab 9? - SSH ab 19? - günstiger Traffic
.
Please DO NOT CC: me, I read the lists and newsgroups I post in!



Reply to: