Dumb Me Tried to Update Mandriva (Again)
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
As usual my attempt to update Mandriva has destroyed Mailman. This time the update failed and rather than move forward, I reverted back to the working version (2010.2). However, I must have missed something because I am getting the following error when I try to access Mailman web: Apr 28 16:07:42 2012 admin(17726): @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ pr 28 16:07:42 2012 admin(17726): @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ admin(17726): [----- Mailman Version: 2.1.13 -----] admin(17726): [----- Traceback ------] admin(17726): Traceback (most recent call last): admin(17726): File "/usr/lib/mailman/scripts/driver", line 97, in run_main admin(17726): pkg = __import__('Mailman.Cgi', globals(), locals(), [scriptname]) admin(17726): File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 35, in <module> admin(17726): from Mailman import MailList admin(17726): File "/usr/lib/mailman/Mailman/MailList.py", line 64, in <module> admin(17726): from Mailman import Gui admin(17726): File "/usr/lib/mailman/Mailman/Gui/__init__.py", line 25, in <module> admin(17726): from Privacy import Privacy admin(17726): File "/usr/lib/mailman/Mailman/Gui/Privacy.py", line 28, in <module> admin(17726): from Mailman import GPGUtils admin(17726): File "/usr/lib/mailman/Mailman/GPGUtils.py", line 32, in <module> admin(17726): import GnuPGInterface admin(17726): ImportError: No module named GnuPGInterface admin(17726): sys.version = 2.7.2 (default, Dec 19 2011, 09:56:13) [GCC 4.6.1 20110627 (Mandriva)] admin(17726): sys.executable = /usr/bin/python admin(17726): sys.prefix = /usr admin(17726): sys.exec_prefix = /usr admin(17726): sys.path = /usr admin(17726): sys.platform = linux2 admin(17726): [----- Environment Variables -----] admin(17726): SSL_VERSION_INTERFACE: mod_ssl/2.2.22 admin(17726): SSL_CIPHER_EXPORT: false admin(17726): SSL_SERVER_S_DN_Email: xxxxxxx@xxxxxxxx.net admin(17726): SERVER_SOFTWARE: Apache/2.2.22 (Mandriva Linux/PREFORK-0.1mdv2010.2) admin(17726): SCRIPT_NAME: /mailman/admin admin(17726): SSL_SERVER_A_KEY: rsaEncryption admin(17726): SSL_SERVER_S_DN_ST: Georgia admin(17726): SERVER_SIGNATURE: <address>Apache/2.2.22 (Mandriva Linux/PREFORK-0.1mdv2010.2) Server at xxxxx.xxxxxxxx.com Port 443</address> admin(17726): admin(17726): REQUEST_METHOD: GET admin(17726): SERVER_PROTOCOL: HTTP/1.1 admin(17726): SSL_SERVER_S_DN: /C=US/ST=xxxxxxxx/L=xxxxxxxxx/O=xxxxxxxxxxxxxxxxxxxxxxxxx/CN=xxxxxxxxxxxxxxxxxx.xxxxxxxxxx.com/emailAddress=xxxxxxx@xxxxxxxx.net admin(17726): SSL_CIPHER: DHE-RSA-CAMELLIA256-SHA admin(17726): SSL_SERVER_V_START: Mar 18 13:32:36 2011 GMT admin(17726): SSL_SESSION_ID: 66E6AC1408845A20EC6F56C140D2BED471A632BD7C03FC89503B0B611F1B2A18 admin(17726): SSL_CLIENT_VERIFY: NONE admin(17726): SSL_SERVER_I_DN_ST: xxxxxxxxxxx admin(17726): HTTP_CONNECTION: keep-alive admin(17726): SERVER_NAME: xxxxx.xxxxxxxx.com admin(17726): REMOTE_ADDR: 74.176.153.13 admin(17726): SSL_CIPHER_ALGKEYSIZE: 256 admin(17726): SSL_SECURE_RENEG: true admin(17726): SSL_SERVER_I_DN: /C=US/ST=xxxxxxxx/L=xxxxxxxxx/O=xxxxxxxxxxxxxxxxxxxxxxxxx/CN=localhost/emailAddress=xxxxxxx@xxxxxxxx.net admin(17726): SSL_SERVER_I_DN_C: US admin(17726): SSL_COMPRESS_METHOD: NULL admin(17726): SSL_SERVER_I_DN_L: Loganville admin(17726): SSL_SERVER_I_DN_O: xxxxxxxxxxxxxxxxxxxxxxxxx admin(17726): SSL_SERVER_M_SERIAL: 01 admin(17726): SERVER_ADDR: 192.168.0.3 admin(17726): DOCUMENT_ROOT: /var/www/html admin(17726): SERVER_PORT: 443 admin(17726): SSL_SERVER_I_DN_Email: xxxxxxx@xxxxxxxx.net admin(17726): SSL_VERSION_LIBRARY: OpenSSL/1.0.0a admin(17726): PYTHONPATH: /usr/lib/mailman admin(17726): SCRIPT_FILENAME: /usr/lib/mailman/cgi-bin/admin.cgi admin(17726): SERVER_ADMIN: mailman-owner@xxxxxxxxxxx.net admin(17726): SSL_SERVER_S_DN_O: xxxxxxxxxxxxxxxxxxxxxxxxx admin(17726): SSL_SERVER_A_SIG: sha1WithRSAEncryption admin(17726): SSL_SERVER_S_DN_L: Loganville admin(17726): SCRIPT_URI: https://xxxxx.xxxxxxxx.com/mailman/admin admin(17726): SCRIPT_URL: /mailman/admin admin(17726): HTTPS: on admin(17726): SSL_SERVER_M_VERSION: 1 admin(17726): SSL_SERVER_S_DN_C: US admin(17726): QUERY_STRING: admin(17726): REQUEST_URI: /mailman/admin admin(17726): HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 admin(17726): PERL5LIB: /usr/share/awstats/lib:/usr/share/awstats/plugins admin(17726): SSL_CIPHER_USEKEYSIZE: 256 admin(17726): HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0 admin(17726): GATEWAY_INTERFACE: CGI/1.1 admin(17726): SSL_SERVER_I_DN_CN: localhost admin(17726): REMOTE_PORT: 4811 admin(17726): HTTP_ACCEPT_LANGUAGE: en-us,en;q=0.5 admin(17726): HTTP_DNT: 1 admin(17726): SSL_SERVER_V_END: Mar 17 13:32:36 2012 GMT admin(17726): SSL_PROTOCOL: SSLv3 admin(17726): HTTP_HOST: xxxxx.xxxxxxxx.com admin(17726): SSL_SERVER_S_DN_CN: xxxxx.xxxxxxxx.com admin(17726): HTTP_ACCEPT_ENCODING: gzip, deflate admin(17726): UNIQUE_ID: T5xOCn8AAAEAAE-BQyUAAAAN I don't have a clue what needs to be restored as I didn't even know this was using GPG.
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 4/28/2012 1:24 PM, Dennis Putnam wrote:
This import is not in standard GNU Mailman and neither is the Mailman/GPGUtils.py module.
I don't have a clue what needs to be restored as I didn't even know this was using GPG.
Nor do I. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 4/28/2012 3:02 PM, Dennis Putnam wrote:
According to the above traceback, the import is in /usr/lib/mailman/Mailman/Gui/Privacy.py at line 25. If you have a backup of /usr/lib/mailman/Mailman/ you could try restoring all of it. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
Of course I did not expect this to be easy. After restoring the Mailman directory as suggested, mailman will not start: Traceback (most recent call last): File "/usr/sbin/mailmanctl", line 106, in <module> from Mailman import mm_cfg ImportError: Bad magic number in /usr/lib/mailman/Mailman/mm_cfg.pyc On 4/28/2012 6:40 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
It appears your system Python is now different from the one that compiled all the .pyc files. Just do
rm -r /path/to/Mailman/*.pyc
This will remove all the compiled Python modules and they will be recompiled as needed.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
I am making progress (I think). When I uninstalled and reinstalled python, it seems to have taken mailman with it. I did a reinstall of mailman and now the daemon and the qrunners start. I can also now access the initial web page with my lists shown. However, when I try to access the management page I get a 404 error. Obviously something still needs to be restored but I don't know what. Do I now need to re-restore mailman/Mailman?
On 5/2/2012 10:12 AM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
I'm guessing you are saying that you can go to http://www.example.com/mailman/listinfo/ and see the expected results, but either one or both of http://www.example.com/mailman/admin/ or http://www.example.com/mailman/admin/LISTNAME gives a 404.
This would seem to say that /path/to/mailman/cgi-bin/listinfo exists but /path/to/mailman/cgi-bin/admin is missing.
Mailman's cgi-bin directory should contain all of
admin confirm edithtml listinfo options rmlist subscribe admindb create private roster
If all those are there, there is probably some issue with the web server config.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
All the cgi files are present. It appears to me that my web server config was unaffected by the botched upgrade attempt. However, I don't know if the mailman or python installs did something. What should I look for in the httpd configuration?
On 5/2/2012 11:14 AM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
I seem to recall seeing this problem before but I can't find it in any of my archives.
[Wed May 02 13:14:20 2012] [error] [client 74.176.153.13] script not found or unable to stat: /usr/lib/mailman/cgi-bin/admin.cgi.cgi, referer: https://dap002.dyndns-ip.com/mailman/admin
Obviously the double cgi extension is the problem.
On 5/2/2012 12:42 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
What is the setting for CGIEXT in mm_cfg.py? If there's nothing there, look in Defaults.py, but the default should be
CGIEXT = ''
If your cgi wrappers are actually named with a .cgi extension, CGIEXT should be set to '.cgi', otherwise it should be the default null.
It is not at all clear to me why this fails with the admin CGI and not with listinfo. If there is anything in the web server that rewrites these, it shouldn't be doing that.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
Thanks for the reply. You are correct in that it does not exist in mm_cfg.py. However, in Defaults.py it is set to
CGIEXT = '.cgi'
The question then becomes, where should I fix it (presumably in mm_cfg-py). Leave it to Mandriva to change what is normal for everyone else.
On 5/2/2012 7:44 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
What are the actual names of the wrappers in Mailman's cgi-bin directory? Do they have a .cgi extension?
If they do not have a .cgi extension, I would put
CGIEXT = ''
in mm_cfg.py. If they do have a .cgi extension, but the web server is looking for files with a .cgi.cgi (doubled) extension, I would look at the web server config and see if it is rewriting the URLs to add the second '.cgi' and, if so, remove that rewrite.
Also look at the various web page links and form action= URLs and verify that they are correct.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
Thanks. The cgi scripts do have the cgi extension on them. I put CGIEXT = '' in mm_cfg.py which, of course fixed the problem.
It may have fixed the problem for the moment, but it is the wrong way to do it.
If the cgi-bin/* wrappers have .cgi extensions, the proper value for CGIEXT is '.cgi'. If that is resulting in the web server looking for *.cgi.cgi files, this is due to something that was added to the web server configuration, possibly as a prior 'solution' to a problem of the web server looking for files without the '.cgi' extension.
Anyway, I would find what's adding the extra '.cgi' in the web server and remove it and then either remove the CGIEXT setting from mm_cfg.py or set it to '.cgi'.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
I've made the decision to abandon Mandriva and migrate to Centos. I have mailman up an running (sort of) but now have the opposite problem. This is a vanilla install of Apache so the only config file is mailman.conf at this time. The cgi extension does not exist, in cgi-bin, on this installation of mailman. However, apache is looking for <command>.cgi. I don't understand why this is a problem out of the box. Shouldn't a vanilla install have this configured correctly? In any case what is the correct way to configure this? Thanks.
On 5/4/2012 12:12 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/59095c9cb86c22f50431abef1b166ba4.jpg?s=120&d=mm&r=g)
On Wed, May 9, 2012 at 10:48 AM, Dennis Putnam <dap1@bellsouth.net> wrote:
I've made the decision to abandon Mandriva and migrate to Centos.
If you wanted to migrate to Ubuntu 12.04, I could give you all the steps for getting Mailman up and running easily. But someone else will probably be able to help you with Apache on Centos.
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
Please post /etc/httpd/conf.d/mailman.conf and /etc/mailman/mm_cfg.py or /usr/lib/Mailman/mm_cfg.py (I think one will be a symlink to the other).
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
Thanks for the reply. I think you'll it pretty much vanilla.
mm_py.cfg
# -*- python -*-
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""This module contains your site-specific settings.
From a brand new distribution it should be copied to mm_cfg.py. If you already have an mm_cfg.py, be careful to add in only the new settings you want. Mailman's installation procedure will never overwrite your mm_cfg.py file.
The complete set of distributed defaults, with documentation, are in the file Defaults.py. In mm_cfg.py, override only those you want to change, after the
from Defaults import *
line (see below).
Note that these are just default settings; many can be overridden via the administrator and user interfaces on a per-list or per-user basis.
"""
############################################### # Here's where we get the distributed defaults.
from Defaults import * import pwd, grp
################################################## # Put YOUR site-specific settings below this line.
#ATTENTION: when you use SELinux, mailman might not #be able to recompile the configuration file #due to policy settings. If this is the case, #please run (as root) the supplied "mailman-update-cfg" script
############################################################## # Here's where we override shipped defaults with settings # # suitable for the RPM package. # MAILMAN_UID = pwd.getpwnam('mailman')[2] MAILMAN_GID = grp.getgrnam('mailman')[2]
############################################################## # Set URL and email domain names # # # Mailman needs to know about (at least) two fully-qualified domain # names (fqdn) # # 1) the hostname used in your urls (DEFAULT_URL_HOST) # 2) the hostname used in email addresses for your domain (DEFAULT_EMAIL_HOST) # # For example, if people visit your Mailman system with # "http://www.dom.ain/mailman" then your url fqdn is "www.dom.ain", # and if people send mail to your system via "yourlist@dom.ain" then # your email fqdn is "dom.ain". DEFAULT_URL_HOST controls the former, # and DEFAULT_EMAIL_HOST controls the latter. Mailman also needs to # know how to map from one to the other (this is especially important # if you're running with virtual domains). You use # "add_virtualhost(urlfqdn, emailfqdn)" to add new mappings.
# Default to using the FQDN of machine mailman is running on. # If this is not correct for your installation delete the following 5 # lines that acquire the FQDN and manually edit the hosts instead.
from socket import * try: fqdn = getfqdn() except: fqdn = 'mm_cfg_has_unknown_host_domains'
DEFAULT_URL_HOST = fqdn DEFAULT_EMAIL_HOST = fqdn
# Because we've overriden the virtual hosts above add_virtualhost # MUST be called after they have been defined.
############################################################## # Put YOUR site-specific configuration below, in mm_cfg.py . # # See Defaults.py for explanations of the values. #
# Note - if you're looking for something that is imported from mm_cfg, but you # didn't find it above, it's probably in Defaults.py.
mailman.conf
# Directives for the mailman web interface
Alias /pipermail/ "/var/lib/mailman/archives/public/" ScriptAliasMatch ^/mailman/([^/]*)(.*)$ "/usr/lib/mailman/cgi-bin/$1.cgi$2"
# For the archives
<Directory "/var/lib/mailman/archives/public"> Options +FollowSymLinks Order allow,deny Allow from all </Directory>
On 5/9/2012 4:07 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
Either remove the '.cgi' from the above line making it
ScriptAliasMatch ^/mailman/([^/]*)(.*)$ "/usr/lib/mailman/cgi-bin/$1$2"
or remove the line completely and replace it with
ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"
Now the real question is was that file part of the Centos (RedHat) Mailman package or was it residue from Mandriva.
If you're sure it was part of the Centos rpm, file a bug report with whoever made the rpm.
If not look for some Mailman config in /etc/httpd/conf/httpd.conf or some other included file. If you find other Mailman configuration, it may be correct so you maybe could just remove /etc/httpd/conf.d/mailman.conf.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
I responded without really thinking. I don't think that will work completely. It will remove the .pyc files immediately subordinate the Mailman/, but not any deeper ones. For that you need something like
find /path/to/Mailman -name "*.pyc" -exec rm "{}" \;
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 4/28/2012 1:24 PM, Dennis Putnam wrote:
This import is not in standard GNU Mailman and neither is the Mailman/GPGUtils.py module.
I don't have a clue what needs to be restored as I didn't even know this was using GPG.
Nor do I. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 4/28/2012 3:02 PM, Dennis Putnam wrote:
According to the above traceback, the import is in /usr/lib/mailman/Mailman/Gui/Privacy.py at line 25. If you have a backup of /usr/lib/mailman/Mailman/ you could try restoring all of it. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
Of course I did not expect this to be easy. After restoring the Mailman directory as suggested, mailman will not start: Traceback (most recent call last): File "/usr/sbin/mailmanctl", line 106, in <module> from Mailman import mm_cfg ImportError: Bad magic number in /usr/lib/mailman/Mailman/mm_cfg.pyc On 4/28/2012 6:40 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
It appears your system Python is now different from the one that compiled all the .pyc files. Just do
rm -r /path/to/Mailman/*.pyc
This will remove all the compiled Python modules and they will be recompiled as needed.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
I am making progress (I think). When I uninstalled and reinstalled python, it seems to have taken mailman with it. I did a reinstall of mailman and now the daemon and the qrunners start. I can also now access the initial web page with my lists shown. However, when I try to access the management page I get a 404 error. Obviously something still needs to be restored but I don't know what. Do I now need to re-restore mailman/Mailman?
On 5/2/2012 10:12 AM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
I'm guessing you are saying that you can go to http://www.example.com/mailman/listinfo/ and see the expected results, but either one or both of http://www.example.com/mailman/admin/ or http://www.example.com/mailman/admin/LISTNAME gives a 404.
This would seem to say that /path/to/mailman/cgi-bin/listinfo exists but /path/to/mailman/cgi-bin/admin is missing.
Mailman's cgi-bin directory should contain all of
admin confirm edithtml listinfo options rmlist subscribe admindb create private roster
If all those are there, there is probably some issue with the web server config.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
All the cgi files are present. It appears to me that my web server config was unaffected by the botched upgrade attempt. However, I don't know if the mailman or python installs did something. What should I look for in the httpd configuration?
On 5/2/2012 11:14 AM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
I seem to recall seeing this problem before but I can't find it in any of my archives.
[Wed May 02 13:14:20 2012] [error] [client 74.176.153.13] script not found or unable to stat: /usr/lib/mailman/cgi-bin/admin.cgi.cgi, referer: https://dap002.dyndns-ip.com/mailman/admin
Obviously the double cgi extension is the problem.
On 5/2/2012 12:42 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
What is the setting for CGIEXT in mm_cfg.py? If there's nothing there, look in Defaults.py, but the default should be
CGIEXT = ''
If your cgi wrappers are actually named with a .cgi extension, CGIEXT should be set to '.cgi', otherwise it should be the default null.
It is not at all clear to me why this fails with the admin CGI and not with listinfo. If there is anything in the web server that rewrites these, it shouldn't be doing that.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
Thanks for the reply. You are correct in that it does not exist in mm_cfg.py. However, in Defaults.py it is set to
CGIEXT = '.cgi'
The question then becomes, where should I fix it (presumably in mm_cfg-py). Leave it to Mandriva to change what is normal for everyone else.
On 5/2/2012 7:44 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
What are the actual names of the wrappers in Mailman's cgi-bin directory? Do they have a .cgi extension?
If they do not have a .cgi extension, I would put
CGIEXT = ''
in mm_cfg.py. If they do have a .cgi extension, but the web server is looking for files with a .cgi.cgi (doubled) extension, I would look at the web server config and see if it is rewriting the URLs to add the second '.cgi' and, if so, remove that rewrite.
Also look at the various web page links and form action= URLs and verify that they are correct.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
Thanks. The cgi scripts do have the cgi extension on them. I put CGIEXT = '' in mm_cfg.py which, of course fixed the problem.
It may have fixed the problem for the moment, but it is the wrong way to do it.
If the cgi-bin/* wrappers have .cgi extensions, the proper value for CGIEXT is '.cgi'. If that is resulting in the web server looking for *.cgi.cgi files, this is due to something that was added to the web server configuration, possibly as a prior 'solution' to a problem of the web server looking for files without the '.cgi' extension.
Anyway, I would find what's adding the extra '.cgi' in the web server and remove it and then either remove the CGIEXT setting from mm_cfg.py or set it to '.cgi'.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
I've made the decision to abandon Mandriva and migrate to Centos. I have mailman up an running (sort of) but now have the opposite problem. This is a vanilla install of Apache so the only config file is mailman.conf at this time. The cgi extension does not exist, in cgi-bin, on this installation of mailman. However, apache is looking for <command>.cgi. I don't understand why this is a problem out of the box. Shouldn't a vanilla install have this configured correctly? In any case what is the correct way to configure this? Thanks.
On 5/4/2012 12:12 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/59095c9cb86c22f50431abef1b166ba4.jpg?s=120&d=mm&r=g)
On Wed, May 9, 2012 at 10:48 AM, Dennis Putnam <dap1@bellsouth.net> wrote:
I've made the decision to abandon Mandriva and migrate to Centos.
If you wanted to migrate to Ubuntu 12.04, I could give you all the steps for getting Mailman up and running easily. But someone else will probably be able to help you with Apache on Centos.
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
Please post /etc/httpd/conf.d/mailman.conf and /etc/mailman/mm_cfg.py or /usr/lib/Mailman/mm_cfg.py (I think one will be a symlink to the other).
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55dd4b9d4dca2dc661df666477622d76.jpg?s=120&d=mm&r=g)
Thanks for the reply. I think you'll it pretty much vanilla.
mm_py.cfg
# -*- python -*-
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""This module contains your site-specific settings.
From a brand new distribution it should be copied to mm_cfg.py. If you already have an mm_cfg.py, be careful to add in only the new settings you want. Mailman's installation procedure will never overwrite your mm_cfg.py file.
The complete set of distributed defaults, with documentation, are in the file Defaults.py. In mm_cfg.py, override only those you want to change, after the
from Defaults import *
line (see below).
Note that these are just default settings; many can be overridden via the administrator and user interfaces on a per-list or per-user basis.
"""
############################################### # Here's where we get the distributed defaults.
from Defaults import * import pwd, grp
################################################## # Put YOUR site-specific settings below this line.
#ATTENTION: when you use SELinux, mailman might not #be able to recompile the configuration file #due to policy settings. If this is the case, #please run (as root) the supplied "mailman-update-cfg" script
############################################################## # Here's where we override shipped defaults with settings # # suitable for the RPM package. # MAILMAN_UID = pwd.getpwnam('mailman')[2] MAILMAN_GID = grp.getgrnam('mailman')[2]
############################################################## # Set URL and email domain names # # # Mailman needs to know about (at least) two fully-qualified domain # names (fqdn) # # 1) the hostname used in your urls (DEFAULT_URL_HOST) # 2) the hostname used in email addresses for your domain (DEFAULT_EMAIL_HOST) # # For example, if people visit your Mailman system with # "http://www.dom.ain/mailman" then your url fqdn is "www.dom.ain", # and if people send mail to your system via "yourlist@dom.ain" then # your email fqdn is "dom.ain". DEFAULT_URL_HOST controls the former, # and DEFAULT_EMAIL_HOST controls the latter. Mailman also needs to # know how to map from one to the other (this is especially important # if you're running with virtual domains). You use # "add_virtualhost(urlfqdn, emailfqdn)" to add new mappings.
# Default to using the FQDN of machine mailman is running on. # If this is not correct for your installation delete the following 5 # lines that acquire the FQDN and manually edit the hosts instead.
from socket import * try: fqdn = getfqdn() except: fqdn = 'mm_cfg_has_unknown_host_domains'
DEFAULT_URL_HOST = fqdn DEFAULT_EMAIL_HOST = fqdn
# Because we've overriden the virtual hosts above add_virtualhost # MUST be called after they have been defined.
############################################################## # Put YOUR site-specific configuration below, in mm_cfg.py . # # See Defaults.py for explanations of the values. #
# Note - if you're looking for something that is imported from mm_cfg, but you # didn't find it above, it's probably in Defaults.py.
mailman.conf
# Directives for the mailman web interface
Alias /pipermail/ "/var/lib/mailman/archives/public/" ScriptAliasMatch ^/mailman/([^/]*)(.*)$ "/usr/lib/mailman/cgi-bin/$1.cgi$2"
# For the archives
<Directory "/var/lib/mailman/archives/public"> Options +FollowSymLinks Order allow,deny Allow from all </Directory>
On 5/9/2012 4:07 PM, Mark Sapiro wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Dennis Putnam wrote:
Either remove the '.cgi' from the above line making it
ScriptAliasMatch ^/mailman/([^/]*)(.*)$ "/usr/lib/mailman/cgi-bin/$1$2"
or remove the line completely and replace it with
ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"
Now the real question is was that file part of the Centos (RedHat) Mailman package or was it residue from Mandriva.
If you're sure it was part of the Centos rpm, file a bug report with whoever made the rpm.
If not look for some Mailman config in /etc/httpd/conf/httpd.conf or some other included file. If you find other Mailman configuration, it may be correct so you maybe could just remove /etc/httpd/conf.d/mailman.conf.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
I responded without really thinking. I don't think that will work completely. It will remove the .pyc files immediately subordinate the Mailman/, but not any deeper ones. For that you need something like
find /path/to/Mailman -name "*.pyc" -exec rm "{}" \;
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
David
-
Dennis Putnam
-
Mark Sapiro