500 errors with certain domains

I have been running mailman on a Freebsd server for about 10 years. I am now migrating to a bigger server running Centos. The problems I have been having I have been able to work through with all the help posted in these lists and forums, but I am at a point where I am stuck. If i connect via my ip address: 216.xxx.xxx.xxx/mailman/listinfo, I get in, I see no lists even though I made a mailman list as public, I can the got to the admin page, still do not see the list, but I can go to 216.xxx.xxx.xxx/mailman/admin/mailman and log in. Once there if I go to post a message in the waiting for moderator, when I hit the save changes button, the url reverts to http://draguncomputers/mailman/admin/mailman and I get a 500 error. I have virtual hosts, and only one uses the list. System CentOS 6 with Cpanel. Defaults.py import os def seconds(s): return s def minutes(m): return m * 60 def hours(h): return h * 60 * 60 def days(d): return d * 60 * 60 * 24 # Some convenient constants try: True, False except NameError: True = 1 False = 0 Yes = yes = On = on = True No = no = Off = off = False ##### # General system-wide defaults ##### # Should image logos be used? Set this to 0 to disable image logos from "our # sponsors" and just use textual links instead (this will also disable the # shortcut "favicon"). Otherwise, this should contain the URL base path to # the logo images (and must contain the trailing slash).. If you want to # disable Mailman's logo footer altogther, hack # Mailman/htmlformat.py:MailmanLogo(), which also contains the hardcoded links # and image names. IMAGE_LOGOS = '/img-sys/' # The name of the Mailman favicon SHORTCUT_ICON = 'mm-icon.png' # Don't change MAILMAN_URL, unless you want to point it at one of the mirrors. MAILMAN_URL = 'http://www.gnu.org/software/mailman/index.html' #MAILMAN_URL = 'http://www.list.org/' #MAILMAN_URL = 'http://mailman.sf.net/' # Mailman needs to know about (at least) two fully-qualified domain names # (fqdn); 1) the hostname used in your urls, and 2) the hostname used in email # addresses for your domain. 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. # # If you don't need to change DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST in your # mm_cfg.py, then you're done; the default mapping is added automatically. If # however you change either variable in your mm_cfg.py, then be sure to also # include the following: # # add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) # # because otherwise the default mappings won't be correct. DEFAULT_EMAIL_HOST = 'draguncomputers.com' DEFAULT_URL_HOST = 'draguncomputers.com' DEFAULT_URL_PATTERN = 'http://%s/mailman/' # DEFAULT_HOST_NAME has been replaced with DEFAULT_EMAIL_HOST, however some # sites may have the former in their mm_cfg.py files. If so, we'll believe # that, otherwise we'll believe DEFAULT_EMAIL_HOST. Same for DEFAULT_URL. DEFAULT_HOST_NAME = None DEFAULT_URL = None HOME_PAGE = 'index.html' MAILMAN_SITE_LIST = 'mailman' # Normally when a site administrator authenticates to a web page with the site # password, they get a cookie which authorizes them as the list admin. It # makes me nervous to hand out site auth cookies because if this cookie is # cracked or intercepted, the intruder will have access to every list on the # site. OTOH, it's dang handy to not have to re-authenticate to every list on # the site. Set this value to Yes to allow site admin cookies. ALLOW_SITE_ADMIN_COOKIES = No # If the following is set to a non-zero value, web authentication cookies will # expire that many seconds following their last use. AUTHENTICATION_COOKIE_LIFETIME = 0 # Form lifetime is set against Cross Site Request Forgery. FORM_LIFETIME = hours(1) # If the following is set to a non-empty string, this string in combination # with the time, list name and the IP address of the requestor is used to # create a hidden hash as part of the subscribe form on the listinfo page. # This hash is checked upon form submission and the subscribe fails if it # doesn't match. I.e. the form posted must be first retrieved from the # listinfo CGI by the same IP that posts it. The subscribe also fails if # the time the form was retrieved is more than the above FORM_LIFETIME or less # than the below SUBSCRIBE_FORM_MIN_TIME before submission. # Important: If you have any static subscribe forms on your web site, setting # this option will break them. With this option set, subscribe forms must be # dynamically generated to include the hidden data. See the code block # beginning with "if mm_cfg.SUBSCRIBE_FORM_SECRET:" in Mailman/Cgi/listinfo.py # for the details of the hidden data. SUBSCRIBE_FORM_SECRET = None # If SUBSCRIBE_FORM_SECRET is not None, this is the minimum time the user must # take after retrieving the form before submitting it. Set to 0 to skip this # test. SUBSCRIBE_FORM_MIN_TIME = seconds(5) # Command that is used to convert text/html parts into plain text. This # should output results to standard output. %(filename)s will contain the # name of the temporary file that the program should operate on. HTML_TO_PLAIN_TEXT_COMMAND = '/usr/bin/lynx -dump %(filename)s' # A Python regular expression character class which defines the characters # allowed in list names. Lists cannot be created with names containing any # character that doesn't match this class. ACCEPTABLE_LISTNAME_CHARACTERS = '[-+_.=a-z0-9]' ##### # Virtual domains ##### # Set up your virtual host mappings here. This is primarily used for the # thru-the-web list creation, so its effects are currently fairly limited. # Use add_virtualhost() call to add new mappings. The keys are strings as # determined by Utils.get_domain(), the values are as appropriate for # DEFAULT_HOST_NAME. VIRTUAL_HOSTS = {} # When set to Yes, the listinfo and admin overviews of lists on the machine # will be confined to only those lists whose web_page_url configuration option # host is included within the URL by which the page is visited - only those # "on the virtual host". When set to No, all advertised (i.e. public) lists # are included in the overview. VIRTUAL_HOST_OVERVIEW = On # Helper function; use this in your mm_cfg.py files. If optional emailhost is # omitted it defaults to urlhost with the first name stripped off, e.g. # # add_virtualhost('www.dom.ain') # VIRTUAL_HOST['www.dom.ain'] # ==> 'dom.ain' # def add_virtualhost(urlhost, emailhost=None): DOT = '.' if emailhost is None: emailhost = DOT.join(urlhost.split(DOT)[1:]) VIRTUAL_HOSTS[urlhost.lower()] = emailhost.lower() # And set the default add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) # Note that you will want to run bin/fix_url.py to change the domain of an # existing list. bin/fix_url.py must be run within the bin/withlist script, # like so: bin/withlist -l -r bin/fix_url.py <listname> mm_cfg.py ############################################### # Here's where we get the distributed defaults. from Defaults import * ################################################## # Put YOUR site-specific settings below this line. #DEFAULT_URL_PATTERN = 'http://%s/mailman/' #PUBLIC_ARCHIVE_URL = '/pipermail' #PUBLIC_ARCHIVE_URL = 'http://% (hostman)s/pipermail/%(listman)s' #DEFAULT_EMAILHOST = 'draguncomputers.com' VIRTUAL_HOSTS.clear add_virtualhost('www.draguncomputers.com, draguncomputers.com') add_virtualhost('www.askchip.com, askchip.com') Log outputs: drwxrwsr-x 2 mailman mailman 4096 Jun 17 21:24 ./ drwxrwsr-x 21 mailman mailman 4096 Jun 17 20:49 ../ -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 admin* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 admindb* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 confirm* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 create* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 edithtml* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 listinfo* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 options* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 private* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 rmlist* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 roster* -rwsr-sr-x 1 mailman mailman 21631 Jun 17 21:24 subscribe* root@vps-1157094-21235 [/usr/local/cpanel/3rdparty/mailman]# mailman error_log: [Wed Jun 18 09:16:03 2014] [error] [client 173.245.xxx.xxx] Premature end of script headers: admindb, referer: http://216.224.171.137/mailman/admindb/mailman [Wed Jun 18 09:16:04 2014] [error] [client 173.245.xxx.xxx] suexec policy violation: see suexec log for more details, referer: http://draguncomputers.com/mailman/admindb/mailman [Wed Jun 18 09:16:04 2014] [error] [client 173.245.xxx.xxx] Premature end of script headers: admindb, referer: http://draguncomputers.com/mailman/admindb/mailman Apache: Jun 17 21:47:39 2014 admin(10560): @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ admin(10560): [----- Mailman Version: 2.1.18-1 -----] admin(10560): [----- Traceback ------] admin(10560): Traceback (most recent call last): admin(10560): File "/usr/local/cpanel/3rdparty/mailman/scripts/driver", line 117, in run_main admin(10560): main() admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 230, in main admin(10560): show_results(mlist, doc, category, subcat, cgidata) admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 452, in show_results admin(10560): otherlinks.AddItem(Link(mlist.GetBaseArchiveURL(), admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/Archiver.py", line 147, in GetBaseArchiveURL admin(10560): 'hostname': hostname admin(10560): ValueError: unsupported format character '(' (0x28) at index 9 admin(10560): [----- Python Information -----] admin(10560): sys.version = 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] admin(10560): sys.executable = /usr/local/cpanel/3rdparty/bin/python admin(10560): sys.prefix = /usr admin(10560): sys.exec_prefix = /usr admin(10560): sys.path = ['/usr/local/cpanel/3rdparty/mailman/pythonlib', '/usr/local/cpanel/3rdparty/mailman', '/usr/local/cpanel/3rdparty/mailman/scripts', '/usr/local/cpanel/3rdparty/mailman', '/usr/lib64/python26.zip', '/usr/lib64/python2.6/', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages'] admin(10560): sys.platform = linux2 admin(10560): [----- Environment Variables -----] admin(10560): HTTP_REFERER: http://216.224.171.137/mailman/admin/mailman admin(10560): SERVER_SOFTWARE: Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 admin(10560): SCRIPT_NAME: /mailman/admin admin(10560): SERVER_SIGNATURE: <address>Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at 216.224.171.137 Port 80</address> admin(10560): admin(10560): REQUEST_METHOD: POST admin(10560): PATH_INFO: /mailman admin(10560): SERVER_PROTOCOL: HTTP/1.1 admin(10560): QUERY_STRING: admin(10560): CONTENT_LENGTH: 38 admin(10560): HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 admin(10560): HTTP_CONNECTION: keep-alive admin(10560): HTTP_COOKIE: admin(10560): SERVER_NAME: 216.224.Jun 17 21:47:39 2014 admin(10560): @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ admin(10560): [----- Mailman Version: 2.1.18-1 -----] admin(10560): [----- Traceback ------] admin(10560): Traceback (most recent call last): admin(10560): File "/usr/local/cpanel/3rdparty/mailman/scripts/driver", line 117, in run_main admin(10560): main() admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 230, in main admin(10560): show_results(mlist, doc, category, subcat, cgidata) admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 452, in show_results admin(10560): otherlinks.AddItem(Link(mlist.GetBaseArchiveURL(), admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/Archiver.py", line 147, in GetBaseArchiveURL admin(10560): 'hostname': hostname admin(10560): ValueError: unsupported format character '(' (0x28) at index 9 admin(10560): [----- Python Information -----] admin(10560): sys.version = 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] admin(10560): sys.executable = /usr/local/cpanel/3rdparty/bin/python admin(10560): sys.prefix = /usr admin(10560): sys.exec_prefix = /usr admin(10560): sys.path = ['/usr/local/cpanel/3rdparty/mailman/pythonlib', '/usr/local/cpanel/3rdparty/mailman', '/usr/local/cpanel/3rdparty/mailman/scripts', '/usr/local/cpanel/3rdparty/mailman', '/usr/lib64/python26.zip', '/usr/lib64/python2.6/', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages'] admin(10560): sys.platform = linux2 admin(10560): [----- Environment Variables -----] admin(10560): HTTP_REFERER: http://216.224.171.137/mailman/admin/mailman admin(10560): SERVER_SOFTWARE: Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 admin(10560): SCRIPT_NAME: /mailman/admin admin(10560): SERVER_SIGNATURE: <address>Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at 216.224.xxx.xxx Port 80</address> admin(10560): admin(10560): REQUEST_METHOD: POST admin(10560): PATH_INFO: /mailman admin(10560): SERVER_PROTOCOL: HTTP/1.1 admin(10560): QUERY_STRING: admin(10560): CONTENT_LENGTH: 38 admin(10560): HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 admin(10560): HTTP_CONNECTION: keep-alive admin(10560): HTTP_COOKIE: admin(10560): SERVER_NAME: 216.224.xxx.xxx admin(10560): REMOTE_ADDR: 66.55.xxx.xxx admin(10560): SERVER_PORT: 80 admin(10560): SERVER_ADDR: 216.224.xxx.xxx admin(10560): DOCUMENT_ROOT: /usr/local/apache/htdocs admin(10560): PYTHONPATH: /usr/local/cpanel/3rdparty/mailman admin(10560): SCRIPT_FILENAME: /usr/local/cpanel/3rdparty/mailman/cgi-bin/admin admin(10560): SERVER_ADMIN: john@dragunsigns.com admin(10560): HTTP_HOST: 216.224.xxx.xxx admin(10560): REQUEST_URI: /mailman/admin/mailman admin(10560): HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 admin(10560): GATEWAY_INTERFACE: CGI/1.1 admin(10560): REMOTE_PORT: 8643 admin(10560): HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5 admin(10560): CONTENT_TYPE: application/x-www-form-urlencoded admin(10560): HTTP_ACCEPT_ENCODING: gzip, deflate admin(10560): REMOTE_ADDR: 66.55.150.181 admin(10560): SERVER_PORT: 80 admin(10560): SERVER_ADDR: 216.224.171.137 admin(10560): DOCUMENT_ROOT: /usr/local/apache/htdocs admin(10560): PYTHONPATH: /usr/local/cpanel/3rdparty/mailman admin(10560): SCRIPT_FILENAME: /usr/local/cpanel/3rdparty/mailman/cgi-bin/admin admin(10560): SERVER_ADMIN: john@dragunsigns.com admin(10560): HTTP_HOST: 216.224.171.137 admin(10560): REQUEST_URI: /mailman/admin/mailman admin(10560): HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 admin(10560): GATEWAY_INTERFACE: CGI/1.1 admin(10560): REMOTE_PORT: 8643 admin(10560): HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5 admin(10560): CONTENT_TYPE: application/x-www-form-urlencoded admin(10560): HTTP_ACCEPT_ENCODING: gzip, deflate I had a hell of a time with permissions etc just to get ANY page to come up without a 403 or 500 error. Thanks for looking. John

