I have Mailhandler/Listhandler subscribed to my Mailman lists and posting new list content as nodes in my forums, which is great.
Now I need to backfill my forums with a few years of old mailing list posts, from the Mailman archives (.mbox files). I have the mbox files on the local filesystem, but when I try to read them I just get an error in imap_open. I do not have an MTA running on this machine. I'm told I don't need one, but looking at the code, it seems like it will always use imap_open(). So I'm a little confused. How exactly do I get it to read a local mbox file?
I read this fairly old post on the same topic: http://drupal.org/node/8732 which says Apache must be recompiled on Debian. I'm on Ubuntu, is this still true?
Also, I saw this in the code:
if($mailbox['domain']){
...
else {
$box = $mailbox['folder'];
$result = imap_open($box, '', '');
}Which seems reasonable, except Domain is a required field on the form. The code inside the else should never execute.
Comments
Still can't get this to work
It seems that the only file this will work on is /var/mail/www-data. This returns valid headers:
imap_open('/var/mail/www-data', '', '');Any file other than that one gives me an error. I actually copied the www-data mail file to "somethingelse" and chmod 777'd it. I got this:
Can't open mailbox /var/mail/somethingelse: no such mailboxCould this be by design for security reasons? Or am I doing something else wrong.