FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Newsgroup Manager - How to sychronize only postings from known users?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Newsgroup Manager - How to sychronize only postings from known users? [message #27840] Wed, 28 September 2005 05:42 Go to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

I just switched from phpBB to FUD. Now I want to enable the synchronisation between a newsgroup and a forum. It works by now. I had some problems with the file permissions of nntp.php, etc. but that wasn't a real problem.

My biggest problem is that I want to synchronize only posting from the newsgroup to the forum from people with known mail adresses.

By now I can only switch between autocreation of new users or letting them post anonymously. Is there any possibility to enable a third way. That means to refuse the synchronisation when the mail adress isn't known?

Thanks!

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27849 is a reply to message #27840] Wed, 28 September 2005 14:25 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This was impossible to do, but I think this is a useful functionality so it has been added to cvs. Next version of the forum will have it.

FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27862 is a reply to message #27849] Wed, 28 September 2005 21:24 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

Ilia schrieb am Mi, 28 September 2005 16:25

This was impossible to do,

Thats bad Sad
Zitat:

but I think this is a useful functionality so it has been added to cvs.

Thats great! Thanks! Could you show me in which file I had to change it so I can apply it on my 2.7? I can read and write PHP I only need to find the right place.
Zitat:

Next version of the forum will have it.

Thats really great!

Then another wish that I think isn't hard to implement: When posting to a newsserver by now the real mail address of the poster is used. It would be great if the system took a look to the users settings if the user wants his mail address to publish (this setting already exists). Otherwise an anonymous adress should be used like: "username <user(at)invalid(dot)tld>" (Where the username is the username in the forum and the mail address is editable)

do you think this would be hard to implement?

Thx!

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27863 is a reply to message #27862] Wed, 28 September 2005 22:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can grab the patch from here:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7356

Can you explain your other request a bit more clearly, I am not quite certain what are you asking there.


FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27880 is a reply to message #27863] Thu, 29 September 2005 05:38 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

Ilia schrieb am Do, 29 September 2005 00:42

You can grab the patch from here:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7356

Thanks!
Zitat:

Can you explain your other request a bit more clearly, I am not quite certain what are you asking there.

Okay, no problem. By now a user can decide if he wants his (or her) e-mail address to be shown in the forum or not. There is a switch in his personal settings for this.

But when a forum is synchronized with a newsgroup then in the newsgroup the mail address of the user appears in the from-header - independently from this switch. So maybe a spammer could grab this mail address.

The solution: If the user wants his mail address not to be shown the from-header in the news posting should not contain his real address but a faked one that the administrator can define in the forum settings.

Best would be if in the real name-part of the from-header the username would appear so that a newsgroup visitor sees who posted it.

That means for example:
- A user has the username "big hero", his mail address is "superman(at)realcooldomain(dot)tld"
- He doesn't want the mail address to be shown in the forum (he doesn't want spam)
- When the forum posting is synchronized to the newsgroup then the from-header would be:
"big hero <superman(at)realcooldomain(dot)tld>" (so a spammer could misuse it)
- With my proposed patch the from-header would look like this:
"big hero <fake(at)fakeadress(dot)tld>"

Really best would be if the user could define a special address for newsgroup postings. So he could define two addresses in his personal settings. One that he polls regularly (and that is used for notifications) and one that is used for the newsgroup postings (e.g. "mail address for newsgroups"). Maybe that is a faked one. Maybe that is - like I normally do - an address with very extremly spam rules. (When I post to newsgroups i use an address at despammed.com)

If that field isn't used the (new) field from the general settings would be used.

One final proposal: If the user really could define two mail addresses then it would be really, really great if these two addresses where used for the check for the username when he posts directly to the newsgroup.

That means for example:
- Our "big hero" normally post to newsgroups with the address "spammeifyoulike(at)despammed(dot)tld". But for real use he uses "superman(at)realcooldomain(dot)tld".
- He setup both mail addresses in his personal forum settings.
- Now he posts with a regular newsreader to the newsgroup
- When the nntp synchronizer now reads his postings it takes a look in the two fields where a user can define mail addresses
- In the "mail address for newsgroups" setting it founds the address "spammeifyoulike(at)despammed(dot)tld" so it knows its "big hero" who posted it.

I hope I could explain it now more clearly?

Thx!

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27885 is a reply to message #27880] Thu, 29 September 2005 13:28 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I see what you're saying, I think doing this would be a bad idea. Putting a fake address in the from header for mailing lists and nntp is generally frowned upon and could get you banned. Additionally it prevents people from directly replying to the user via e-mail.
So, I'm afraid I must decline this feature request.


FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27887 is a reply to message #27885] Thu, 29 September 2005 14:34 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Ilia schrieb am Do, 29 September 2005 15:28

Putting a fake address in the from header for mailing lists and nntp is generally frowned upon and could get you banned.

I would agree if the newsgroup is an official one. In my case for example its an private newsserver. So I personally can define the rules Wink

But I understand your concern. Then best would be the second mail address field in the user settings that would be used for newsgroup postings. If this field is emtpy then the real mail address would be taken.

Could you live with that solution?

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27892 is a reply to message #27887] Thu, 29 September 2005 14:45 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This adds extra information into common table for the very rare cases, something I decline doing in stock forum for performance considerations.

FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27894 is a reply to message #27892] Thu, 29 September 2005 15:07 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

