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

Home » FUDforum » FUDforum Installation Issues » maillist.php issues with Usenet postings (manually inserted)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: maillist.php issues with Usenet postings (manually inserted) [message #9194 is a reply to message #9187] Sat, 15 March 2003 19:36 Go to previous messageGo to previous message
forrie is currently offline  forrie   United States
Messages: 47
Registered: August 2002
Location: Derry, NH
Karma:
Member
Following-up to my own post...

The headers in the Usenet articles are older and probably not RFC-compliant. Where we see:

From: email(at)dom(dot)com (Real Name)

I tried looking at maillist.php to see where it was parsing this:

// Fetch From email and Possible name
if( preg_match('!(.*?)<(.*?)>!', $this->headers['from'], $matches) ) {
$this->from_email = trim($matches[2]);

if( !empty($matches[2]) ) {
$matches[2] = trim($matches[2]);
if( $matches[2][0] == '"' && substr($matches[2], -1) == '"' )
$this->from_name = substr($matches[2], 1, -1);
else
$this->from_name = $matches[2];
}
else
$this->from_name = $this->from_email;

if( preg_match('![^A-Za-z0-9\-_\s]!', $this->from_name) ) $this->from_name = substr($this->
from_email, 0, strpos($this->from_email, '@'));
}
else {
$this->from_email = trim($this->headers['from']);
$this->from_name = substr($this->from_email, 0, strpos($this->from_email, '@'));
}

if( empty($this->from_email) || empty($this->from_name) )
mlist_error_log("no name or email for ".$this->headers['from'], $this->raw_msg, 'ERROR');

[ ... snip ... ]

I tried changing the regex to this:

'/^From:.(.*?).\\\((.*?)\\\)/'

As well as inserting some tests in between, to no avail. So it much be choking somewhere else.

A sample header from the Usenet articles is in the first posting of this thread.

I literally have 1000's of these that I need to import into FudForum, so any pointers/patches would be appreciated. Smile

Thanks...


[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: problems with importing data after server move again
Next Topic: Private Forums?
Goto Forum:
  

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

Current Time: Wed Jul 03 13:00:53 GMT 2024

Total time taken to generate the page: 0.04147 seconds