>Hi, > >I was wondering whether anyone has managed to get XMail and Mailman to work >together, and if so, how did you configure the mailman list-control aliases >in XMail? I've tried setting up piped commands in aliases.tab and also >under cmdaliases, but I haven't found a way to make it work, and this is one >of those rare instances when Google doesn't seem to be of much assistance. > >If nobody has managed to do it yet, I'll give it up and try something else. >That would be a shame, because so far I'm very impressed with both packages. >I just wish I could get them to talk to each other!
I have gotten it to work. There are a few steps involved in making this work. First, you should create a cmdalias in the domain for each of the mailboxes that mailman expects. An example with domain = lists.domain.com and list name=list, you'd create the following cmdalias files in /var/MailRoot/cmdaliases: list-admin.tab list-confirm.tab list-leave.tab list-request.tab list.tab list-bounces.tab list-join.tab list-owner.tab list-subscribe.tab list-unsubscribe.tab Each file has the following line in it: "external"[tab]"0"[tab]"0"[tab]"/var/MailRoot/bin/mailman.sh"[tab]"@@RCPT"[tab]"@@TMPFILE" Then you put the following file, mailman.sh, in your /var/MailRoot/bin folder. You'll also need the econv package available on the xmailserver.org web page, under the tools section: ##### START mailman.sh ####### #! /bin/bash # # This script takes an incoming list for a mailing list and parses the email address # to determine the correct list for sending to Mailman's wrapper program MAIL_ROOT=/var/MailRoot # Arguments list_email=$1 messagefile=$2 # First, isolate the list address (i.e. list-owner, list-subscribe, etc.) list_address=`echo "$list_email" | sed 's/@.*//g'` # Next, isolate the list name list_name=`echo "$list_address" | sed 's/-.*//g'` # Isolate the list user (i.e. owner, admin, subscribe, etc.) list_user=`echo "$list_address" | sed 's/.*-//g'` # If the list user is the same as the list name, this means this is the address for the list # itself, so the list user should be set to post if [ $list_name == $list_user ] ; then list_user=post fi # Convert the Xmail mail file into an email file tmpfile=/home/xmail/$RANDOM.conv econv --unix --input $messagefile --output $tmpfile # Pipe the email file to the Mailman wrapper for the correct list and user cat $tmpfile | /usr/local/mailman/mail/mailman $list_user $list_name >& /home/xmail/error.log rm $tmpfile logfile=$MAIL_ROOT/logs/mailinglists.log logentry=`date` logentry="$logentry : $list_email" echo $logentry >> $logfile ###### END mailman.sh ####### Granted, this file is not the most efficient way to do this. Also, there is a major flaw with the script, as it currently does not allow list names with a dash in them (this is actually a very common practice). If someone has something better to offer, please do (and post it to the list)! I've also create a semi-automated script that creates a list in mailman and also creates each of the necessary cmdalias files. Contact me off list to get this code, as it's more involved. Good luck! Toby -- Toby Reiter mailto:[EMAIL PROTECTED] Breezing Internet Communications http://www.breezing.com 1106 West Main St phone:434.295.2050 Charlottesville, VA 22903 fax:603.843.6931 - To unsubscribe from this list: send the line "unsubscribe xmail" in the body of a message to [EMAIL PROTECTED] For general help: send the line "help" in the body of a message to [EMAIL PROTECTED]