vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   NNTP Gateway for Usenet ( Newsgroups ), Mailing Lists (https://vborg.vbsupport.ru/showthread.php?t=92588)

SaN-DeeP 06-18-2007 05:13 PM

I am looking for an immediate fix unable to post/export messages to newsgroups, I am able to receive/import messages properly .

Here is additional information, this was working fine 20 days back and now stopped, I am unable to fix/debug the issue.

Code:

Connecting to server, server says: 200 Text.GigaNews.Com
Server responded after user name: 381 more authentication required
Server responded after password: 281 News.GigaNews.Com
Info for microsoft.public.broadbandnet.hardware at text.giganews.com: 211 19459 1927 21385 microsoft.public.broadbandnet.hardware

Can we post? server responded: 440 posting not allowed
Posting Message 'Why would one decide to cool a computer with water instead of air ?' from Watercooling. Result: 500 syntax error or unknown command


Alfa1 06-20-2007 12:52 AM

Would it be possible to promote your forum on usenet with this hack? i.e. have each post by a forum member include a reference to your site? If so, then this may yield quite some new members.
Is there a 3.6 port of this hack? I couldn't find it.

Eccentricity 06-26-2007 07:54 PM

Quote:

Originally Posted by SaN-DeeP (Post 1271098)
I am looking for an immediate fix unable to post/export messages to newsgroups, I am able to receive/import messages properly .

Here is additional information, this was working fine 20 days back and now stopped, I am unable to fix/debug the issue.

Code:

Connecting to server, server says: 200 Text.GigaNews.Com
Server responded after user name: 381 more authentication required
Server responded after password: 281 News.GigaNews.Com
Info for microsoft.public.broadbandnet.hardware at text.giganews.com: 211 19459 1927 21385 microsoft.public.broadbandnet.hardware

Can we post? server responded: 440 posting not allowed
Posting Message 'Why would one decide to cool a computer with water instead of air ?' from Watercooling. Result: 500 syntax error or unknown command


This isn't a problem with your code. The server you are using isn't liking your login credentials (381 more authentication required) and isn't allowing posting.

Use this free server here and you will be able to post: nntp.aioe.org (Or get your credentials sorted out with giganews).

Also, if that Microsoft feed is your only one, just use one of the Microsoft Public Access servers. They all allow posting and they are free also. msnews.microsoft.com is one such server.

Eccentricity 06-26-2007 07:56 PM

Quote:

Originally Posted by Alfa1 (Post 1272146)
Would it be possible to promote your forum on usenet with this hack? i.e. have each post by a forum member include a reference to your site? If so, then this may yield quite some new members.
Is there a 3.6 port of this hack? I couldn't find it.

Each post includes a link to your thread and the member's profile in the footer of the post. You just need to add your domain name in place of the default one in the Gateway Settings menu.

There is no 3.6 port and I doubt there will be as long as this one works. There are a few bug fixes scattered out inside this thread so it might be worth doing a page by page scan to see what all is here. The hack, in it's original forum, is quite buggy but the fixes donated by members in this thread make it bearable.

Alfa1 06-27-2007 01:22 AM

Many thanks for your helpful answer. You write that after the fixes are applied, it becomes bearable. What bugs remain?

With this being such a interesting and useful add-on, I do hope that someone will try to port this, include the listed fixes and straighten out the rest of the bugs.

Eccentricity 06-27-2007 02:04 AM

Quote:

Originally Posted by Alfa1 (Post 1277379)
Many thanks for your helpful answer. You write that after the fixes are applied, it becomes bearable. What bugs remain?

With this being such a interesting and useful add-on, I do hope that someone will try to port this, include the listed fixes and straighten out the rest of the bugs.

The last bug I have is that all imported posts are dated December 31, 1969 in postbit view. That is annoying the crap out of me. I am here looking for a fix for this now.

TMM-TT 07-16-2007 10:30 AM

I don't know yet, if anyone has reported this bug - i neither don't know if I've mentioned this earlier. But there is actually a problem with usenet-servers that are configured as peer-servers, especially if the forum-usenet-gateway is spotted on the same server as there are outgoing peers. I've got a mail that made me realize this. I'm quoting myself here:

I think you've just discovered some very strange bug here. For a time ago, I moved the usenet-server to another one, internally because the main server got too high loaded with the service. By moving it to another server that only takes care of the usenet everything started to work again. The problem here seem to be the firewall that forwards traffic to my internal server. It can't handle the NAT correct so instead of taking the connection as a news-reader, all traffic are handled like they were newspeers. This is normally, by regular news-readers fixed by itself, since they are sending the string "MODE READER" as a handshake-command. The nntp-gateway don't do this, so instead of work properly some permissions are wrong on connection.

I've just tested this, and it may be fixed by adding a line into includes/nntp.php - I tried this before but something happened after that and the gateway didn't work as good as I thought. I think it works this time, but I can't confirm... (this part is quite important /TMM)

Find the lines for the handshake part. It should be around line 80 or so. You are looking for:

PHP Code:

                fputs($fp"AUTHINFO user $username\r\n"); 

Above this line, add:

PHP Code:

                fputs($fp"MODE READER\r\n");
                
$response fgets($fp128); 

By patching like this, you're telling the server that you are a client and not a server.


KidCharlemane 07-17-2007 12:27 AM

This fix did not work for me but I emailed you directly about it.

TMM-TT 07-17-2007 10:07 AM

Quote:

Originally Posted by KidCharlemane (Post 1293274)
This fix did not work for me but I emailed you directly about it.

I think that part is just a lastread-issue. Because of the local change of servers the lastread data is probably mismatching with yours. When the gateway connects to the server it reads (I think) the firstpost-lastpost-information from the server (211*) and compares it with the data stored in the database. At least it's something like that. If your value is larger than the lastpost-data sent by server (which it probably is what happened here**), the gateway won't download any new articles, since it thinks that you already have them. Resetting that value in the database might help, with a small risk that there will pop up some dupes.


**) I run a larger server and a smaller, and currently, traffic are forwarded (with a shitty NAT-rule) to the smaller due too high load on the larger. The smaller, unfortunately, have other data stored, that makes the counters differ a bit (and that is bad too)