On 06/18/2014 06:34 AM, John Dragun wrote:
I have been running mailman on a Freebsd server for about 10 years. I am now migrating to a bigger server running Centos. The problems I have been having I have been able to work through with all the help posted in these lists and forums, but I am at a point where I am stuck. If i connect via my ip address: 216.xxx.xxx.xxx/mailman/listinfo, I get in, I see no lists even though I made a mailman list as public,
See the FAQ at <http://wiki.list.org/x/lYA9>.
I can the got to the admin page, still do not see the list, but I can go to 216.xxx.xxx.xxx/mailman/admin/mailman and log in. Once there if I go to post a message in the waiting for moderator, when I hit the save changes button, the url reverts to http://draguncomputers/mailman/admin/mailman and I get a 500 error. I have virtual hosts, and only one uses the list.
If you want the url to be 216.xxx.xxx.xxx/mailman/admin/mailman run Mailman's bin/withlist -l -r fix_url -u 216.xxx.xxx.xxx It shouldn't be necessary to post Defaults.py as you should never change it. All changes should be made by overrides in mm_cfg.py. See the FAQ at <http://wiki.list.org/x/fIA9>.
mm_cfg.py ############################################### # Here's where we get the distributed defaults.
from Defaults import *
################################################## # Put YOUR site-specific settings below this line. #DEFAULT_URL_PATTERN = 'http://%s/mailman/' #PUBLIC_ARCHIVE_URL = '/pipermail' #PUBLIC_ARCHIVE_URL = 'http://% (hostman)s/pipermail/%(listman)s'
If this was uncommented at Jun 17 21:47:39 2014, it explains the error log entry below. It should be PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/pipermail/%(listname)s' This should be the Default value that's in Defaults.py. The space between '%' and '(' will cause the "ValueError: unsupported format character '(' (0x28) at index 9" exception. and the misspelled names will also cause problems
#DEFAULT_EMAILHOST = 'draguncomputers.com'
VIRTUAL_HOSTS.clear add_virtualhost('www.draguncomputers.com, draguncomputers.com') add_virtualhost('www.askchip.com, askchip.com')
You may or may not want the above. You probably want add_virtualhost('216.xxx.xxx.xxx', 'whatever.the.email.host.is')
mailman
Actually, this one is Apache.
error_log: [Wed Jun 18 09:16:03 2014] [error] [client 173.245.xxx.xxx] Premature end of script headers: admindb, referer: http://216.224.171.137/mailman/admindb/mailman [Wed Jun 18 09:16:04 2014] [error] [client 173.245.xxx.xxx] suexec policy violation: see suexec log for more details, referer: http://draguncomputers.com/mailman/admindb/mailman [Wed Jun 18 09:16:04 2014] [error] [client 173.245.xxx.xxx] Premature end of script headers: admindb, referer: http://draguncomputers.com/mailman/admindb/mailman
Are there any Mailman error log entries corresponding to the above?
Apache:
And this is Mailman's error log and the errors herein are explained by the invalid PUBLIC_ARCHIVE_URL = 'http://% (hostman)s/pipermail/%(listman)s'
Jun 17 21:47:39 2014 admin(10560): @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ admin(10560): [----- Mailman Version: 2.1.18-1 -----] admin(10560): [----- Traceback ------] admin(10560): Traceback (most recent call last): admin(10560): File "/usr/local/cpanel/3rdparty/mailman/scripts/driver", line 117, in run_main admin(10560): main() admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 230, in main admin(10560): show_results(mlist, doc, category, subcat, cgidata) admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 452, in show_results admin(10560): otherlinks.AddItem(Link(mlist.GetBaseArchiveURL(), admin(10560): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/Archiver.py", line 147, in GetBaseArchiveURL admin(10560): 'hostname': hostname admin(10560): ValueError: unsupported format character '(' (0x28) at index 9
Python info and second occurrence of same error snipped.
I had a hell of a time with permissions etc just to get ANY page to come up without a 403 or 500 error.
And are those and your Apache errors resolved now? -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
John Dragun
-
Mark Sapiro