Great Circle Associates Majordomo-Users
(October 1999)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: virtual hosting and email lists
From: John Robens <jrobens @ socialchange . net . au>
Date: Wed, 27 Oct 1999 00:55:04 +1000 (EST)
To: majordomo-users @ greatcircle . com
Cc: Marcus Dillury <marcus @ socialchange . net . au>

My problem is that I am trying to use procmail to parse the headers to
work out what messages should be passed to the outgoing user.

>From the top:
Problems started when people asked for 2 identical names within the
sendmail alias file namespace eg:
discussion@mydomain.com
discussion@yourdomain.com

I can map the majordomo users using the virtualusers table in sendmail,
but can it run the commands required to put a full majordomo configuration
in there? Since it is a fixed dbm format I thought not to risk it. I
wanted the mailing lists (there are lots) separated (secondary
requirement) from the sendmail, as I am in the process of migrating them
between hosts. 

So on my old server - the one still running as our main mail server (sol
2.5.1, sendmail 1.9.1) I put things like this:
# discuss@lists.communitybuilders.nsw.gov.au
# discuss@lists.brisinst.org.au
discuss: majordom@homer
discuss-request: majordom@homer
discuss-approval: majordom@homer
discuss-outgoing: majordom@homer
discuss-owner: majordom@homer
owner-discuss: sco-team-owner
owner-discuss-outgoing: owner-sco-team
owner-discuss-request: sco-team-owner

# forum@lists.ipwea.org.au
forum: majordom@homer
forum-request: majordom@homer
forum-approval: majordom@homer
forum-outgoing: majordom@homer
forum-owner: majordom@homer
owner-forum: sco-team-owner
owner-forum-outgoing: owner-sco-team
owner-forum-request: sco-team-owner


Then I recompiled a majordomo 1.9.4 for each of the domains that I was
hosting. I set up a master set of procmail rules such as:

## Manage with RCS
# $Header$
# $Log$
#
PATH=/bin:/usr/bin:/usr/local/bin
MAILDIR=$HOME/procmail
LOGFILE=$HOME/.procmail_log   #recommended

# lists.socialchange.net.au
#INCLUDERC=$HOME/virtual_mail/socialchange.net.au/procmail/majordom
#INCLUDERC=$HOME/virtual_mail/socialchange.net.au/procmail/projman
INCLUDERC=$HOME/virtual_mail/socialchange.net.au/procmail/sco-team

# lists.brisinst.org.au
#INCLUDERC=$HOME/virtual_mail/lists.brisinst.org.au/procmail/majordom
#INCLUDERC=$HOME/virtual_mail/lists.brisinst.org.au/procmail/brisinst-discuss

in the home directory of the majordomo user who I sent it to.

In each of these files I put procmail rules such as this:

# You need to have a rule for all of:
#discuss: majordom@homer
#discuss-request: majordom@socialchange.net.au
#discuss-approval: majordom@socialchange.net.au
#discuss-owner: majordom@socialchange.net.au
#owner-discuss-outgoing: discuss-owner
#owner-discuss-request: discuss-owner
#owner-discuss: discuss-owner

BASEDIR=/www/hosted/listss/majordomo/virtual_mail/socialchange.net.au/

:0: c
master

# Requests for majordomo
:0
* ^To:( )+sco-team-request@socialchange.net.au
| $BASEDIR/majordomo/wrapper majordomo -l sco-team

# Forward requests to the list owner
:0
* ^To:( )+sco-team-approval@socialchange.net.au
! sysadmin@socialchange.net.au

# Forward requests to the list owner
:0
* ^To:(
)+(sco-team-owner|owner-sco-team|owner-sco-team-outgoing|owner-sco-team-
request)@socialchange.net.au
! sysadmin@socialchange.net.au


#### Main list processing
# If it is an invalid message then filter here.

:0
* ^To:( )+sco-team@socialchange.net.au
{
:0 c
        | ${BASEDIR}/majordomo/wrapper resend -l sco-team -h
socialchange.net.au sco-team-outgoing@socialchange.net.au

        :0
        | /usr/local/bin/mhonarc -umask 022 -add -outdir
${BASEDIR}/archives/sco
-team
}

# Forward messages to the list owner to the list owner
:0
* ^To:( )+sco-team-outgoing@socialchange.net.au
| /usr/lib/sendmail -oi `cat ${BASEDIR}/majordomo/lists/sco-team`


---
So I try this, and all is almost good. Only problem is that majordomo does
not seem to rewrite the To: properly for sco-team-outgoing, but puts it in
a header with a for syntax such as:

>From sco-team-owner@andre.sydney.socialchange.net.au  Wed Oct 27 00:20:22
1999
Received: from andre.sydney.socialchange.net.au (andre [203.111.113.4])
        by homer.socialchange.net.au (8.9.1b+Sun/8.9.1) with ESMTP id
AAA02359
        for <sco-team-outgoing@homer.socialchange.net.au>; Wed, 27 Oct
1999
00:20:22 +100
0 (EST)
Received: from homer (homer [203.111.113.5])
        by andre.sydney.socialchange.net.au (8.9.1/8.9.1) with ESMTP id
AAA03229
        for <sco-team@socialchange.net.au>; Wed, 27 Oct 1999 00:20:04
+1000 (EST
)
Date: Wed, 27 Oct 1999 00:20:21 +1000 (EST)
From: John Robens <jrobens@socialchange.net.au>
X-Sender: jrobens@homer
To: sco-team@socialchange.net.au
Subject: majordom 175
Message-ID: <Pine.GSO.4.05.9910270020100.28999-100000@homer>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 144


This causes it to be sent repeatedly to sco-team which means that it goes
in a loop until the max number of hops is exceeded and I get a bounce
message.

So 
1. is there a simpler/cleaner way to do this (is simple or clean possible
with email?)
2. how do I get the headers fixed, or can I trust rules looking for From
sco-team-owner and for <sco-team-outgoing> enough to use them. The only
problem with this is that the domain is not the domain which the mailing
list belongs to 
3. is there some way of knowing that majordomo has sent the mail once, so
that I don't have to wait for the max hops for it to time out?



--
John Robens
Technical Services Manager
Social Change Online

http://online.socialchange.net.au
PH   +61 2 9557 6500
FAX  + 61 2 9519 8940



Follow-Ups:
Indexed By Date Previous: Circumventing restricted-post
From: TC Hazzard <hazbro@gwi.net>
Next: Duplicate and more sent messages
From: "Robin Zwissler" <robin.zwissler@s.wwl.de>
Indexed By Thread Previous: Re: Circumventing restricted-post
From: Mats Dufberg <Mats.Dufberg@abc.se>
Next: Re: virtual hosting and email lists
From: Omar Thameen <omar@clifford.inch.com>

Google
 
Search Internet Search www.greatcircle.com