*) When fetching posts from usenet this command is sent to the server
GROUP news.software.nntp
The server answers with
211 41 63 103 news.software.nntp

Where the data received stands for (from the example):
41 = estimated number of articles in group, 63 = first article number in the group, 103 = last article number in the group

I'm not sure if the gateway does like this, because I didn't find anything about it in the source, but since there is a lastread-field in the admincp, some similar calculations are made, that for the moment prevents new posts to reach you... And yes, that is probably my fault.. :o

vze2yqtm 07-20-2007 05:23 PM

I've added most of the hacks that were added to this thread and then installed it.. It actually took me a couple of hours to go through all the posts. Now I have a problem. I didn't install all the files that came with the original files like the setlastmsg.php, mime.php, pop.php, the XML file (cpnav_nntp_gateway.xml) because it didn't specify it in the Read Me as far as I can tell I used option 2 for installation because it was mentioned earlier in this thread. Now when I try to run mysite.com/gateway.php?debug=1 I get this error:

Code:

Parse error: syntax error, unexpected T_ELSE in /home/username/public_html/gateway.php on line 385
I'm running 3.6.7.

Anyone knows what the problem could be? It looks to me like it could be some kind of error with the code DKendall supplied only because the error seems to be coming from that line, but I'm no PHP expert and I'm not really sure.

TMM-TT 07-20-2007 06:57 PM

Quote:

Originally Posted by vze2yqtm (Post 1296746)
I've added most of the hacks that were added to this thread and then installed it.. It actually took me a couple of hours to go through all the posts. Now I have a problem. I didn't install all the files that came with the original files like the setlastmsg.php, mime.php, pop.php, the XML file (cpnav_nntp_gateway.xml) because it didn't specify it in the Read Me as far as I can tell I used option 2 for installation because it was mentioned earlier in this thread. Now when I try to run mysite.com/gateway.php?debug=1 I get this error:

Code:

Parse error: syntax error, unexpected T_ELSE in /home/username/public_html/gateway.php on line 385
I'm running 3.6.7.

Anyone knows what the problem could be? It looks to me like it could be some kind of error with the code DKendall supplied only because the error seems to be coming from that line, but I'm no PHP expert and I'm not really sure.

And what does line 385 say?

vze2yqtm 07-20-2007 08:03 PM

Looks like this is what it says:

Code:

  $kf = killfile_match();
                          else


Here's a little bit more of the code in case that part isn't enough:

Code:

        elseif ($nntp['grouptype'] == 'mail'
                AND $group['prefix']
                AND stristr($message['subject'], $group['prefix']) == false)
        {
                logging("Skip, not matching prefix: \"" . $group['prefix'] . "\"");
        }

        if(!$skip_post)
        {
          $kf = killfile_match();
                          else
                          {
                                $threadid = 0;
                                $attachmentid = 0;
                                $parentid = 0;

                                if ($nntp['grouptype'] != 'news')
                                {
                                        $message['text'] = stripfooter($message['text']);
                                }


TMM-TT 07-20-2007 08:10 PM

Ok.. Something is just missing there... This part:

PHP Code:

 $kf killfile_match();
                else 

looks like this in my gateway.php:

PHP Code:

                           $kf killfile_match();
                           if (
$kf)
                           {
                                
logging("Skip, killfile \"" $kf "\" match.");
                           }
                           else 

and after that, it looks right :)

Fabsboards 07-20-2007 09:06 PM

Are there any plans to update this for 3.6.7? If not, are there any other similar mods?

Alfa1 07-21-2007 06:50 PM

This is the only mod for Usenet.

vze2yqtm 07-22-2007 11:09 PM

It seems like I have everything working fine, but now I'm getting a 411 error no such group. I am using about 20 different newsgroups and I know some of them are good. Why am I getting this error for most of them? The servers are replying and giving info like no posting and stuff like that, why is it saying they don't exist?

Here's an example:

Code:

Connecting to server, server says: 200 aioe.org InterNetNews NNRP server INN 2.4.4 (20060818 snapshot) ready (posting ok).

Info for nntp.aioe.org at nntp.aioe.org: 411 No such group nntp.aioe.org


TMM-TT 07-23-2007 11:41 AM

Quote:

Originally Posted by vze2yqtm (Post 1298621)
411 [...snip...] I am using about 20 different newsgroups and I know some of them are good. Why am I getting this error for most of them?

Code:

Connecting to server, server says: 200 aioe.org InterNetNews NNRP server INN 2.4.4 (20060818 snapshot) ready (posting ok).

Info for nntp.aioe.org at nntp.aioe.org: 411 No such group nntp.aioe.org


It seems that something in your configuration is wrong? In the example, you are requesting the newsgroup "nntp.aioe.org" and I don't think that group exist on that server. As you say, error 411 means that the group doesn't exist, and there could be two reasons why you get that message; a) the group really don't exist there b) your configuration may be wrong somewhere (ie you have configured aioe as a server but have put the servername in the wrong field, as shown from the example).

Another thing that may be important for aioe-users: They only allow 25 posts/day per ip. If you're running a server with many users, those 25 may be used up quite fast.

vze2yqtm 07-23-2007 07:05 PM