Okay. So I have to tell my users to use mail addresses that are protected by spam filters, etc.

Then they have to live with this Wink

Michael

P.S.: One last thing would be very nice: It would be nice if the from-header in newsgroups posting would not (only) contain the username but the real name. Maybe in the format "Name (username) <user(at)mailadress(dot)tld>" Would that be possible?

[Updated on: Thu, 29 September 2005 15:20]

Report message to a moderator

Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27920 is a reply to message #27894] Fri, 30 September 2005 18:53 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Changed in CVS.

FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27922 is a reply to message #27920] Fri, 30 September 2005 18:57 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

You're great!

Could you tell me what to patch? I don't want to risk the use of the CVS version.

Thanks!

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27923 is a reply to message #27922] Fri, 30 September 2005 19:33 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7358

FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27926 is a reply to message #27923] Fri, 30 September 2005 20:03 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

I now did the changes. Posting with real name works. But the import didn't work anymore:
$ /usr/bin/php xxx/FUDdata/scripts/nntp.php 3
(xxx/FUDdata/include/theme/default/db.inc:74<br />
xxx/FUDdata/include/theme/default/db.inc:174<br />
xxx/FUDdata/scripts/nntp.php:80<br />
) 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1<br />
Query: SELECT id, forum_opt, message_threshold, (max_attach_size * 1024) AS max_attach_size, max_file_attachments FROM fudforum_forum WHERE id=<br />
Server Version: 4.0.24_Debian-5-log<br />

I guess I have to update the database in any way since it was changed. But I'm not sure how. I ran "Forum Consistency" but that didn't help.

I guess its a database problem because I cannot enable the new option. It is always disabled. Sad

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27928 is a reply to message #27926] Fri, 30 September 2005 20:14 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Looks like the forum id is not being passed so it fails to fetch the details from the database.

FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27930 is a reply to message #27928] Fri, 30 September 2005 20:34 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Yeah I was a fool Wink

I used the wrong option in the test.

But the problem remains. I'm starting the script - nothing is happening, nothing is imported Sad
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27931 is a reply to message #27930] Fri, 30 September 2005 20:38 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Did you check the log file I told you about?

FUDforum Core Developer
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27932 is a reply to message #27931] Fri, 30 September 2005 20:45 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

?

Which logfile? In this thread the word "log" wasn't mentioned before?

I now searched for a logfile and found:
errors/.nntp/error_log.

It contained two lines but both aren't interesting:
Unable to establish connection to xxx.xxx.de on port 119 failed
With Error #111 : Verbindungsaufbau abgelehnt

Since the logfile is from 18:32 and now (local time) its 22:45 there is no entry in this file Sad
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27933 is a reply to message #27931] Fri, 30 September 2005 21:00 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

I found a little bug:
In the patch this line was added:
<td><?php draw_select('nntp_skip_non_forum_users', "Yes\nNo", "256\n0", ($ml_mlist_opt & 256 ? 256 : 0)); ?></td>

That one would be right:
<td><?php draw_select('nntp_skip_non_forum_users', "Yes\nNo", "256\n0", ($nntp_nntp_opt & 256 ? 256 : 0)); ?></td>


Now I can enable and disable the option.

I now will look out for the other problem. Maybe its my problem. I will see Wink

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27936 is a reply to message #27933] Fri, 30 September 2005 22:01 Go to previous messageGo to next message
icarus is currently offline  icarus   Germany
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi again!

This doesn't seem to be okay:
			// skip_non_forum_users is set
			if (!$msg_post->poster_id && $this->nntp_opt & 256) {
				return;
			}


It doesn't write the file with the last posting and it seems to write only one posting every time - every time the same posting.

I changed the code a little bit. I deactivated the lines above and changed some lines below this:
                        if (!(!$msg_post->poster_id && $this->nntp_opt & 256)) {
                                $msg_post->add($frm->id, $frm->message_threshold, 0, 0, false);

                                // Handle File Attachments
                                if (isset($this->attachments) && is_array($this->attachments)) {
                                        foreach($this->attachments as $key => $val) {
                                                if (!($nntp_adm->nntp_opt & 8) && (strlen($val) > $frm->max_attach_size || (isset($attach_list) && count($a
                                                        continue;
                                                }

                                                $tmpfname = tempnam($GLOBALS['TMP'], 'FUDf_');
                                                $fp = fopen($tmpfname, 'wb');
                                                fwrite($fp, $val);
                                                fclose($fp);

                                                $id = attach_add(array('name' => basename($key), 'size' => strlen($val), 'tmp_name' => $tmpfname), $msg_pos
                                                $attach_list[$id] = $id;
                                        }
                                        if (isset($attach_list)) {
                                                attach_finalize($attach_list, $msg_post->id);
                                        }
                                }
                                if (!($nntp_adm->nntp_opt & 1)) {
                                        fud_msg_edit::approve($msg_post->id);
                                }                
                        }

This now seems to work.

Michael
Re: Newsgroup Manager - How to sychronize only postings from known users? [message #27949 is a reply to message #27933] Mon, 03 October 2005 14:16 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This typo was the cause of the bug, it has been fixed in CVS.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help! Yahoo! Sent my confirmation mail to Bulk!
Next Topic: Will FUDforum do what I want?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Jul 27 04:35:53 GMT 2024

Total time taken to generate the page: 0.02608 seconds