Little Majordomo Contribution

BigWil

Verified User
Joined
Aug 5, 2004
Messages
296
NOTE and DISCLAIMER: This was done on a production box with only ONE domain using the majordomo lists so it was easy to implement. If you have a box and offer majordomo lists freely to your users you will want to think this through first and you might want to wait until I figure out where the default files are and post them later. More on this at bottom.

The Issue: I have had users complain about Majordomo's subscribe and unsubscribe confirmation message. It seems standard users aren't quite savvy enough to understand the directions.

After reviewing the patches available for 1.94.5 I saw that this problem plus a couple others are already taken care of. Some might be interested in the following patches.

html-stripper-v0.1 (F+) HTML Mime stripper
This guy is pretty cool. You define html_policy = pass|return|strip in your config file. You can use this with the newconfig command to update your config file.

majordomo.5 (FB+R) Provides more robust confirmation
This on is a must have. It changes the confirmation process so that the user only has to hit reply and send. The confirmation key is placed in the subject line automatically. This fixes the initial "nonsavvy user" problem.

majordomo.7 (B+R) Patch to deal correctly with <List>.intro file
If you noticed majordomo sends all that junk in the welcome message whether you like it or not and places your info file at the bottom. Kind of useless. This patch replaces the junk and send ONLY your info file and only if it exists.

noCommand_noBounce.0 (F+R) Causes majordomo not to respond to SPAM
This one I threw in for good measure. It ignores invalid commands so the owner doesn't get a message everytime somebody sends junk to the majordomo address. At least that is what I gather as I haven't tried sending spam to it yet.

So here is what I have done so far. I went to the majordomo directory at /etc/virtual/majordomo and created a directory called patches. I downloaded these 4 patches into the patches directory. They area available from:
ftp://ftp.ccsf.org/majordomo-patches/1.94.5/

Then from the /etc/virtual/majordomo I ran the patches:
patch < patches/html-stripper-v0.1
patch < patches/majordomo.5
patch < patches/majordomo.7
patch < patches/noCommand_noBounce.0

Next you have to install a few modules from CPAN for the html stripper. MIME::Parser, HTML::TreeBuilder and
HTML::FormatText

Now for the majordomo.5 add this to the bottom of your lists. AGAIN READ DISCLAIMER! These go at the bottom of EVERY majordomo.cf on your machine just before the 1; line. I also added it under the default in the /etc/virtuals/majordomo directory.

$confirm_address = "confirm\@$whereami";
$confirm_expire = 14*24*3600;# Seconds to wait before expiring (2 weeks)
$confirm_randev = "/dev/random";# Leave undefined to use rand instead
$confirm_keys = "$listdir/confirm.keys";# Or some other MD-writable place

Now just the same consistency find all of your list.aliases files and add this default user and pipe. This all goes on one line which I placed right after the owner alias. But I don't think it matters where in the list you put it. Replace DOMAINNAME with the domain for the specific list. Remember this is a single line.

confirm: "|/etc/virtual/majordomo/wrapper majordomo -a -C /etc/virtual/DOMAINNAME/majordomo/majordomo.cf"

And that did the trick for me.

Now here is where I am at with those default file issues. Can someone please tell me where each individual virtual list gets its default files from? Specifically where does the majordomo.cf and the list.aliases files come from when a new list is created? I need to add these new default values to those skeleton files. I also need to make a revision so that open+confirm is applied by default. Right now it seems to be defaulting to open.


BigWil
 
Last edited:
Nearly there.....

cp /usr/local/directadmin/data/templates/list.config
to /usr/local/directadmin/data/templates/custom/list.config

Edit /usr/local/directadmin/data/templates/custom/list.config
Adding to the bottom:
html_policy = pass

cp /usr/local/directadmin/data/templates/majordomo.cf
to /usr/local/directadmin/data/templates/custom/majordomo.cf

Edit /usr/local/directadmin/data/templates/custom/majordomo.cf
Adding to the bottom right above 1;

$confirm_address = "confirm\@$whereami";
$confirm_expire = 14*24*3600;# Seconds to wait before expiring (2 weeks)
$confirm_randev = "/dev/random";# Leave undefined to use rand instead
$confirm_keys = "$listdir/confirm.keys";# Or some other MD-writable place


The only thing left is to add the confirm address to the default aliases. Does anybody know where the default alias list comes from?

BigWil
 
I like those contributions. Of course I just noticed a small bug in DA after testing. DA wansn't picking up the data/templates/custom/list.config file, it would only take the data/templaces/list.config one. Other than that, there has to be some hook somewhere to do post list creation processing, so that the confirm alias could be added. I don't think that comes from a template.
 
Ok. Well the first must be a bug because the release notes state that that custom file is usable. I will email that to John and ask for a post majordomo script. That should finish up the job.

BigWil
 
While I wait, here is another little adjustment I made. The Info and Intro files have the "Last updated on" at the top of the Info and Intro results. Very ugly and I wouldn't see any real purpose in having it that way by default. I doubt many users are going to want this.

In the default list.config whether you are using the standard one or the one under custom (after bug fix) you will find the entries that force the "Last updated on" to be entered in the Info and Intro files.

Find:
date_info = yes
date_intro = yes

Change to:

date_info = no
date_intro = no


BigWil
 
I haven't done it in quite a while, but I believe you can change the way those dates are shown within the majordomo listname.conf configuration file.

Jeff
 
Back
Top