Jud Dagnall Photography Blog

Photography, technology and occasional rants!

Simple forums with FUDforum and mailman

Posted on January 23rd, 2005 in , , by jud || No Comment

I set up an online forum and mailing list for a class I’m taking. I used FUDforum, which was easy to install and
configure (it’s php). One of the other things I wanted to do was to set up a mailing list that would serve as an alternate entry point for users: mailing list posts would be copied to the forum, and forum posts would be copied to the mailing list. Using mailman and procmail, this was relatively simple. After downloading and installing fudforum, I installed mailman from RPM using the yum package manager. Following the instructions in the docs, I created a mailing list and added some test names.

After setting up the mailing list, I configured FUDForum to post to the mailing list (using the mailing list options), and got it to remove the title of the mailing list when copying to forums. This was slightly tricky, since the regulur expression should be [ListName], not [ListName].

Then I added procmail entry that pipes any list mail into the FUDforum mailinst list script (scripts/maillinglist.php). I had to fiddle with the permissions a bit since the web owner wasn’t receiving the mail, but a set of directories with a special group, and group write/set permissions did the trick. I did have much more trouble with the procmail recipeit since it wasn’t clear when mail should be copied to the forum. Because mailling list mails are sent via BCC, the recipient doesn’t show up in the header all the time (I tried using a special mailing list email address). In the end, I had to for mail with the mailing list name as the recipient, which seems to work most of the time,. However, I just discovered that if someone BCCs the list, the mailing list doesn’t even show up in the To: field.

However, the forum is now up and working, and students can post to the list, or the forum, and everyone sees the messages.

The origin of PHP’s “global” keyword

Posted on December 17th, 2004 in by jud || No Comment

At lunch earlier this week, [Rasmus](http://lerdorf.com/bio.php) was telling a few of us a story that led to PHP’s *global* keyword.
As a college student, he got a work-study program assignment at a telco. When he showed up for work, they suggested that he spend his time reorganizing a massive rat’s nest of cables into a patch panel. He balked at this, and instead countered that they should give him some real code to work with. Evidently, this caused consternation and confusion on the part of management, leading to a flurry of activity and meetings as they tried to decide what to do with this cheeky “intern”: send him back , or give him something real to work on. Finally, he was given a real problem: discover why the switching system running on their proprietary OS was mysteriously and intermittently crashing. Rasmus went to work, taking over a hallway and walkpapering the walls and floor with highlighted printouts as he spent the next several weeks searching for the answer (think *A Beautiful Mind* :) ). Eventually, he found the source of the problem: a local variable that was overriding a global one. Later, when he was designing PHP, he wanted to be sure to eliminate this particular headache, hence PHP’s *global* keyword!