[Mailman-Users] Mailman with Plesk and qmail
midnight at the-oasis.net
Mon Sep 25 07:00:07 CEST 2000
Please feel free to include this in the Mailman documentation...
Using Mailman with Plesk (which uses qmail)
Base Configuration: RedHat 6.2 Server, AMD K6/2 CPU. Plesk 1.3,
(If you just want to get qmail working with Mailman and you dont
use Plesk, jump to Part 3)
Part 1. Getting Plesk and Mailman set up with Apache.
It is important to know that when you install Plesk, it installs its
own proprietary directory tree where all software it installs and
configures is located, i.e.: /usr/local/plesk. Also, Plesk rewrites
almost all of the configuration files on the fly, so if you dont make
your modifications in the right place, you will lose your
modifications the next time someone uses the Plesk Administrator
web interface to make a virtual host change. While I found at first
that having Plesk put its files in an unexpected place to be
somewhat of a pain, I eventually found it to be of great benefit.
The directory used to configure Apache under Plesk is
/usr/local/plesk/apache/conf, and the files you want to modify are
httpsd.conf and httpsd.conf.def. The httpsd.conf.def file is a
template. It is used verbatim as the header of the httpsd.conf file
each time Plesk performs an update of the configuration files. The
easiest way to make sure that you are getting configured the way
you want is to change both files.
The first thing I found out was that there was no way to actually
use Mailman and Plesk on the same installation of Apache. Plesk
programmers are pretty good regarding security, so they run all cgi
under suexec. Since Mai
lman has its own cgi wrapper, there was no easy way to get them working together. I spent days trying but eventually I gave up on that track. Im not sure its possible without serious code hacking.
With that said, however, I found a way around it. This is Linux. Theres always another way!
It is important to note that when I co-located my server, I received 10 IP addresses. While looking in the Plesk/Apache configuration scripts, I found that the Plesk programmers left the default Apache command listen 80
in the httpsd.conf file. This means that Plesk automatically took over every available IP on port 80. This was the first thing I had to rectify. So, instead of letting Plesk/Apache listen to port 80 on every IP, I commen
ted out listen 80 and manually set up 9 of the IP addresses and left one out purposefully. The command for this is listen x.x.x.x:port where x.x.x.x is the IP address you want Apache to listen on and port is self expl
anatory. They are additive, and you can use as many of them as you need.
After the Plesk installation, it looked like this:
And now it looks like this:
This leaves port 80 on 18.104.22.168 available for us to use in another way.
What we are after here is Apache running just enough to take care of the Mailman web interfaces. Now, back to having Plesk install on its own directory tree and it being a benefit. We can now install a stock Apache RPM a
nd not hurt the Plesk installation one bit. And, we are going to bind that installation quite specifically to listen on one address and comment out Listen * and BindAddress *. We wont need any virtual hosts for this Apac
he install. Plesk does that so well anyway, what would be the point in manually configuring them?
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# BindAddress: You can support virtual hosts with this option. This directive
# is used to tell the server which IP address to listen to. It can either
# contain "*", an IP address, or a fully qualified Internet domain name.
# See also the <VirtualHost> and Listen directives.
Once this is all done, you can restart everything and you will have 3 copies of Apache running. One each for Plesk Virtual Accounts, Plesk Administration and Mailman. Plesk only controls two of them. To restart Plesk manu
ally, you can issue the following command:
Part 2. Fixing up DNS.
Once again, Plesk dynamically rewrites the DNS configuration files, and once again, they leave us a nice way to make modifications permanent. The directory Plesk uses for this is /usr/local/plesk/namedb and the files we n
eed to modify are named.conf and named.conf.def. At the end of named.conf.def and at the end of named.conf, I added this:
In the same directory, I added a file named matrixlist.com, which contains:
@ IN SOA matrixlist.com. admin.matrixlist.com. (
965448528 ; serial
10800 ; refresh
3600 ; retry
604800 ; expire
86400 ) ; minimum
matrixlist.com. IN NS ns1.fiberhosting.net.
matrixlist.com. IN A 22.214.171.124
www.matrixlist.com. IN CNAME matrixlist.com.
mail.matrixlist.com. IN CNAME matrixlist.com.
matrixlist.com. IN MX 10 mail.matrixlist.com.
Restarting Plesk gets our new name service running on the IP of our choice.
To restart DNS under Plesk, issue the following command:
Part 3. Getting Mailman installed and running.
Since we have a virgin copy of Apache running using a default installation provided by an RPM, the Mailman installation instructions can be followed to the letter and you get a beautiful install.
Ill give you a time saver here. When you ./configure Mailman, you have to give it some parameters to get it all working.
You are definitely going to have to get this right to have a working installation, but I just was never smart enough to figure out exactly what was needed until an operation failed and gave me an error message. So, my sug
gestion is to not spend a whole lot of time here, but be prepared to recompile Mailman a few times as you figure out what is what. At first, make a guess. If you get them right, good for you. If you get them wrong, Mailma
n will throw an error message and tell you what to change! Dont waste a lot of time here. I labored over this trying to get it right and wasted a bunch of time.
Anyway, I ended up using:
./configure set-mail-gid=10029 and set-cgi-gid=99
You may have to redo the above steps as you find out exactly which gids you need. I found Mailman to be the easiest part of the installation once I found out that it would tell me where I went wrong when I goofed things
up. If you do have to recompile, dont forget to do a make clean first.
As you are following the steps in the INSTALL file in the Mailman install directory, one of the things you will do is to bring up the web interface to see if it is running. When you do this, if you got the with-cgi-gid g
roup wrong, you will probably see an error message that says something like
Got gid=xxx expected yyy. Recompile to accept yyy?
This is Mailmans way of telling you what you did wrong and how to get it right. Write down the number it expected for your next compile.
When you start bringing up the qmail interface, you may encounter difficulties if you got the with-mail-gid setting wrong. If you look in the /home/mailman/logs directory you will see a bunch of log files. Look in them I
f you got the mail gid wrong, one of them will be telling you a message like above, got gid=xxx, expected yyy. Write it down for your next compile.
The good thing is that a ./configure and make clean;make;make install doesnt seem to disturb anything.
Part 4. Getting qmail to cooperate.
Under Plesk, qmail configuration files are in /usr/local/plesk/qmail/control. In that directory, I modified two files.
In rcpthosts, I added:
In virtualdomains, I added:
If you followed the Mailman instructions, you created a user named mailman. This entry redirects mail to that user.
With that done, you can restart qmail under Plesk by running:
Part 5. Adding lists and aliases.
Now that the hard part is over, you should have a running Mailman installation and you can add your first list. The Mailman instructions suggest a first list named test, and I think that is a great idea. Add your test lis
t according to the instructions in the Mailman INSTALL file. Then, once you have done that, you need to add the qmail aliases.
In the /home/mailman/bin directory, create a file named mailalias.sh and put the following in it:
if [ $# = 1 ]; then
echo Making links to $i...
echo "|preline /home/mailman/mail/wrapper post $i" > .qmail-$i
echo "|preline /home/mailman/mail/wrapper mailowner $i" > .qmail-$i-admin
echo "|preline /home/mailman/mail/wrapper mailowner $i" > .qmail-$i-owner
echo "|preline /home/mailman/mail/wrapper mailowner $i" > .qmail-owner-$i
echo "|preline /home/mailman/mail/wrapper mailcmd $i" > .qmail-$i-request
Now, move to the /home/mailman directory and run:
This will create the qmail aliases.
At this point, restart Plesk one last time and test out your installation. Everything should be working.
Now, with all that said, I am no expert on qmail or Mailman. I depended heavily on the mailing lists for those two respective projects. I asked stupid questions and argued with people. I got some pretty good help from som
e of them. Mailing lists are what they are. Great benefit can be derived from mailing lists if you dont give up.
Happy Mail Listing.
midnight at the-oasis.net
Phil Barnett mailto:midnight at the-oasis.net
FTP Site ftp://ftp.the-oasis.net
More information about the Mailman-Users