Thread View: news.software.nn
31 messages
31 total messages
Started by Arctic Fidelity
Sat, 26 Feb 2005 18:30
Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Sat, 26 Feb 2005 18:30
Date: Sat, 26 Feb 2005 18:30
37 lines
3083 bytes
3083 bytes
Hello everyone, I've a bit of a problem. Well, quite a bit of problems, but here's the main one. I am running Slackware 10.1, and I'm using the nn that comes distributed with it. This is version 6.6.4, and though I'm aware that 6.6.5 is out, and that "everyone should be using it," I was unable to successfully compile it on my system (if anyone could give me help with that, I would appreciate it). Since I have used 6.6.4 version successfully in the past, I figured that I would be safe enough here, as this is a problem I did not have previously. The first problem was easy, and very annoying. When I would start up nn, it would say that my hostname was not a fully qualified domain name. The hostname it was reading was the shortname, and it never picked up the rest of the fqdn that was available if someone used "hostname -f". However, the command "hostname fully.qualified.domain" worked fine, and nn did not barf on it. Now, the real problem is with my NNTPSERVER field. I edited /etc/nntpserver, which is the file that nn has been configured to read for the NNTPSERVER variable, to contain "news.server.com". However, when running nn, the only error I receive is that "NNTPSERVER is invalid." I have tried manually setting the environment variable, and with the same effect. I could not get a copy of the 6.6.4 source code, so I could not see what was going on here. However, looking at the 6.6.5 source, everything looked fine, I can't admit to understanding every bit of it, but at any rate, I didn't see anything glaringly obvious to my newbie-ish eyes. Can anyone here explain why nn is doing this? Why will it not accept my news server? I have tested the server with tin and trn, and both seem to work. I have also googled about this, but I could not find anything regarding this problem. Thanks a bunch, Arctic Fidelity
Re: Problem with NN and /etc/nntpserver
Author: Alan J Rosenthal
Date: Mon, 28 Feb 2005 04:26
Date: Mon, 28 Feb 2005 04:26
32 lines
1880 bytes
1880 bytes
I've found using the distributed nn to be inadequate in Debian; dunno about
slackware. I recommend solving the compilation problem. Perhaps post the
error messages you're getting. What did you put in config.h?
This is my config.h (insert the domain, and then I think that these are
the only two required linuxizations):
122c122
< /* #define DOMAIN "frobozz.bogus" */
---
> #define DOMAIN "dgp.toronto.edu"
141c141
< #include "s-sunos5.h"
---
> #include "s-linux.h"
152c152
< #include "m-sparc.h"
---
> #include "m-i80386.h"
>Now, the real problem is with my NNTPSERVER field. I edited /etc/nntpserver,
>which is the file that nn has been configured to read for the NNTPSERVER
>variable, to contain "news.server.com". However, when running nn, the only
>error I receive is that "NNTPSERVER is invalid."
% host news.server.com
Host news.server.com not found: 3(NXDOMAIN)
%
That would be why. It looks from the source code that this message means
that the hostname lookup failed.
Re: Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Mon, 28 Feb 2005 06:02
Date: Mon, 28 Feb 2005 06:02
31 lines
2397 bytes
2397 bytes
Alan J Rosenthal <flaps@dgp.toronto.edu> wrote: > I've found using the distributed nn to be inadequate in Debian; dunno about > slackware. I recommend solving the compilation problem. Perhaps post the > error messages you're getting. What did you put in config.h? I might try this out, again. If I decide to pursue it, then I will definitely post up the error messages and such. >>variable, to contain "news.server.com". However, when running nn, the only >>error I receive is that "NNTPSERVER is invalid." > > % host news.server.com > Host news.server.com not found: 3(NXDOMAIN) > % > > That would be why. It looks from the source code that this message means > that the hostname lookup failed. Hehe, actually, sorry, I wasn't meaning news.server.com to be the *actual* name I was using. :-) The real one I'm using is news.gvtc.com. I was just meaning to demonstrate the form. % host news.gvtc.com news.gvtc.com is an alias for news-60.giganews.com. news-60.giganews.com has address 216.196.97.131 news.gvtc.com is an alias for news-60.giganews.com. news.gvtc.com is an alias for news-60.giganews.com. % - Arctic Fidelity
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Tue, 01 Mar 2005 04:35
Date: Tue, 01 Mar 2005 04:35
26 lines
2457 bytes
2457 bytes
Well, I took another shot, since I figured that I *really really* wanted to run nn. :-) I downloaded nn-6.6.5.tar.Z and then was confused about the message on the ftp which informed me that nn-6.6.5.tar.Z was actually version 6.6.3. :-o Well, I tried the patches and found them to be reversed, so it turns out that all is well with the world! I took another look at my config, and realized that in the Makefile, for CPP I had specified a bad value, and then I changed that and everything was hunky dory for the install. It worked like a charm! Now, I'm still having problems with my hostname...anyone want to tackle this? I'm going to read up on some stuff and possibly hack some nn code to fix this. On the plus side, the problem with the nntpserver is no longer there! Can someone say HURRAY! I tried out the newsreader and realized once again why I love nn: it's just so effecient and fast! Now, the other problem I'm having now is that I need to make nn send a different From: header. Because the one I have is munged up badly. I'm currently searching for this answer. - Arctic Fidelity -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: Problem with NN and /etc/nntpserver
Author: Cord Beermann
Date: Tue, 01 Mar 2005 12:38
Date: Tue, 01 Mar 2005 12:38
14 lines
1640 bytes
1640 bytes
flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >I've found using the distributed nn to be inadequate in Debian; I'll happiliy accept patches for nn-problems. (as i'm the Debian-Maintainer.) The Development is once again dead. Even as nn has the most effective method to read news, no one seems to provide a living newsreader, which adopts this User-Interface... Cord PS: Sven: and slrn is not the answer.
Re: Problem with NN and /etc/nntpserver
Author: Kyler Laird
Date: Tue, 01 Mar 2005 14:08
Date: Tue, 01 Mar 2005 14:08
8 lines
1227 bytes
1227 bytes
flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >I've found using the distributed nn to be inadequate in Debian; I've been using it for quite awhile. What's the problem? Am I missing something interesting in other versions? --kyler
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Kyler Laird
Date: Tue, 01 Mar 2005 14:08
Date: Tue, 01 Mar 2005 14:08
14 lines
1564 bytes
1564 bytes
Arctic Fidelity <af@homeunix.net> writes: >Now, the other problem I'm having now is that I need to make nn send a >different From: header. Because the one I have is munged up badly. I'm >currently searching for this answer. I put these lines in my init file. set mail-header From: Kyler Laird <Kyler@news.Lairds.org> set news-header From: Kyler Laird <Kyler@news.Lairds.org> (I'd like to have them generated dynamically so I can use dated addresses like Mutt does.) --kyler
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Mike Hoehn
Date: Tue, 01 Mar 2005 14:55
Date: Tue, 01 Mar 2005 14:55
31 lines
2337 bytes
2337 bytes
Arctic Fidelity <af@homeunix.net> writes: >[...] Now, I'm still >having problems with my hostname...anyone want to tackle this? I'm going >to read up on some stuff and possibly hack some nn code to fix this. IIRC setting /etc/HOSTNAME to the fqdn worked for me. Although I never had problems, I suppose it's not meant to be used like this. >On the plus side, the problem with the nntpserver is no longer there! How did you actually solve that? I don't quite understand what you wrote. Was it just a bad value in the Makefile? Personally I have hardcoded the nntpserver into the source, as well as the password. This way I don't have to type the password everytime I start nn. This might not be suitable for multiuser-systems, though. But I can live with it... :) >Now, the other problem I'm having now is that I need to make nn send a >different From: header. Because the one I have is munged up badly. I'm >currently searching for this answer. Put this line into ~/.nn/init: set news-header From: Your Name <your@addy.whatever> Mike
Re: Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Tue, 01 Mar 2005 15:20
Date: Tue, 01 Mar 2005 15:20
22 lines
2130 bytes
2130 bytes
Cord Beermann <cord@Wunder-Nett.org> writes: >flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >The Development is once again dead. Even as nn has the most effective >method to read news, no one seems to provide a living newsreader, >which adopts this User-Interface... Well, despite my lack of "good programming skills" I'm sure I would love to develop things as the go along, when I have time, as nn is the best way I have found to read news. The only problem is that time issue, and general competency. I'm hoping to fix the "hostname" problem here soon, and then I'll post some patches, unless I'm not realizing what's going on here with the hostname issues, and it's a problem with my configuration. - Arctic Fidelity -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Alan J Rosenthal
Date: Tue, 01 Mar 2005 16:11
Date: Tue, 01 Mar 2005 16:11
16 lines
1638 bytes
1638 bytes
Arctic Fidelity <af@homeunix.net> writes: >Now, the other problem I'm having now is that I need to make nn send a >different From: header. Because the one I have is munged up badly. I'm >currently searching for this answer. Did you take my suggestion of putting in the #define for DOMAIN? >> % host news.server.com >> Host news.server.com not found: 3(NXDOMAIN) ... >Hehe, actually, sorry, I wasn't meaning news.server.com to be the >*actual* name I was using. :-) The real one I'm using is news.gvtc.com. Smiles aside, I suspect that your /etc/nntpserver file did not say exactly "news.gvtc.com" either. Perhaps there are control characters, perhaps nn reads the first line and you began with a newline, something like that.
Re: Problem with NN and /etc/nntpserver
Author: Alan J Rosenthal
Date: Tue, 01 Mar 2005 16:21
Date: Tue, 01 Mar 2005 16:21
38 lines
3058 bytes
3058 bytes
>flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >>I've found using the distributed nn to be inadequate in Debian; Sorry for not being more specific, but I don't remember all the quirks I encountered. One is that it formulates a From: line which has an e-mail address "flaps@AUTO", which I guess is supposed to be substituted by some other component. I don't know what component that would be, but it's not happening in my pipeline. It gets posted that way. But it's probably my local configuration and I don't assume I can blame you for this problem. Another is, of course, that it doesn't include my References: line patch. I can hardly consider this to be a packaging error, either. The digest-splitting was messed up, e.g. reading comp.risks. This one might indeed be a packaging error on your part. Or it might be a quirk of C-News (not my choice, I don't run the news server) which nn reacts badly to. Although I'm running a standard 6.6.5 except for my References: patch (I posted my References: patch here not too long ago (because I kept forgetting to get around to it)) and the diffs to config.h I posted upthread. That's all that comes to mind at the moment, and that might be everything. Basically, compiling my own was easier than figuring out that "AUTO" thing, especially since there was a reasonable chance that the solution would be to replace some other component which I didn't want to replace and I'd end up compiling my own anyway. Throw in my desire to have my References: patch back (which I got used to prior to switching to Debian, so editing down overflowing References: lines was getting really tiresome), and I just compiled my own nn, which was quick. I'm still using your nn deb, of course. In a case like this I install the package and just replace the binary (actually I put it in /usr/local/bin/nn, not even overwriting the standard nn binary), which saves a bunch of fiddling with auxiliary files. I think I'm the only person at DGP using nn, but I'm not sure -- it's available to everyone here by being in /usr/local/bin...
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Wed, 02 Mar 2005 04:37
Date: Wed, 02 Mar 2005 04:37
58 lines
3241 bytes
3241 bytes
flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >Arctic Fidelity <af@homeunix.net> writes: >>Now, the other problem I'm having now is that I need to make nn send a >>different From: header. Because the one I have is munged up badly. I'm >>currently searching for this answer. >Did you take my suggestion of putting in the #define for DOMAIN? I am philosophically opposed to taking that approach. :-) I much prefer to find a good way to do this with variables and dynamics rather than hard coding much of anything. I fixed that problem as well, after a short search. The mail-headers and news-headers variable in the init file works quite well, as prescribed in a previous post here. Fortunately, Google came to a nice rescue there. >>> % host news.server.com >>> Host news.server.com not found: 3(NXDOMAIN) >... >>Hehe, actually, sorry, I wasn't meaning news.server.com to be the >>*actual* name I was using. :-) The real one I'm using is news.gvtc.com. >Smiles aside, I suspect that your /etc/nntpserver file did not say exactly >"news.gvtc.com" either. Perhaps there are control characters, perhaps nn >reads the first line and you began with a newline, something like that. Actually I can assure you that I thought of this, and I did actually try to figure out what might have caused it. I tried different variations of the file, including different hidden and non-hidden characters in the file to see what would happen, including (assuming X = news.gvtc.com): \ X \ X\ \ X\n X X\ X\ \n \tX\n \tX \tX \nX\n \nX\ \nX\ \n ... I just received my source code files for 6.6.4 and I'm going to proceed in solving this issue and finding out exactly what was going wrong, as well as figure out what I'm going to be doing about the hostname issue. - Arctic Fidelity -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Wed, 02 Mar 2005 04:41
Date: Wed, 02 Mar 2005 04:41
45 lines
3022 bytes
3022 bytes
Mike Hoehn <spamhere@birnehh.shacknet.nu> writes: >Arctic Fidelity <af@homeunix.net> writes: >>[...] Now, I'm still >>having problems with my hostname...anyone want to tackle this? I'm going >>to read up on some stuff and possibly hack some nn code to fix this. >IIRC setting /etc/HOSTNAME to the fqdn worked for me. Although I never >had problems, I suppose it's not meant to be used like this. Tried that, didn't work. It should actually work like this, and I do belive it was meant to be used like this, but it still didn't work. :-) >>On the plus side, the problem with the nntpserver is no longer there! >How did you actually solve that? I don't quite understand what you wrote. >Was it just a bad value in the Makefile? In the first section, I misinterpreted something and though that I should use : CC = /usr/bin/gcc CPP = /usr/bin/g++ Since, this was obviously not correct, and the errors that I was getting were dealing with things I had noted were part of C, but NOT part of C++, or at least that were different, combined with the "bad style" "invalid format" errors, I had an intuitive hunch that something was going wrong with my presumed C++ compiler. To test, I changed CPP to = /usr/bin/gcc -E, and what do you know? It works. >Personally I have hardcoded the nntpserver into the source, as well as >the password. This way I don't have to type the password everytime I >start nn. This might not be suitable for multiuser-systems, though. >But I can live with it... :) I can't really live with hard coding. -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: Problem with NN and /etc/nntpserver
Author: Kyler Laird
Date: Wed, 02 Mar 2005 15:08
Date: Wed, 02 Mar 2005 15:08
14 lines
1471 bytes
1471 bytes
flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >One is that it formulates a From: line which has an e-mail address >"flaps@AUTO", [...] >Basically, compiling my own was easier than figuring out that "AUTO" >thing, Yeow! It's difficult for me to believe that it wouldn't have been easier to just specify "set news-header From: " to something you like. --kyler
Re: Problem with NN and /etc/nntpserver
Author: Alan J Rosenthal
Date: Wed, 02 Mar 2005 21:21
Date: Wed, 02 Mar 2005 21:21
15 lines
1576 bytes
1576 bytes
Kyler Laird <Kyler@news.Lairds.org> writes: >flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >>Basically, compiling my own was easier than figuring out that "AUTO" >>thing, > >Yeow! It's difficult for me to believe that it wouldn't have been >easier to just specify "set news-header From: " to something you like. Er... That solves a different problem. I'm running a multiuser system here... I want it to work for everyone, and most users will not have that 'set' command in their .nn/init files. And as I went on to say, that may not have been a compelling enough reason but what tipped the balance is wanting my References: patch in.
Re: Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Wed, 02 Mar 2005 22:26
Date: Wed, 02 Mar 2005 22:26
15 lines
1764 bytes
1764 bytes
Kyler Laird <Kyler@news.Lairds.org> writes: >flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >Yeow! It's difficult for me to believe that it wouldn't have been >easier to just specify "set news-header From: " to something you like. Especially since a quick search online solved it for me. - Arctic Fidelity -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Michael T Pins
Date: Fri, 04 Mar 2005 15:56
Date: Fri, 04 Mar 2005 15:56
31 lines
2483 bytes
2483 bytes
Arctic Fidelity <af@homeunix.net> writes: >Well, I took another shot, since I figured that I *really really* wanted >to run nn. :-) I downloaded nn-6.6.5.tar.Z and then was confused about >the message on the ftp which informed me that nn-6.6.5.tar.Z was >actually version 6.6.3. :-o Well, I tried the patches and found them to >be reversed, so it turns out that all is well with the world! Oops. No one noticed that before (or, at least no one's mentioned it before). Fixed. >I took another look at my config, and realized that in the Makefile, for >CPP I had specified a bad value, and then I changed that and everything >was hunky dory for the install. It worked like a charm! Now, I'm still >having problems with my hostname...anyone want to tackle this? I'm going >to read up on some stuff and possibly hack some nn code to fix this. nn uses the gethostname() to get your hostname. What error are you getting? >Now, the other problem I'm having now is that I need to make nn send a >different From: header. Because the one I have is munged up badly. I'm >currently searching for this answer. What part of it is munged? This may be related to your hostname problem. -- ************************************************************************** * Michael T Pins | mtpins@nndev.org * * keeper of the nn sources | mtpins@visi.com * * ftp://ftp.nndev.org/pub | #include <std.disclaimer> *
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Michael T Pins
Date: Fri, 04 Mar 2005 15:59
Date: Fri, 04 Mar 2005 15:59
19 lines
1805 bytes
1805 bytes
Mike Hoehn <spamhere@birnehh.shacknet.nu> writes: >Personally I have hardcoded the nntpserver into the source, as well as >the password. This way I don't have to type the password everytime I >start nn. This might not be suitable for multiuser-systems, though. >But I can live with it... :) You can also put your nntp-user and nntp-password in your init file: set nntp-user joebob set nntp-password badpass Though obviously there are security issues in doing so. -- ************************************************************************** * Michael T Pins | mtpins@nndev.org * * keeper of the nn sources | mtpins@visi.com * * ftp://ftp.nndev.org/pub | #include <std.disclaimer> *
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Neil W Rickert
Date: Fri, 04 Mar 2005 16:51
Date: Fri, 04 Mar 2005 16:51
16 lines
1662 bytes
1662 bytes
Michael T Pins <mtpins@visi.com> writes: >You can also put your nntp-user and nntp-password in your init file: >set nntp-user joebob >set nntp-password badpass I tried that yesterday. It didn't work. Or is this for the next version? >Though obviously there are security issues in doing so. It would be better than setting them on the command line via a script (as I currently do), where the info is available with the "ps" command.
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Michael T Pins
Date: Fri, 04 Mar 2005 18:47
Date: Fri, 04 Mar 2005 18:47
30 lines
2326 bytes
2326 bytes
Neil W Rickert <rickert+nn@cs.niu.edu> writes: >Michael T Pins <mtpins@visi.com> writes: >>You can also put your nntp-user and nntp-password in your init file: >>set nntp-user joebob >>set nntp-password badpass >I tried that yesterday. It didn't work. Or is this for the next >version? That code hasn't changed since I added username/password support back in nn-6.6.0. Is it still prompting you for you username and password? >>Though obviously there are security issues in doing so. >It would be better than setting them on the command line via a script >(as I currently do), where the info is available with the "ps" >command. True. And really, as long as your init file isn't readable by anyone else, it's not a large risk (assuming that your news password is different than your real password). -- Michael T Pins | "It is not knowable how long that conflict mtpins@nndev.org | (Iraq) would last. It could last, you know, keeper of the nn sources | six days, six weeks. I doubt six months" ftp://ftp.nndev.org/pub | - Donald Rumsfeld, Feb 7, 2003
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Neil W Rickert
Date: Fri, 04 Mar 2005 22:39
Date: Fri, 04 Mar 2005 22:39
24 lines
2060 bytes
2060 bytes
Michael T Pins <mtpins@nndev.org> writes: >Neil W Rickert <rickert+nn@cs.niu.edu> writes: >>Michael T Pins <mtpins@visi.com> writes: >>>You can also put your nntp-user and nntp-password in your init file: >>>set nntp-user joebob >>>set nntp-password badpass >>I tried that yesterday. It didn't work. Or is this for the next >>version? >That code hasn't changed since I added username/password support back in >nn-6.6.0. Is it still prompting you for you username and password? I'm using 6.6.5. I'll try it again tonight, just in case there was a typo. When I tried yesterday, it prompted for user/password. Then, after authenticating, it complained about those lines in my init. Note that this was my personal init, not the global one. It looked to me as if it was authenticating before reading init.
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Neil W Rickert
Date: Sat, 05 Mar 2005 01:29
Date: Sat, 05 Mar 2005 01:29
22 lines
2046 bytes
2046 bytes
Michael T Pins <mtpins@nndev.org> writes: >Neil W Rickert <rickert+nn@cs.niu.edu> writes: >>>set nntp-user joebob >>>set nntp-password badpass >>I tried that yesterday. It didn't work. Or is this for the next >>version? >That code hasn't changed since I added username/password support back in >nn-6.6.0. Is it still prompting you for you username and password? I just tried again. Yes, it still prompts. Clearly init is being read *after* authentication. Defining those on the command line is currently the only way to have it work (apart from typing them in each time). Fortunately, I am the only user of this system, so I don't have to worry about the output of "ps" giving away the password. Still, it would be nice if this could be done in init.
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Sat, 05 Mar 2005 05:44
Date: Sat, 05 Mar 2005 05:44
41 lines
3156 bytes
3156 bytes
Michael T Pins <mtpins@visi.com> writes: >Arctic Fidelity <af@homeunix.net> writes: >>was hunky dory for the install. It worked like a charm! Now, I'm still >>having problems with my hostname...anyone want to tackle this? I'm going >>to read up on some stuff and possibly hack some nn code to fix this. >nn uses the gethostname() to get your hostname. What error are you >getting? Basically, it's the correct error, and the program is running precisely as intended. I looked at the code, and saw the gethostname(). I checked up some things. Basically, Slackware's default script sets the hostname to "cat /etc/HOSTNAME | cut -f1 -d." or some such, which means only the first part gets to the actual "hostname". The rest is stored into the dnsdomainname. If you use "hostname -f" you can get the fqdn, but gethostname() returns the main hostname, not the dnsdomain and other such things which are added on with "hostname -f". I thought about hacking around and making it work, but it's not too much trouble for me to remove teh "cut -f1 -d." from the script. I think it's a bit buggish though, as I usually set up my computers so that hostname only gives the first part of the hostname, and not the domain and such. >>Now, the other problem I'm having now is that I need to make nn send a >>different From: header. Because the one I have is munged up badly. I'm >>currently searching for this answer. >What part of it is munged? This may be related to your hostname problem. Yes, I didn't mean that nn was messing it up on purpose. :-) It's doing the right thing, it's just that I have a different return address and such than what my physical computer address is. So...setting a mail-header and news-header worked quite well. - Arctic Fidelity -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Michael T Pins
Date: Sat, 05 Mar 2005 06:33
Date: Sat, 05 Mar 2005 06:33
54 lines
2871 bytes
2871 bytes
Neil W Rickert <rickert+nn@cs.niu.edu> writes:
>Michael T Pins <mtpins@nndev.org> writes:
>>Neil W Rickert <rickert+nn@cs.niu.edu> writes:
>>>>set nntp-user joebob
>>>>set nntp-password badpass
>>>I tried that yesterday. It didn't work. Or is this for the next
>>>version?
>>That code hasn't changed since I added username/password support back in
>>nn-6.6.0. Is it still prompting you for you username and password?
>I just tried again.
>Yes, it still prompts. Clearly init is being read *after* authentication.
>Defining those on the command line is currently the only way to have
>it work (apart from typing them in each time).
>Fortunately, I am the only user of this system, so I don't have to
>worry about the output of "ps" giving away the password. Still, it
>would be nice if this could be done in init.
And I was wrong, I did fix this in nn-6.7. Oops. The problem with running
your own beta code is you tend to forget what hasn't been fixed in the main
codebase yet.
As a quick workaround for anyone that wants this before nn-6.7 is released,
find the following code in nn.c around line 858:
#ifdef NNTP
if (who_am_i != I_AM_VIEW)
nntp_check();
#endif
Change it to:
#ifdef NNTP
if (who_am_i != I_AM_VIEW) {
visit_init_file(0, argv[1]);
nntp_check();
}
#endif
Which should do the trick.
--
Michael T Pins | "It is not knowable how long that conflict
mtpins@nndev.org | (Iraq) would last. It could last, you know,
keeper of the nn sources | six days, six weeks. I doubt six months"
ftp://ftp.nndev.org/pub | - Donald Rumsfeld, Feb 7, 2003
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Michael T Pins
Date: Sat, 05 Mar 2005 06:55
Date: Sat, 05 Mar 2005 06:55
41 lines
3498 bytes
3498 bytes
Arctic Fidelity <spam@sacrificumdeo.net> writes: >Michael T Pins <mtpins@visi.com> writes: >>Arctic Fidelity <af@homeunix.net> writes: >>>was hunky dory for the install. It worked like a charm! Now, I'm still >>>having problems with my hostname...anyone want to tackle this? I'm going >>>to read up on some stuff and possibly hack some nn code to fix this. >>nn uses the gethostname() to get your hostname. What error are you >>getting? >Basically, it's the correct error, and the program is running precisely >as intended. I looked at the code, and saw the gethostname(). I checked >up some things. Basically, Slackware's default script sets the hostname >to "cat /etc/HOSTNAME | cut -f1 -d." or some such, which means only the >first part gets to the actual "hostname". The rest is stored into the >dnsdomainname. If you use "hostname -f" you can get the fqdn, but >gethostname() returns the main hostname, not the dnsdomain and other >such things which are added on with "hostname -f". I thought about >hacking around and making it work, but it's not too much trouble for me >to remove teh "cut -f1 -d." from the script. I think it's a bit buggish >though, as I usually set up my computers so that hostname only gives the >first part of the hostname, and not the domain and such. Am I missing something here? What exactly is the problem? If it's due to nn complaining that you need a fully qualified domain name, you need to uncomment the entry for DOMAIN in config.h. This used to be required, and is still the correct way to do things in general. I only added the ability for nn to get it from your hostname in nn-6.6.3, when people started distributing nn as a preconfigured package. gethostname really should just return the machine name, not the FQDN. Pre- nn-6.6.3, nn wouldn't even compile if DOMAIN wasn't defined in config.h. -- Michael T Pins | "It is not knowable how long that conflict mtpins@nndev.org | (Iraq) would last. It could last, you know, keeper of the nn sources | six days, six weeks. I doubt six months" ftp://ftp.nndev.org/pub | - Donald Rumsfeld, Feb 7, 2003
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Neil W Rickert
Date: Sat, 05 Mar 2005 18:58
Date: Sat, 05 Mar 2005 18:58
35 lines
1952 bytes
1952 bytes
Michael T Pins <mtpins@nndev.org> writes:
>Neil W Rickert <rickert+nn@cs.niu.edu> writes:
>>Yes, it still prompts. Clearly init is being read *after* authentication.
>As a quick workaround for anyone that wants this before nn-6.7 is released,
>find the following code in nn.c around line 858:
>#ifdef NNTP
> if (who_am_i != I_AM_VIEW)
> nntp_check();
>#endif
>Change it to:
>#ifdef NNTP
> if (who_am_i != I_AM_VIEW) {
> visit_init_file(0, argv[1]);
> nntp_check();
> }
>#endif
>Which should do the trick.
I just tried that.
init error: Error in macro 1: Unknown word >>save-full<<
init error: unknown key command: macro
It seems that something in my init file is not understandable until
later, where it was previously read.
I guess I should wait until nn-6.7
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Sun, 06 Mar 2005 07:31
Date: Sun, 06 Mar 2005 07:31
36 lines
3201 bytes
3201 bytes
Michael T Pins <mtpins@nndev.org> writes: >If it's due to nn complaining that you need a fully qualified domain name, >you need to uncomment the entry for DOMAIN in config.h. This used to be >required, and is still the correct way to do things in general. I only >added the ability for nn to get it from your hostname in nn-6.6.3, when >people started distributing nn as a preconfigured package. gethostname >really should just return the machine name, not the FQDN. Pre- nn-6.6.3, >nn wouldn't even compile if DOMAIN wasn't defined in config.h. Well, I can see how this would be a good thing, but I think it would be really nice if nn really did discover the domain and hostname dynamically, as it would make life a whole lot easier for distributing binaries. I'm working on upgrading the Slackware packages to version 6.6.5, but the one problem I'm seeing is that there is no easy way to make the DOMAIN system work on all the computer. Since Slackware configures hostname as /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d.) This means that using gethostname() only returns the machine name. And you say this is correct behaviour, but if so, then why give the error for an invalid FQDN? If nn should discover the hostname, should it not be able to discover the hostname on a properly configured Linux system, where gethostname() returns the machine name and gethostbyname() returns the DNS FQDN? What's the best method to make nn work generically on many machines without having to change the way the system configures hostname? In other words, how can I make nn discover the FQDN, rather than just the machine name? I need a generic solution that will work for distributing it in binary form. - Arctic Fidelity -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Alan J Rosenthal
Date: Sun, 06 Mar 2005 13:47
Date: Sun, 06 Mar 2005 13:47
11 lines
1651 bytes
1651 bytes
Arctic Fidelity <af@sacrificumdeo.net> writes: >In other words, how can I make nn discover the FQDN, You don't want the FQDN either. e.g. my From: address should say "flaps@dgp.toronto.edu" rather than "flaps@somestupidhost.dgp.toronto.edu". My debian install seems to have "dgp.toronto.edu" in /etc/mailname, and seems to have a FQDN in /etc/mailname on a more generically-installed machine near me. This might be the file you want, for debian, although I'm not sure because it doesn't have a man page and dpkg doesn't tell me which package owns it.
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Arctic Fidelity
Date: Sun, 06 Mar 2005 19:58
Date: Sun, 06 Mar 2005 19:58
47 lines
3620 bytes
3620 bytes
flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >Arctic Fidelity <af@sacrificumdeo.net> writes: >>In other words, how can I make nn discover the FQDN, >You don't want the FQDN either. e.g. my From: address should say >"flaps@dgp.toronto.edu" rather than "flaps@somestupidhost.dgp.toronto.edu". This isn't a problem, because of the #HIDDENNET option that you can use. If you choose to activate this option, from everything I can see, nn will strip the leading machine name from the host_name to come up with, in your case, dgp.toronto.edu from "somestupidhost.dgp.toronto.edu". >My debian install seems to have "dgp.toronto.edu" in /etc/mailname, and seems >to have a FQDN in /etc/mailname on a more generically-installed machine near >me. This might be the file you want, for debian, although I'm not sure >because it doesn't have a man page and dpkg doesn't tell me which package >owns it. I noticed the option to define a "HOSTNAME_FILE" in hostname.c. However, I didn't see it listed as an option in the config.h file, which makes me think that there is something I don't understand about it there. Another problem is that nn will/does/maybe read for the gethostname() function before actually trying to access a HOSTNAME_FILE. I'm actually using Slackware here. >From what I see, discovering the hostname from a "gethostname" type function first, before reading a file does seem to be the correct behaviour, but then...the function nn_gethostname() should provide an FQDN if it's available, and not just a machine name, because that's essentially useless on nn's side. As it is currently coded, Slackware must be redefined in order to allow for dynamic hostname discovery, which is an undesirable behaviour. If gethostname() could be substituted for some incantation of gethostbyname(), I imagine that might be something to look into. Of course, any other equally fast and valid method of reliably and thouroughly discovering the hostname would be acceptable to me. I would prefer not to have to write and patch a whole bunch of code here. :-) - Arctic Fidelity -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Mike Hoehn
Date: Mon, 07 Mar 2005 23:29
Date: Mon, 07 Mar 2005 23:29
9 lines
1443 bytes
1443 bytes
Michael T Pins <mtpins@nndev.org> writes: >As a quick workaround for anyone that wants this before nn-6.7 is released, >find the following code in nn.c around line 858: Works! :) Thanks a lot. Now I don't have to hardcode it into the source anymore. Great to see there's still something being done with nn. Mike
Re: [solved?] Problem with NN and /etc/nntpserver
Author: Michael T Pins
Date: Thu, 24 Mar 2005 20:30
Date: Thu, 24 Mar 2005 20:30
34 lines
2637 bytes
2637 bytes
Arctic Fidelity <af@sacrificumdeo.net> writes: >flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >>Arctic Fidelity <af@sacrificumdeo.net> writes: >>>In other words, how can I make nn discover the FQDN, >>You don't want the FQDN either. e.g. my From: address should say >>"flaps@dgp.toronto.edu" rather than "flaps@somestupidhost.dgp.toronto.edu". >This isn't a problem, because of the #HIDDENNET option that you can use. >If you choose to activate this option, from everything I can see, nn >will strip the leading machine name from the host_name to come up with, >in your case, dgp.toronto.edu from "somestupidhost.dgp.toronto.edu". Correct. I've added another way for nn to find the domain to nn-6.7 (the alpha version of which I should be releasing later today). What nn will now do is: If DOMAIN is defined, nn will use that. Otherwise, if the hostname is a FQDN, nn will use it. Otherwise, if there is a domain directive in /etc/resolv.conf, nn will use that. As everyone should either have a hostname that is a FQDN, or have a domain directive in /etc/resolv.conf, this should work for (nearly) everyone. -- Michael T Pins | "We're dealing with a country (Iraq) that mtpins@nndev.org | can really finance its own reconstruction, keeper of the nn sources | and relatively soon." ftp://ftp.nndev.org/pub | - Paul Wolfowitz, 3/27/03
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads