Xref: utzoo news.sysadmin:3463 news.misc:5830 news.software.nntp:1000 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!amdahl!krs From: krs@uts.amdahl.com (Kris Stephens [Hail Eris!]) Newsgroups: news.sysadmin,news.misc,news.software.nntp Subject: Re: mailing lists -> newsgroups Message-ID: <52bN02bWfas401@amdahl.uts.amdahl.com> Date: 20 Dec 90 06:20:50 GMT References: <1990Dec19.230106.13613@spectrum.CMC.COM> Reply-To: krs@amdahl.uts.amdahl.com (Kris Stephens [Hail Eris!]) Distribution: news Organization: Amdahl Corporation, Sunnyvale CA Lines: 31 In article <1990Dec19.230106.13613@spectrum.CMC.COM> news@spectrum.CMC.COM writes: >In /usr/lib/aliases, I have a line like this to make a two-way gateway to >a local newsgroup: > >ietf-hosts: "|grep -v '^From '|/usr/news/bin/inject/inews -h -n ietf.hosts -a Automatically" Watch out on this. It assumes that the inbound mail has no non-header lines starting with 'From ', which is not guaranteed. 'sed 1d' is the better approach since the first line will be the 'From ' in question. For true assuredness, awk ' $1 == "From" && NR == 1 { next } { print }' remembering, of course, to escape the $ and " characters inside the awk program for use in the aliases file. As an aside, I believe it's the rmail/smail/sendmail program with the task of appending a /usr/mail/$user file which inserts a > in front of '^From ' when it appears other than as line 1 of the header. That's certainly the case with smail, configured in the directors file by setting 'unix_from_hack'. Were it the sending-mail-engine's responsibility, it would wreck data mailed into programs, where the inserted character would alter the inbound data stream. (That last is, I admit, conjecture.) ..Kris -- Kristopher Stephens, | (408-746-6047) | krs@uts.amdahl.com | KC6DFS Amdahl Corporation | | | [The opinions expressed above are mine, solely, and do not ] [necessarily reflect the opinions or policies of Amdahl Corp. ]