[Mailman-Developers] Users, Bounces, and Virtual Domains (was (no subject))

Dave Klingler davek@mail.commercedata.com
Fri, 22 Dec 2000 15:51:36 -0700 (MST)


I've gotten slightly more savvy in the last 24 hours and narrowed down the 
source of my problem, wrapper.  For those who haven't been following my 
mini-saga, I'm trying to get Mailman up and running in a virtual server 
environment.  I used virtfs to create my virtual machines, but virtfs is 
just a set of scripts and you can do it manually using chroot.  These virtual 
machines all look like completely separate, standalone servers to anyone 
logging in, but they're more secure and easier to administrate than multiple 
standalone servers.

DEVELOPER REQUEST: Please separate the cgi and MTA script configuration
directories and if possible, put them into a separate text configuration 
file that's easily edited.

Basically the snag in what I'm doing is that I'm using one apache process to
service web requests but for various reasons I'm using multiple instances of
sendmail, each listening to a different IP number.  That means that CGI stuff
has to have a different directory path encoded in it than the wrapper scripts
that get executed by the MTA, because the MTA runs in a chrooted environment.  
The way I get around this is by creating a symbolic link in the chrooted
root directory that points back to the original /home/mailman directory.  For
example, my mailman installation resides in

   /storage/virtual/mydomain.net/home/mailman

but when chroot is active it resides in 
   
   /home/mailman.

In the chrooted environment, I put in a symbolic link

   /storage/virtual/mydomain.net/home/mailman 

that points back to 

   /home/mailman

so that both chrooted and unchrooted scripts will work.  Unfortunately, while
wrapper works great in the unchrooted environment:

[root@mail mail]# su mail
[mail@mail mail]$ pwd
/storage/virtual/mydomain.net/home/mailman/mail
[mail@mail mail]$ ./wrapper mailcmd test <../help_test
[mail@mail mail]$ 

It for some reason DOESN'T work in the chrooted environment, even though the
symbolic link seems to be working fine!

[root@mail mail]# su mail
[mail@mail mail]$ pwd
/home/mailman/mail
[mail@mail mail]$ ls
wrapper
[mail@mail mail]$ ls /storage/virtual/mydomain.net/home/mailman/mail    
wrapper
[mail@mail mail]$ ./wrapper mailcmd test <../help_test
No such file or directory
[mail@mail mail]$ 

Strange, huh?  Anyone have any ideas?

Thanks in advance for any pity anyone might take on me.  I'm in over my 
head, I think.

Dave Klingler


















> It occurred to me that I could provide a little more information in case
> someone else wants to do what I've done in using virtual domains with mailman.
> I left out a few steps in my synopsis below.  If anyone wants me to post 
> a more complete recipe, let me know.  I'll put up better instructions once
> I figure out what's wrong with what I've done.
> 
> I DID put a symbolic link to /home/mailman/mail/wrapper in my /etc/smrsh 
> directory so that smrsh could find the wrapper file.  I left that out below.
> I THINK that wrapper runs okay, but when I su to mail and then run it with
> "wrapper mailcmd test" I get "sh: wrapper: command not found".  I'm guessing
> that means wrapper can't find its way to the scripts directory, but I'm 
> not sure why not, or whether that's the problem that causes sendmail to 
> deposit the missive "operating system error" in my queued mail files.
> 
> All in all, if it only worked it'd be Really, Really Elegant.  No, really.
> 
> Dave Klingler
> 
> 
> > 1.  I set up several virtual domains on a separate storage server, with their
> > own copies of sendmail called by a daemon that in turn is called by inetd
> > that's part of the virtfs package.
> > 
> > 2.  I set up separate copies of mailman in each, and because they will be
> > called/used by both apache (which doesn't use chroot) and sendmail (which does)
> > I created a nice long symbolic link from a directory hung off the virtual 
> > root called /storage/virtual/domainA/home/mailman to the virtual /home/mailman
> > directory.  That way both apache and the chrooted sendmail can find their 
> > way to the mailman files, which have been set up with the --prefix= 
> > /storage/virtual/domainA/home/mailman option in configure.
> > 
> > 3.  I've spent many hours trying to figure out why it doesn't work this
> > way.  I need to go buy the O'Reilly Python book, I guess.  Somehow mail
> > to test-request@domainA.net gets black-holed with "operating system error"
> > and I haven't figured out why.
> > 
> > There you have it.  I hope my concrete example of one of your hypothetical
> > situations helps, and if anyone takes pity on me and figures out why I'm
> > dysfunctional I'd be really grateful.  
> > 
> > Thanks!
> > Dave Klingler
> > 
> > 
> > _______________________________________________
> > Mailman-Developers mailing list
> > Mailman-Developers@python.org
> > http://www.python.org/mailman/listinfo/mailman-developers
> > 
> 
> 
> _______________________________________________
> Mailman-Developers mailing list
> Mailman-Developers@python.org
> http://www.python.org/mailman/listinfo/mailman-developers
>