source: trunk/third/sed/testsuite/distrib.sed @ 17271

Revision 17271, 1.4 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17270, which included commits to RCS files with non-trunk default branches.
Line 
1#   This is straight out of C News
2#
3#
4# All this does is massage the headers so they look like what news
5# software expects.  To:, Cc: and Resent-*: headers are masked.
6# Reply-To: is turned into references, which is questionable (could
7# just as well be dropped.
8#
9# The From: line is rewritten to use the "address (comments)" form
10# instead of "phrase <route>" form our mailer uses.  Also, addresses
11# with no "@domainname" are assumed to originate locally, and so are
12# given a domain.
13#
14# The Sender: field below reflects the address of the person who
15# maintains our mailing lists.  The Approved: field is in a special
16# form, so that we can do bidirectional gatewaying.  Any message
17# in a newsgroup that bears this stamp will not be fed into the
18# matching mailing list.
191{i\\
20Path: $path
21}
22
23:a
24/^[Rr]eceived:/b r
25/^[Nn]ewsgroups:/b r
26/^[Pp]ath:/b r
27/^[Tt][Oo]:/s/^/Original-/
28/^[Cc][Cc]:/s/^/Original-/
29/^[Rr][Ee][Ss][Ee][Nn][Tt]-.*/s/^/Original-/
30/^[Mm][Ee][Ss][Ss][Aa][Gg][Ee]-[Ii][Dd]:/s/@/.$newsgroup@/
31s/^[Ii]n-[Rr]eply-[Tt]o:/References:/
32/^From:/{
33        s/<\([^@]*\)>\$/<\1@$thissite>/
34        s/^From:[       ][      ]*\(.*\)  *<\(.*\)>\$/From: \2 (\1)/
35        }
36s/-[Ii]d:/-ID:/
37s/^[Ss][Uu][Bb][Jj][Ee][Cc][Tt]:[       ]*$/Subject: (none)/
38s/^\([^:]*:\)[   ]*/\1 /
39/^\$/{i\\
40        Newsgroups: $newsgroup\\
41        Distribution: $distribution\\
42        Sender: $admin@$thissite\\
43        Approved: $newsgroup@cygnus.com
44        b e
45}
46p
47n
48b a
49:r
50s/.*//g
51n
52/^[     ]/b r
53b a
54:e
55p
56n
57b e
Note: See TracBrowser for help on using the repository browser.