From Wotan Thu Jan 23 19:23:58 1997 Newsgroups: comp.mail.misc,alt.fan.e-t-b Path: fu-berlin.de!news-ber1.dfn.de!news-fra1.dfn.de!news-koe1.dfn.de!main.Germany.EU.net!EU.net!howland.erols.net!ix.netcom.com!Netcom.shell.com From: Wotan Subject: Re: procmail recipe to find empty body? Message-ID: X-Comment: Aw, are you offended? Sender: wotan@netcom15.netcom.com Organization: The Lunatic Fringe X-No-Archive: yes References: <5c6hao$8qf@alpha.NetUSA.Net> Date: Thu, 23 Jan 1997 04:38:04 GMT Lines: 36 In article <5c6hao$8qf@alpha.NetUSA.Net>, Eli the Bearded wrote while drinking: >Every couple of weeks I get a spurt of messages that fit the >following pattern: > >1. Hostname has "cd-online" in it (the top level domain is not constant, > however). > >2. "^Subject: No subject$" > >3. "^X-Mailer: $" > >4. Delivered to the address on my web > pages. > >5. Body length of one or fewer words. > >I know how to write procmail recipes for the four bits, but getting >these has made me wonder how to detect that fifth bit from a recipe. >An autoresponder that triggered on any empty message I got would >save me the trouble of asking by hand if the person had intended to >send me something. How about: :0 B * < 5 Or, for more accuracy, set it to do a score on the body counting characters. If less than a set amount, auto-respond. procmailsc has a couple of excellant examples to help you out. -- The man who sets out to carry a cat by its tail learns something that will always be useful and which never will grow dim or doubtful. -- Mark Twain.