How To: Linking Web To Mailman

Asked by cmnorton

I apologize in advance if this is an obvious question, but does a page already exists or are there examples for having a web site talk to the mailman code? I have looked at the apache examples, and I am doing the following

Listen 8581
<VirtualHost _default_:8581>

ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/

<Directory "/usr/local/mailman/archives/public/">
    AllowOverride None
    Options ExecCGI FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

Alias /pipermail/ /usr/local/mailman/archives/public/

</VirtualHost>

But in having done this for other sites, I know I need a mailman directory under /var/www. But do I roll my own there, or is there a mailman module that be used as a starter page?

I maintain a site written in Perl and understand the concept the Perl code must first write the html to the document, including the javacode. I get that. I am just having trouble with how I link this up on the web.

I wanted to do web first, then email link.

Thanks.
cmn

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Mailman Edit question
Assignee:
No assignee Edit question
Solved by:
cmnorton
Solved:
Last query:
Last reply:
Revision history for this message
Mark Sapiro (msapiro) said :
#1

You do not need a document root or a /var/www/ directory for Mailman. All Mailman's web pages except for public archives are generated by CGIs which are found via the "ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/". The public archives are found via the pipermail alias.

With what you have, if you go to e.g. http://example.com:8581/mailman/listinfo/... This will invoke the CGI wrapper at /usr/local/mailman/cgi-bin/listinfo which will serve the page.

However, to use a port, you need the following in mm_cfg.py

DEFAULT_URL_PATTERN = 'http://%s:8581/mailman/'
PUBLIC_ARCHIVE_URL = 'http://%(hostname)s:8581/pipermail/%(listname)s'

Without that, generated pages will not contain the port in URL links.

Revision history for this message
cmnorton (octopusgrabbus) said :
#2

I am a little confused as to the two lines. This is what I added.

##################################################
# Put YOUR site-specific settings below this line.
DEFAULT_URL_PATTERN = 'http://%s:8581/mailman/'
PUBLIC_ARCHIVE_URL = 'http://%(webapps)s:8581/pipermail/%(listname)s'

Revision history for this message
Mark Sapiro (msapiro) said :
#3

You want the two lines exactly as I gave them. Mailman will interpolate %(hostname)s with the lists web host when it generates the URL.

Revision history for this message
cmnorton (octopusgrabbus) said :
#4

Everything hangs. I have the URLs exactly as you said.

Revision history for this message
Mark Sapiro (msapiro) said :
#5

Please be more specific as to the issue. What are you doing and what is the result?

Revision history for this message
cmnorton (octopusgrabbus) said :
#6

To get everything to hang, I clicked on the link provided.
http://example.com:8581/mailman/listinfo/.

Revision history for this message
Mark Sapiro (msapiro) said :
#7

Link provided where? Where does example.com come from? Is that the actual host you tried to go to? You need to go to your own server.

Revision history for this message
cmnorton (octopusgrabbus) said :
#8

Mea culpa. I'm having a lot of cockpit error.

Here's the latest error. I'll go do what it says.

Mailman CGI error!!!
The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog:

Group mismatch error. Mailman expected the CGI
wrapper script to be executed as group "nobody", but
the system's web server executed the CGI script as
group "apache". Try tweaking the web server to run the
script as group "nobody", or re-run configure,
providing the command line option `--with-cgi-gid=apache'.

Revision history for this message
cmnorton (octopusgrabbus) said :
#9

Got "the page" I owe you one.