Re: Requesting help for batch import from a mailbox based system
Reply #1 –
One of the "issues" with listserv / email style groups is that normally as long as you had a valid email you could post, so users often ended up with multiple "ids" That is not so bad but it does impede things for an import as you will end up with extra id's and lost user history.
The second issue with listserv / email groups, and again this depends on what was used on the backend, is that it can be difficult to determine the correct threading of posts. Sometimes they will have a header key that allows you to see how things were threaded, other times you just have to go by the message subject and join on that.
If your user list correlates well to the files "From: <User given/last name>", meaning you can find them easily, then I would start by creating all of the id's on the system. I'd then write a script to go message by message in your file and use some of ElkArte's functions to parse the message and post the message.
There is no API so to speak, but action_pbe_post in Emailpost_Controller is a place to start. You would feed that function with an individual raw email that you extract from the list file you have, it would do the rest and make a post. You would have to come up with the board to post to and do some work on how to thread things, but that function should at least be a start.
That function is really designed to work specifically with mails from an elkarte system which have a topic key built in, thats how it knows how to thread. You would have to hot wire that to get what you want, but its doable I believe.