🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.mh
Article #2003

Re: Bouncing mail...

#2003
From: Jerry Peek
Date: Fri, 02 Mar 1990 23:09
29 lines
1860 bytes
I'll just pick one of Scott's questions:

> 3) Is there any better way of "auto-filing" the messages? I've looked
>    .maildelivery stuff, but it didn't seem to be flexible enough for
>    I wanted to do.

You might look into scan format strings and form files.  They're a nice
way to pull out exactly the header information your shell script needs.
(I used to use "sed" and "awk" to parse "scan" output--what a pain!)
With this, your shell/awk/whatever auto-filer can probably get to the real
job more efficiently.

Here's a quick example of a format string that prints the message number
in a field of width 4, then a space.  After that, it prints the "Sender:"
field, if the message has one--otherwise, it prints the "From:" field.

	$ scan -format "%4(msg) %<{sender}%{sender}%|%{from}%>" last:5
	1146 "Jerry Peek" <jdpeek>
	1147 Rick Amory <RAMORY@MVUS.BITNET>
	1148 "Wilbur, Orville" <orwilbur@monk.ncs.syr.edu>
	1151 EAMYLON@SUNSET.CAS.SYR.EDU (Edwin A. Mylon)
	1152 mh-users-request@ICS.UCI.EDU

There's a lot more to this.  For instance, the %(friendly) escape gives
just addresses without the users' "real" names.  The mh-format(5) manual
page will get you going on this (if you aren't, already).

--Jerry Peek; Syracuse University Academic Computing Services; Syracuse, NY
  jdpeek@rodan.acs.syr.edu, JDPEEK@SUNRISE.BITNET        +1 315 443-3995
Technical Details
Message-ID: <9003022209.AA14923@rodan.acs.syr.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!RODAN.ACS.SYR.EDU!jdpeek
References: <ucsdhub!hp-sdd!hp-pcd!hplsla!hpubvwa!grlab!scott@ucsd.EDU> <SCOTT.90Mar1115219@grlab.grlab.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!RODAN.ACS.SYR.EDU!jdpeek
From: jdpeek@RODAN.ACS.SYR.EDU (Jerry Peek)
Newsgroups: comp.mail.mh
Subject: Re: Bouncing mail...
Message-ID: <9003022209.AA14923@rodan.acs.syr.edu>
Date: 2 Mar 90 23:09:28 GMT
References: <ucsdhub!hp-sdd!hp-pcd!hplsla!hpubvwa!grlab!scott@ucsd.EDU> <SCOTT.90Mar1115219@grlab.grlab.UUCP>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 29