🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83488

Re: Please consider this INN patch for mailpost

#83488
From: Julien ÉLIE
Date: Mon, 04 Oct 2010 17:30
48 lines
3163 bytes
Hi Dieter,

>> Anyway, I see in lib/innconf.c that when "fromhost" is unset, it uses:
>>
>>     if (innconf->fromhost == NULL)
>>         innconf->fromhost = xstrdup(GetFQDN(innconf->domain));
>>
>> Therefore, the definition in mailpost will do nothing (and no harm) but
>> it prevents the following line:
>>   $Gateway .= '|' . $INN::Config::pathhost if $INN::Config::pathhost;
>> to put a "|" at the beginning of the regexp in case $Gateway is not
> defined.
>
> You are correct that at this point, I assumed "$Gateway" was not empty.
> Was that in fact a bad assumption?

One can use the empty string:

19:25 news@trigo ~% grep fromhost ~/etc/inn.conf
fromhost:               ""
19:25 news@trigo ~% innconfval -i  ~/etc/inn.conf -s | grep FROMHOST
FROMHOST=''; export FROMHOST;


Note that, when unset (NULL), the value is properly set:

19:26 news@trigo ~% grep fromhost ~/etc/inn.conf
#fromhost:              news.trigofacile.com
19:26 news@trigo ~% innconfval -i  ~/etc/inn.conf -s | grep FROMHOST
FROMHOST='news.trigofacile.com'; export FROMHOST;



Anyway, I believe that the case of an empty string should not occur.
It is a misconfiguration.  News administrators are not supposed to
break their server...  What, for instance, if fromhost is itself a pattern
like "a|b|c" or ".*"?

I also did not test whether the dot means everything or a real dot
in $Gateway...

-- 
Julien ÉLIE

« -- Du potage : c'est tout ce que le cuisinier a pu faire !
  -- Ce blocus devient très horripilant !
  -- Blocus, c'est ton cuisinier ? » (Astérix) 
Technical Details
Message-ID: <i8d2vq$219$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder4.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-48-199.w83-114.abo.wanadoo.fr!not-for-mail
References: <i4s5et$6km$1@snarked.org> <i82hhu$74b$1@news.trigofacile.com> <i82sm5$9g3$1@snarked.org> <i89ruf$efp$1@news.trigofacile.com> <i8bpb9$hp$1@snarked.org>

Show Full Headers
Complete Article Headers
Message-ID: <i8d2vq$219$1@news.trigofacile.com>
Subject: Re: Please consider this INN patch for mailpost
Date: Mon, 4 Oct 2010 19:30:36 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <i4s5et$6km$1@snarked.org> <i82hhu$74b$1@news.trigofacile.com> <i82sm5$9g3$1@snarked.org> <i89ruf$efp$1@news.trigofacile.com> <i8bpb9$hp$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder4.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-48-199.w83-114.abo.wanadoo.fr!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 48
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="Windows-1252";
 reply-type=original
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 4 Oct 2010 17:30:34 +0000 (UTC)
Injection-Info: news.trigofacile.com;
 posting-host="aaubervilliers-151-1-48-199.w83-114.abo.wanadoo.fr:83.114.132.199";
 logging-data="2089"; mail-complaints-to="abuse@trigofacile.com"
In-Reply-To: <i8bpb9$hp$1@snarked.org>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6002.18197
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18263
X-Original-Bytes: 2997