Getting Majordomo working again
#140 Henry, Wednesday, 06 June 2012 11:19 PM (Category: Email)
(Tags: majordomo)

I use Majordomo for my mailing list manager. Even the author of Majordomo has moved to using mailman. Majordomo was last upgraded in 2000, and the current version is the 2000 version 1.94.5. It's written in Perl 4. It's ancient, every time there's a Perl upgrade I have to rewrite a little bit of the code. I've rewritten chunks of it already, and I plan on rewriting the whole thing this year.

So why do I keep using it when it's been abandoned by its own author? It integrates easily into sendmail, the mailing lists are plain text and can be edited easily, and I have already integrated it with my websites. I store the details in MySQL, allow the users to keep the lists up to date with many flags and options, and then they push the lists out and Majordomo uses the data. It's easy to work with.

Have you ever tried using any Gnu software with sendmail? The instructions usually contain snide suggestions about not using sendmail, or they omit any instructions for sendmail, or they deliberately set all defaults so it won't work with sendmail. They don't like sendmail and they will go out of their way to make it difficult for you. I have tried to get started with mailman. There are instructions around the web for integrating it with sendmail, but it's a struggle. Integrating it with MY websites? That's a whole different world. They want things done their way, and it doesn't suit my way, and they make it very difficult to do things my way. Their answer is that my way is wrong and I should do it their way. No thank you. I would rather work with a small simple plain ancient outdated bit of code that I have to hack at repeatedly to make work, than suffer your condescending gibes. I'll work with Majordomo, and because it suits my simple needs, I'll bring it into the modern world and rewrite it in Python and get a whole lot of use out of it.

So after that rant, I had to face up to one problem. I had installed it on my now dead server in with user and group permissions so that it would work with sendmail, and it would integrate with Apache. But I didn't write any of this down. I assumed I would always be able to look at it and see immediately what the user and group were. So I had to work it out.

Apache runs as webmaster/nobody and sendmail runs as root/daemon. After some experimentation, I worked out that Majordomo had to be installed as webmaster/daemon. This way sendmail can run it and it can do what needs to be done, and Apache can update the list files.

I went to install it and the installation program wouldn't even run. Remember that I had wiped out all the ancient cruft with Perl and gone to the new? Well ctime.pl is no longer a standard module. It's required for installation. I couldn't see any need for it, so I removed it from the list of required modules, and then installation worked. After installation, I had some code changes to make. In this blog, I had already written about replacing two functions in majordomo.pl, and the code was in the blod, so it was just a matter of replacing the functions ParseMailHeader and ParseAddrs. That's why I write this blog. I can't remember everything, and this helps me with old installations and observations. I should keep a written log of all installations and decisions, but this is a hobby not a job, so the blog suffices. Then I had to modify resend.pl. I removed the requirement for ctime.pl from it, and then had to rewrite the Getopts calls as the old module is gone, and I replaced it with the new Getopt::Std. With those changes made, I tested it. Sendmail already had the aliases configured, my tests worked fine, and it was done.

Majordomo is installed.

First of all, I am going to reconstruct the package majordomo-1.94.5.tgz with my changes included. Then as time permits, I am going to rewrite it in either modern Perl, or in Python. Whichever works out best.

But in the meantime, the mail/webserver problem is over, and I can rest.

0 comments