Firefox PHP

Phorummail for Phorum 5

Posted by Brian Moon 
Re: Phorummail for Phorum 5
March 02, 2005 06:56PM
what is a .PST file?

And yes, phorummail can do all that stuff.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Phorummail for Phorum 5
March 02, 2005 07:15PM
A .pst file is the archiving file used by Microsoft Outlook. I have been archiving the emails from this maillist for a couple of years now and they can all be found in this file.

Re: Phorummail for Phorum 5
March 02, 2005 07:22PM
eeeewwwww.

good luck getting them out of there. I know you can save individual emails to files with Outlook.

Otherwise, you will have to write a parser.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Phorummail for Phorum 5
March 02, 2005 07:32PM
What is the optimal format that these emails should be in for this to work?

Thanks for all the help btw. I really appreciate it.


Re: Phorummail for Phorum 5
March 02, 2005 07:37PM
mattio Wrote:
-------------------------------------------------------
> What is the optimal format that these emails
> should be in for this to work?
>
> Thanks for all the help btw. I really appreciate
> it.
>

As Brian said, I have each message extracted from archive-files into single files. These are 'plaintext' email-messages, with complete header, and sometimes base64 encoded attachments.
I wrote a simple script to extract the messages from the archive-files, but I guess Outlook uses compression to store the archive. You would need to get them out of there :-)

And, indeed, Phorum performs proper threading based on subject and/or message-ID. It is pretty cool to be able to finally unlock these archives in a web-searchable (and presentable) manner.

Good luck!

Luka





Edited 2 time(s). Last edit at 03/02/2005 07:58PM by luka.
Re: Phorummail for Phorum 5
March 02, 2005 08:22PM
I am looking into options for extracting the emails from a PST file into plain text files (fingers crossed).

Once this is done, I will need to upload them to my webserver with Phorum installed and run the commands you mentioned earlier. Unfortunatly, I don't have shell (telent) access to my webserver. Is there another way to run the commands you mentioed?

------------------------------------
do while messages
php.exe phorummail.php x < message.count
end

x = the forum ID
------------------------------------

How does the system know what "messages" is refering to in the code above? I thought that the emails were in separate plain text files by this point.

Thanks again...
Re: Phorummail for Phorum 5
March 03, 2005 03:42AM
You could import the OL email to a mbox format (what Thunderbird and Eudora use for example.) That would give you the benefit of getting rid of OL too :) (well there are reasons to use it I know :)

I think there are many php libraries that can read mbox format directly (webmail scripts come to mind) so you could skip the message extraction part.

---
-=[ Panu ]=-
Re: Phorummail for Phorum 5
March 03, 2005 04:34AM
mattio Wrote:
-------------------------------------------------------
> I am looking into options for extracting the
> emails from a PST file into plain text files
> (fingers crossed).
>
> Once this is done, I will need to upload them to
> my webserver with Phorum installed and run the
> commands you mentioned earlier. Unfortunatly, I
> don't have shell (telent) access to my webserver.
> Is there another way to run the commands you
> mentioed?
>
> ------------------------------------
> do while messages
> php.exe phorummail.php x < message.count
> end
>
> x = the forum ID
> ------------------------------------
>
> How does the system know what "messages" is
> refering to in the code above? I thought that the
> emails were in separate plain text files by this
> point.

Of course the real code is a bit more detailed:

inputdir = 'f:\archive\mailinglists\messagesource\*'

call SysFileTree inputdir, 'messages.', 'FO'

if messages.0 = 0 then
do
call PutScreen('no messages found')
signal endprog
end
else

DO i = 1 to messages.0 /* will loop through each message */

address cmd 'f:\apache\php.exe phorummail.php 10 < 'messages.i

END /* do i = 1 to archives.0 */

====
But that is in REXX - probably you can do similar things in any script language (for example PHP ;-)

If I were you, I would try to do this locally, and export the resulting database to your live environment (that's how I did it anyway) due to performance considerations. The database grew to over 35 MB in my case, and that excludes the attachments, which I store in the filesystem seperately.

Good luck,

Luka

Zev
Re: Phorummail for Phorum 5
October 15, 2006 03:23PM
Is there any way I can automatically strip out certain text from emails sent to phorummail? To get rid of those annoying footers without editing each email manually?
Re: Phorummail for Phorum 5
October 16, 2006 01:27PM
I've got it working through a forward with Cpanel, with a syntax for the forward that is a little unusual:

|/usr/local/bin/php /home/username/public_html/script.php

The error message I was getting had to do withe the PEAR module mimeDecode; had to have my host install PEAR, as they missed it when they configured my server.

Now, my concern is that some of the people on the Mailman mail list use HTML enabled email, and either Phorum or the mimeDecode module is stripping all the HTML out of the message ... and the message is empty, except for the footer tagline that Mailman adds.

Do you know if the stripping is happening because the forum is set up to not allow HTML, or is it happening in mimeDecode (or another function called by phorummail.php).
Sorry, only registered users may post in this forum.

Click here to login