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

Home » FUDforum Development » Bug Reports » no body / info from mailman posts
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
no body / info from mailman posts [message #38844] Fri, 31 August 2007 21:18 Go to next message
jeffg is currently offline  jeffg   Canada
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 #38859 is a reply to message #38844] Mon, 03 September 2007 02:58 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Make sure that the files inside the msg/ directory are writeable by the user maillist.php runs as.

FUDforum Core Developer
Re: no body / info from mailman posts [message #38879 is a reply to message #38859] Tue, 04 September 2007 16:16 Go to previous messageGo to next message
jeffg is currently offline  jeffg   Canada
Messages: 4
Registered: August 2007
Karma: 0
Junior Member
Ilia wrote on Sun, 02 September 2007 22:58

Make sure that the files inside the msg/ directory are writeable by the user maillist.php runs as.


*smacks forehead* I'll check into that and post back.
Re: no body / info from mailman posts [message #38891 is a reply to message #38844] Wed, 05 September 2007 21:39 Go to previous messageGo to next message
jeffg is currently offline  jeffg   Canada
Messages: 4
Registered: August 2007
Karma: 0
Junior Member
I looked at the permissions issue and have all but written it off. While it isn't obvious to me which system user is running maillist.php, changing access on the messages folder and msg_* files to 777 doesn't fix the problem the way I would expect if this was just a permissions issue.

Is there some additional level of logging I can enable to get verbose output?
Re: no body / info from mailman posts [message #38894 is a reply to message #38891] Wed, 05 September 2007 23:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Any errors generated will go to the PHP's error log that may have clues as to the cause of the problem.

FUDforum Core Developer
Re: no body / info from mailman posts [message #38919 is a reply to message #38894] Fri, 07 September 2007 00:28 Go to previous messageGo to next message
jeffg is currently offline  jeffg   Canada
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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
Re: no body / info from mailman posts [message #39955 is a reply to message #38859] Fri, 28 December 2007 11:18 Go to previous messageGo to next message
vinita_aggarwal is currently offline  vinita_aggarwal   India
Messages: 1
Registered: November 2007
Location: New Delhi
Karma: 0
Junior Member
Hi,

I am new to fud forum and mailman. my message from mailman list are not coming in fud forum. there is no bounce back also.

following are the file permissions:
maillist.php 766 apache apache
maillist.php~ 766 apache apache


message directory and message files have rw-rw-rw- apache apache permissions


pls help

Regards
Vinita Aggarwal
Re: no body / info from mailman posts [message #39964 is a reply to message #39955] Sun, 30 December 2007 15:46 Go to previous message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
How are you feeding messages to maillist.php script and did you create an import rule?

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IPv6 bug
Next Topic: Avatar Size
Goto Forum:
  

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

Current Time: Sat Dec 21 13:41:54 GMT 2024

Total time taken to generate the page: 0.02438 seconds