The problem is I'm getting this with about 15 other newsgroups. It could be my settings since they are basically the same for all of them. Here's a screenshot of the settings I have (I've attached them here for future viewers and also uploaded them temporarily for ease of viewing):

https://vborg.vbsupport.ru/

Most of the newsgroups I'm attempting to use appear to not use username and passwords so that's the reason it's not included.

Newsgroup/Mailing List Email: I put in link
Forum: Forum I want it to show in
Prefix: I've left blank
Last Message: 0
Server: I put in the link again
The rest I've left blank (username and password are not required on these newsgroups) and enabled it.

Am I filling it out wrong?

By the way I appreciate your help. Thank you.

TMM-TT 07-23-2007 07:40 PM

Quote:

Originally Posted by vze2yqtm (Post 1299455)
The problem is I'm getting this with about 15 other newsgroups. It could be my settings since they are basically the same for all of them. Here's a screenshot of the settings I have (I've attached them here for future viewers and also uploaded them temporarily for ease of viewing):

http://customrequest.com/nntpgatewayscreenshot.gif

Most of the newsgroups I'm attempting to use appear to not use username and passwords so that's the reason it's not included.

Newsgroup/Mailing List Email: I put in link
Forum: Forum I want it to show in
Prefix: I've left blank
Last Message: 0
Server: I put in the link again
The rest I've left blank (username and password are not required on these newsgroups) and enabled it.

Am I filling it out wrong?

By the way I appreciate your help. Thank you.

That's true... aioe doesn't allow username/password at all, it's free to use but with a 25-post-per-day-only-limit... What newsgroups are you looking for, actually?

The only wrong I can see in your attachment is that the top field for the newsgroup-name should be an existing newsgroup. The current you have in your screenshot doesn't exist :)


Quote:

200 aioe.org InterNetNews NNRP server INN 2.4.4 (20060818 snapshot) ready (posting ok).
GROUP nntp.aioe.org
411 No such group nntp.aioe.org
I think my newsbot is a bit out of date now, but if you need a complete list of that server's groups, you can look here.

There's only one thing I'm thinking of now - does the gateway work when sending empty identification strings, since aioe don't use authentication?

vze2yqtm 07-23-2007 08:12 PM

It worked!!! Thanks again.

I changed Newsgroup/Mailing List Email to one of the groups from the link you provided (I picked alt.accounting) and got some posts. I'm actually only testing the script for now, I have not placed it in a live section of my forum. It's in an admin viewable only section.

As far as authentication, I'm not sure, but everything else seems to work fine, I guess it was just that I didn't pick the right Newsgroup name and that seemed to fix everything. I'm still testing so I may be back with more questions, but I hope everything works for now. I'll probably end up using one of the paid newsgroup solutions, but I want to get all of my testing out of the way with free newsgroups for now.

tpearl5 08-05-2007 01:35 AM

anyone get this working on 3.6.8? If so what did you have to do?

tpearl5 08-07-2007 09:44 PM

Nevermind, I got it working, I just had to up the database timeout cause it encountered a large import.

connkid25 08-20-2007 04:30 PM

I got this working on 3.6.8. Works good except for the scheduled tasks in VB. I instead want to do this by cron with the server itself. Does anyone know how to get this to work using the crontab manager?

I honestly have no clue how to set up a cron job using that and the instructions arent much help.

dotcomguy 08-20-2007 05:30 PM

Quote:

Originally Posted by connkid25 (Post 1321723)
I got this working on 3.6.8. Works good except for the scheduled tasks in VB. I instead want to do this by cron with the server itself. Does anyone know how to get this to work using the crontab manager?

I honestly have no clue how to set up a cron job using that and the instructions arent much help.

It depends on your Web host. Your Web host may have a control panel where you can enter cron jobs. Or, you might have to contact your Web host.

If you have access to add cronjobs directly, the format would be:

Code:

*/10 * * * * /usr/bin/lynx -source "http://www.example.com/forums/gateway.php"

connkid25 08-20-2007 07:47 PM

Quote:

Originally Posted by dotcomguy (Post 1321767)
It depends on your Web host. Your Web host may have a control panel where you can enter cron jobs. Or, you might have to contact your Web host.

If you have access to add cronjobs directly, the format would be:

Code:

*/10 * * * * /usr/bin/lynx -source "http://www.layover.com/forums/gateway.php"

Thanks for your reply. I have a control panel and I took a screen shot. I assume I just need a command with the direct location of the file? This is a dedicated server so I have full access.

dotcomguy 08-20-2007 08:36 PM

You would add
Code:

"/usr/bin/lynx -source "http://www.example.com/forums/gateway.php"
as the command (provided that is the correct path to your lynx and that lynx is installed)

connkid25 08-20-2007 09:05 PM

Quote:

Originally Posted by dotcomguy (Post 1321865)
You would add
Code:

"/usr/bin/lynx -source "http://www.example.com/forums/gateway.php"
as the command (provided that is the correct path to your lynx and that lynx is installed)

I just checked. It is the correct path and it is installed. Just added that. I have it set to update every 10 mins so we'll see if it works.

Thanks for taking the time to help me out with this. It's much appreciated.

EDIT: That worked! Thank you! Just had to remove the first " and everything updated.

z3r0 08-26-2007 12:27 PM

Can anybody point me in the right direction for removing the >> indents as this looks very messy.

Thanks

Mum 09-04-2007 03:14 AM

OK i've read through all the pages, but i can't figure out what's wrong. I've just installed it, and getting this error

Quote:

Gateway version 2.3.2 1 group(s) gatewayed.
Could not connect to NNTP-server. (Connection timed out (110))

Not connected
Not connected
I know it works because i tested it in my desktop news reader, no username or password needed. Here is a screen cap of my settings. Thanks in advance for your help :)

http://img528.imageshack.us/img528/5...dd47kr9.th.png

AWS 09-04-2007 09:33 PM

You're using a news server that only allows connections from your IP.
If you're using a server that doesn't require a username or password then that is the problem.

Mum 09-05-2007 12:09 AM

Apart from just Yahoo groups, can you use myspace groups? Any other ideas what other ones you can use?

silurius 09-19-2007 05:08 PM

I am having trouble with scheduling this to run in a standard cron job.

Cron job:
Code:

/usr/local/php5/bin/php /home/myuser/mysite.com/forum/gateway.php
I believe init.php is designed to use a relative path on line 42 and if that fails it grabs the full path from config.php, as shown here:

Code:

// #############################################################################
// fetch the core includes
require_once(CWD . '/includes/class_core.php');

// initialize the data registry
$vbulletin =& new vB_Registry();

// parse the configuration ini file
$vbulletin->fetch_config();

if (CWD == '.')
{
    // getcwd() failed and so we need to be told the full forum path in config.php
    if (!empty($vbulletin->config['Misc']['forumpath']))
    {
        define('DIR', $vbulletin->config['Misc']['forumpath']);
    }
    else
    {
        trigger_error('<strong>Configuration</strong>: You must insert a value for <strong>forumpath</strong> in config.php', E_USER_ERROR);
    }
}
else
{
    define('DIR', CWD);
}

if (!empty($vbulletin->config['Misc']['datastorepath']))
{
        define('DATASTORE', $vbulletin->config['Misc']['datastorepath']);
}
else
{
        define('DATASTORE', DIR . '/includes/datastore');
}

if (!$vbulletin->debug)
{
    set_error_handler('vb_error_handler');
}

Unfortunately, even when I specify the full path in config.php the cron job fails. And when I enter the full path in line 42 of init.php, my whole site breaks. I've highlighted the bad path here.

Error:
Code:

Warning: require_once(/home/.saint/user/includes/class_core.php): failed to open stream: No such file or directory in /home/.saint/user/mysite.com/forum/includes/init.php on line 42

Fatal error: require_once(): Failed opening required '/home/.saint/user/includes/class_core.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.saint/user/mysite.com/forum/includes/init.php on line 42

Anyone have ideas?

joined 09-20-2007 10:27 AM

Hi to all.

I have make some changes and fixes.



// Modified by Fabio Dell'Aria on 20-Sep-2007 (fabio.dellaria@gmail.com)
// Modified Files: nntp.php, functions_nntp.php
// ---------------------------------------------------------------------
// Changes:
// --------
// 1)...Added the ability to can works with local NNTP servers;
// 2)...Added the ability to can avoid duplicated NNTP messages;
// 3)...A little NNTP Send speed improvement;
// 4)...Increased the Debug details;
// 5)...Fix a bug that caused "Invalid From address" NNTP error;
// 6)...Fix a bug that caused "Duplicated Message" NNTP error.
// ---------------------------------------------------------------------

How I can includes them in the OFFICIAL release?

arkadia 10-16-2007 07:53 AM

hello,

i try to download this newsgroup: nzn.fr.delphi (server server.amis.tv) and i can't !! it's work for some time (sometime i can download 500 messages, sometime 3000), but i always have : Fatal error maximum execution time of 1800 seconds exceeded in nntp.php on line 121 !

where the problem is? what can i do?

thanks you by advance !
stéphane

TMM-TT 10-16-2007 08:47 AM

Quote:

Originally Posted by arkadia (Post 1361385)
Fatal error maximum execution time of 1800 seconds exceeded in nntp.php on line 121 !

where the problem is? what can i do?

Large posts that makes the script time out maybe? I had a similar problem myself on some groups before, and that was unfortunately never solved for me..

arkadia 10-16-2007 09:11 AM

yes, but in fact it's impossible to make the script workin ... i always have this error !! this is on the line : $response = trim(fgets($this->fp, 128));

when i check on outlook express, the server work perfectly without any probleme ! you can try : nzn.fr.delphi (server server.amis.tv)

dotcomguy 10-16-2007 02:16 PM

Quote:

Originally Posted by arkadia (Post 1361385)
hello,

i try to download this newsgroup: nzn.fr.delphi (server server.amis.tv) and i can't !! it's work for some time (sometime i can download 500 messages, sometime 3000), but i always have : Fatal error maximum execution time of 1800 seconds exceeded in nntp.php on line 121 !

where the problem is? what can i do?

thanks you by advance !
st?phane

I think I had the same problem with execution time when I first used this mod. However it was only a problem initially because I was downloading everything. I just had to keep running it automatically until it had everything downloaded. Now it runs frequently enough that it is able to download all the messages without any trouble.

arkadia 10-16-2007 04:32 PM

But now i have a BIG problem! it's sometime crash php-cgi.exe (with big windows error popup) !!!

itdevil 10-23-2007 09:50 AM

I am having similar issues, the mod put too much load on the server, i am 2x DualCore Xeon 2.8 with 2GB ram 100mbit.... Cron set to run every 24hrs or midnight :o... once the cron run the load shoots up to 6 - 20 till apache crashes....

even now the server is dead slow due the gateway.php cron

Code:

xyz 18394 11.2  3.6  86660 74972 ?        Ss  00:00  25:39 /usr/bin/php /home/xyz/public_html/forum/gateway.php
i have also noticed, sometimes gateway file (but stop leeching from news server) never get killed automatically, on next cron another process is created...

This is a great hack, but someone need to update and optimize the code.

KW802 10-23-2007 01:52 PM

Most likely you're trying to grab too many threads (aka: articles) in one session resulting in the timeout. Before bringing in a new group check to see what the last article ID is and then retrieve only the last hundred or so articles. Do that and add one group at a time and see if there if a difference in your results.


All times are GMT. The time now is 11:01 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02467 seconds
  • Memory Usage 1,905KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_code_printable
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete