[Mailman-Users] Newlist from a webpage?

Dave Klingler davek at mail.commercedata.com
Sun Dec 24 07:09:34 CET 2000


Essentially the problem here is just to pass a piece of information from
a program with no privileges running as nobody to a program with the ability
to update the aliases file and run newlist.  The 15-minute solution is to 
use what's there already (sendmail and perl) to send the information through
the mail system via cgi.  Since the message never leaves the machine, it's
just like using a file semaphore; a POST calls the MTA, which then leaves
the information in a file, which then gets picked up by the MTA and passed
to a little script that makes the necessary updates.  

You can go further by having a watched file; when the file changes a program
(probably a perl or python script) wakes up and reads the contents of the 
file, then makes the necessary changes.  Or you can use cron to sit there
and call a script like you've described below that watches a file and makes
the changes if they're there.

My personal choice would be the one I suggested first because it's easiest,
yields instantaneous changes and is effectively exactly the same as if I
wrote a real program that called an ioctl to watch a file for a semaphore.
This way inetd takes the place of the watcher, waking up the MTA and having
it call the script that calls newlist and updates aliases.

On another note, I have verified that hostway.com does indeed offer mailman
as part of their virtual hosting service.  Given that I've spent many hours
trying to get virtual mailmen to work in a way that would satisfy me, I'd
love to know how they're implementing it.  Better yet, I wish someone would 
shoot me.

Dave Klingler


> the virtual domains's "controlpanel" writes to a (hidden) file (in the root
> of each virtual domain) the necessary info for the newlist routine, after
> checking that the list doesnt exist yet...
> 
> Then, every couple minutes (say every 5... but that *could* be too long if
> you have a large number of virtual domains on the box - but being a cron
> job, thats configurable on a box by box basis) the cron job wakes up, as
> root, and processes through the list of domains on the box, looking for new
> trigger files.
> 
> When found it processes the newlist (capturing any error that might occur),
> and either updates the /etc/aliases and the virtual domains redirection, or
> barfs back a message to the intended list owner indicating they were >< that
> close to getting a list with that name...
> 
> Lets complicate things a little more - and add rmlist processing as well -
> that way complete control is within the virtual domain owner's hands... and
> I dont have to deal with as many support requests ;-)
> 
> This should be pretty simple this way... it's not instantaneous - but it
> should serve most people well enough, and since it's all driven from inside
> the virtual domains's diskspace, the possibilty of multiple people thrashing
> the same file is minimized.  (currently) I'm not worried about wasting
> cycles - my server rarely breaks 5% CPU usage - and I already have another
> job that runs at 5 minute intervals that I can tack this on to the end of...
> 
> I've got a site design/build to complete by the end of the year, so I'll
> look at this sometime in the new year.
> 
> > -----Original Message-----
> > From: Bob Puff at NLE [mailto:bob at nleaudio.com]
> > Sent: Saturday, December 23, 2000 10:31 PM
> > To: scott-brown at home.com
> > Subject: Re: [Mailman-Users] Newlist from a webpage?
> >
> >
> > Hi Scott,
> >
> > I have another idea for you.  Something I think was done at
> > the old ISP I used to use.
> >
> > Have your cgi script build some sort of shell script to do
> > what you need.  Stuff it in some directory.
> > Now set up a cron job that runs every hour (or more often if
> > you want) that checks to see if this script is present, and
> > if so, run it with root priveleges.  Then delete it after it is done.
> >
> > Yes, it does waste some processor time, but you can do just
> > about anything.  Been thinking about implementing that in my system.
> >
> > Please keep me posted on your progress.
> >
> > Bob
> >
> >
> > Scott Brown wrote:
> > >
> > > Know whats really funny here Bob?
> > >
> > > People want the ability.    People discuss it.  A few of us
> > even fiddle with
> > > it, write a little code, run into roadblocks... and in the
> > end, nothing
> > > useful gets done and the thread dies off.
> > >
> > > I dont want this to happen this time.
> > >
> > > Personally - I've looked through the source to newlist -
> > there's not much
> > > there really - and what is there *could* be turned into a
> > CGI - once I
> > > figure out the PHP CGI wrapper that Barry (et al) used -
> > but I ran into a
> > > roadblock where the security of my server's config (all
> > user CGI's are
> > > SUEXEC'd) makes it impossible for newlist to complete
> > successfully (see my
> > > other thread about newlist dying with an error trying to
> > unlink a lock
> > > file).
> > >
> > > So - I think I'm going to have to do what someone else
> > suggested - and
> > > create an email address to which the required info gets
> > posted, intercept it
> > > via a "wrapper" like functionality, and then process things
> > as the mail
> > > user.
> > >
> > > The next stage (updating the /etc/aliases and virtual
> > domain tables files),
> > > requries root priv on my box, so I'm still trying to figure
> > out how to do
> > > that one.
> > >
> > > > -----Original Message-----
> > > > From: Bob Puff at NLE [mailto:bob at nleaudio.com]
> > > > Sent: Friday, December 22, 2000 1:31 PM
> > > > To: scott-brown at home.com
> > > > Subject: Re: [Mailman-Users] Newlist from a webpage?
> > > >
> > > >
> > > > Hi Scott,
> > > >
> > > > I've been following your thread.  Let me know if you come up
> > > > with a cgi (or other) script - I'm trying to do the same
> > > > thing here - let users create mailing lists.
> > > >
> > > > Bob
> > > >
> > >
> > > ------------------------------------------------------
> > > Mailman-Users maillist  -  Mailman-Users at python.org
> > > http://www.python.org/mailman/listinfo/mailman-users
> >
> 
> 
> ------------------------------------------------------
> Mailman-Users maillist  -  Mailman-Users at python.org
> http://www.python.org/mailman/listinfo/mailman-users
> 





More information about the Mailman-Users mailing list