Hi, 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.
So I need to write something like | condredirect [EMAIL PROTECTED] egrep "^X-Spam-Flag: YES" BUT where grep would "exit 1;" and not search any further when it encounters the first empty line (the end of the mail headers) Backgroud: I want to filter SPAM but I don't want to filter attached SPAM that people forward to me to analyze. So I can't just grep for "X-Spam-Flag:". Thanks! -- 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! -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]