Article View: news.software.readers
Article #46391Re: knews mailName resource
From: Kyle Tucker
Date: Wed, 10 Feb 1999 00:00
Date: Wed, 10 Feb 1999 00:00
41 lines
1953 bytes
1953 bytes
In article <lfEu2.286$wD5.60108@news.shore.net>, I wrote:
> I have tried scores of variations in both my
> config-$NNTPSERVER and ~/.Xresources file and cannot
> get this to create a different From: header. Any other
> resource I play with seems fine. Anyone successfully
> get this to work? Thanks.
I gave up and just hacked knews to read the shell variable $MAILNAME.
Works fine. Please don't critique my C programming skills. :)
*** domain.c.orig Sun Aug 23 10:23:19 1998
--- domain.c Wed Feb 10 10:39:23 1999
***************
*** 68,73 ****
--- 68,74 ----
void fix_domain_stuff()
{
+ char *mailname;
fix_domain_name();
fix_user_id();
***************
*** 78,83 ****
--- 79,87 ----
fputs("knews: Couldn't determain user id. "
"Posting will not be possible.\n", stderr);
+ mailname = getenv("MAILNAME");
+ if (mailname)
+ global.mail_name = mailname;
if (!global.mail_name || global.mail_name[0] == ' ')
global.mail_name = global.user_id;
}
--
- Kyle
Technical Details
Message-ID:
<I5iw2.909$wD5.160622@news.shore.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<lfEu2.286$wD5.60108@news.shore.net>Show Full Headers
Complete Article Headers
Message-ID: <I5iw2.909$wD5.160622@news.shore.net> Subject: Re: knews mailName resource Date: Wed, 10 Feb 1999 00:00:00 +0000 From: kylet@shore.net (Kyle Tucker) References: <lfEu2.286$wD5.60108@news.shore.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 442850184 Sender: tuckerk@shore.net Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@shore.net X-Trace: news.shore.net 918662632 204.240.232.3 (Wed, 10 Feb 1999 11:03:52 EDT) Organization: Shore.Net/Eco Software, Inc; (info@shore.net) Mime-Version: 1.0 Reply-To: kylet@shore.net NNTP-Posting-Date: Wed, 10 Feb 1999 11:03:52 EDT Newsgroups: news.software.readers