News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Import messages from a mailing list into SMF?

Started by rayarachelian, January 13, 2019, 05:10:18 PM

Previous topic - Next topic

rayarachelian

Hi, there's a mailing list I'd like to convert to a SMForum, is there a guide somewhere that says how to add messages to a board and link the replies to them? I can script all that stuff, just want to know what the formats are for doing this, and whether there'd be issues with invalid users on the boards, etc.

I have a standard mailbox in thunderbird that contains all the messages.


Also, I had trouble registering because of DNS issues with simplemachines.org:

postfix/smtpd[17409]: NOQUEUE: reject: RCPT from unknown[66.71.247.155]: 554 5.7.1 <httpd4.localdomain>: Helo command rejected: Host not found; from=<[email protected]> to=<my email address here> proto=ESMTP helo=<httpd4.localdomain>

I think the issue is that the sending machine isn't listed in DNS (see unknown and helo). Reverse DNS for 66.71.247.155 shows hxxp:fw01.atl.forceitx.net [nonactive].

Kindred

You would need to convert the Thunderbird messages into a sql file...
1- identify the users (minimum of username and email address)
2- create a script that creates the users .... either a sql and a css with a separate php which processes the css
3- separate the messages, identify them by thread (original message and all replies, in order)
4- create a script that imports the messages (title, body, author, original message, save original message Id and import all replies into that thread... then do the same for every message/thread

It's not simple...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

rayarachelian

Fair enough, but what happens to the actual users when they aren't registered and try to join?

Would they just be able to do a "Forgotten password" step to get access again? Or should I generate fake email addresses for the messages?
Is there anything else I need to worry about there?

I expect the actual users to want to join the forum after this is done.  You mention generating usernames, but what if they want to change their username after they join? Is that something they'd be able to do, or something that will require administrator help?

Are there any pointers to code I could start with for some other imports, maybe from some other forum to SMF, whatever code is the cleanest readable example?

Any documentation somewhere that describes the database relations I'll need to mess with (other than just opening up postgres and messing with \d and friends?) Anything I can do to keep this portable to SMF owners who might be using something other than postgres?

Sorry for the n00b questions, no worries, I can code, I only need to find the right path to get started, and will take it from there. :)

Many thanks.

If I get this working I'll certainly share my scripts.

Kindred

#3
It would be best if you did not deal with straight sql...  instead, use the existing smf functions to create users and create messages.

You can look at the various converters that are available, like mybb to smf and phpbb to smf

I would suggest creating real users and then letting them use the forgot password, yes...   changing the display name is easy. Changing the login name is more difficult and does require an admin, because the password gets bashed based on the username.

But they can use the email address to login...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45


As Kindred said either check out the convertor or I  would use the function database https://support.simplemachines.org/function_db/ and use the SMF code itself to load the database. Start with a fresh empty install of SMF create and setup your boards.
Then register your member's and then createposts/topics using these functions below

registerMember http://support.simplemachines.org/function_db/index.php?action=view_function;id=594
createPost http://support.simplemachines.org/function_db/index.php?action=view_function;id=323

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


Advertisement: