no body / info from mailman posts [message #38844] |
Fri, 31 August 2007 21:18 |
jeffg
Messages: 4 Registered: August 2007
Karma: 0
|
Junior Member |
|
|
I have set up FF 2.7.6 with mailman on a test server to see if I can get 2-way posting to work between a forum and a mailing list. Everything *seems* to be working except that there is info missing in posts from the mailing list to FF. The subject of the email seems to survive but I get no body or name for the person posting.
specific setup:
- php 5.2
- Debian Etch system
- Thunderbird on OS X as the sending email client
- postfix / mailman seem to be working correctly
- procmail rules seems to be working correctly
I set up a logging function[1] in maillist.php to dump info out of the script when it is run, and placed a call ot it inside fed_emsg::read_data() to print out $this->raw_msg, this dumped out the entire body of the email, so it seems like the email is getting piped into the script correctly.
[1]
function _Logger($str) {
$str = (string) $str; // casting for luck
if(strlen($str) > 0) {
$str = "\nLog @ ". strftime('%c')."\n".$str."\n";
$logdir = '/path/to/_tmp_log/';
if(!is_dir($logdir)) {
mkdir($logdir);
}
$logfile = $logdir.'fudmaildump.txt';
$fh = fopen($logfile, 'a');
fwrite($fh, $str); fclose($fh);
}
}
Any ideas where to look in maillist.php? The logic is complex and I imagine some edge-case is triggering the destruction of the email content on its way into the forum.
cheers, JeffG
|
|
|
|
|
|
|
Re: no body / info from mailman posts [message #38919 is a reply to message #38894] |
Fri, 07 September 2007 00:28 |
jeffg
Messages: 4 Registered: August 2007
Karma: 0
|
Junior Member |
|
|
I think I found the problem, at least in the version of FF I have here. At line 502 in maillist.php you have:
$msg_post->body = fud_wordwrap($msg_post->body);
fud_wordwrap is interesting, it takes the argument by reference:
function fud_wordwrap(&$data)
{
...
}
...but never returns anything, causing $msg_post->body to be set to null. Is the best solution here to pass in by reference, or to return something from fud_wordwrap? Either way it seems to be a bug?
[Updated on: Fri, 07 September 2007 00:28] Report message to a moderator
|
|
|
Re: no body / info from mailman posts [message #38920 is a reply to message #38919] |
Fri, 07 September 2007 02:37 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
This issue is resolved in later version of FUDforum. The function is not supposed to return anything.
You need to either upgrade your forum or change the line to:
fud_wordwrap($msg_post->body);
FUDforum Core Developer
|
|
|
|
|