You are not logged in.

#1 2013-06-24 14:26:45

Watnuss
Member
Registered: 2013-03-04
Posts: 27

Mailman installation (Postfix, apache) - No web access

Hi,

I tried to install mailman using the ArchWiki entry. I perform all the tasks and still I cannot access mailman using the webinterface. I guess it is a missconfigured apache but I don't really know why.
Is the configuration of mailman as stated by the archwiki (see https://wiki.archlinux.org/index.php/Mailman#Apache) compatible to apache using virtual-hosts?

To describe my error: If I try to access mailman using the web interface, I get errors.
http://lists.mydomain.net/listinfo/mailman --> 404
https://lists.mydomain.net/admin/mailman --> 404
http://mydomain.net/mailman/create --> will be displayed, but If I want to create the new list I get error 403

I did all the troubleshooting mentioned in the wiki. As already said I guess it is an apache configuration error, but I don't have a clue why. Can you give me some hints on how to solve the issue / where I can look into? journalctl and systemctl don't give any meaningful outputs.

I would be really glad hearing from any of you. It would be a great help.

Thanks

Watnuss

Last edited by Watnuss (2013-06-24 14:36:54)

Offline

#2 2013-06-25 01:42:55

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: Mailman installation (Postfix, apache) - No web access

Watnuss wrote:

To describe my error: If I try to access mailman using the web interface, I get errors.
http://lists.mydomain.net/listinfo/mailman --> 404
https://lists.mydomain.net/admin/mailman --> 404
http://mydomain.net/mailman/create --> will be displayed, but If I want to create the new list I get error 403

Note the Alias definitions from the Wiki:

<IfModule alias_module>
    Alias /mailman-icons/ "/usr/lib/mailman/icons/"
    Alias /archives/ "/var/lib/mailman/archives/public/"
    ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"
</IfModule>

There is no /listinfo or /admin alias defined.
As a first step invert your URLs to:

[url]http://lists.mydomain.net/mailman/listinfo[/url]
[url]http://lists.mydomain.net/mailman/admin[/url]

And this also matches the "standard" (where standard == the way I've been doing it) config.


Be Appropriate && Follow Your Curiosity

Offline

#3 2013-06-25 07:46:44

Watnuss
Member
Registered: 2013-03-04
Posts: 27

Re: Mailman installation (Postfix, apache) - No web access

Thanks for your answer MichaelRpdx. Indeed appending /mailman/ to my domain will solve the issue of not getting to the correct management interface. Sadly almost all links on the interfaces are broken, as they as well are missing the /mailman/ suffix to the domain.
(e.g. http://lists.mydomain.net/listinfo/mailman is the URI to the mailman mailing list. The correct URI would be http://lists.mydomain.net/mailman/listinfo/mailman)
If I want to create a new list or subscribe to a list the formular is send to http://lists.mydomain.net/subscribe or http://lists.mydomain.net/create, which are both also not correct.
(I was using the broken links, because they were send to me via email after adding ownership to the mailman mailinglist)

So there is something wrong with the configuration of mailman. Why is there the lists subdomain at all? I can access the resources without the subdomain.
e.g. the mailman mailinglist can be accessed using http://mydomain.net/mailman/listinfo/mailman

What have I done wrong here?

Best regards and thanks four your help,

Watnuss

Offline

#4 2013-06-25 13:38:15

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: Mailman installation (Postfix, apache) - No web access

Given the instructions on the page I don't know what, if anything, you've done wrong.  Fortunately I have a fresh test box that was just brought up.  I can install Mailman and Apache via the instructions and see what's going on.  I've also been running Mailman lists for years, so I've got some history and a working installation on another server to compare to.

Let you know tonight, Pacific time zone version.


Be Appropriate && Follow Your Curiosity

Offline

#5 2013-06-25 13:45:12

Watnuss
Member
Registered: 2013-03-04
Posts: 27

Re: Mailman installation (Postfix, apache) - No web access

Thanks MichaelRpdx. I appreciate your efforts.

Edit:
I played a bit and added these aliases to my httpd.conf

<IfModule alias_module>
    Alias /mailman-icons/ "/usr/lib/mailman/icons/"
    Alias /archives/ "/var/lib/mailman/archives/public/"
    ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"
    ScriptAlias /admin "/usr/lib/mailman/cgi-bin/admin"
    ScriptAlias /admindb "/usr/lib/mailman/cgi-bin/admindb"
    ScriptAlias /confirm "/usr/lib/mailman/cgi-bin/confirm"
    ScriptAlias /create "/usr/lib/mailman/cgi-bin/create"
    ScriptAlias /edithtml "/usr/lib/mailman/cgi-bin/edithtml"
    ScriptAlias /listinfo "/usr/lib/mailman/cgi-bin/listinfo"
    ScriptAlias /options "/usr/lib/mailman/cgi-bin/options"
    ScriptAlias /private "/usr/lib/mailman/cgi-bin/private"
    ScriptAlias /rmlist "/usr/lib/mailman/cgi-bin/rmlist"
    ScriptAlias /roster "/usr/lib/mailman/cgi-bin/roster"
    ScriptAlias /subscribe "/usr/lib/mailman/cgi-bin/subscribe"
</IfModule>
 ...

Now the links are working. I am not 100% satisfied with this solution. The most convenient way would be to have http://lists.mydomain.net showing what http://lists.mydomain.net/mailman/listinfo would show.
In addition I don't need the subdomain. A call of http://mydomain.net/listinfo will also show the corresponding site.
So the apache config still is not worth being an example in the archwiki...

Last edited by Watnuss (2013-06-25 14:30:07)

Offline

#6 2013-06-26 02:09:53

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: Mailman installation (Postfix, apache) - No web access

Here's my take on it - without delving into the nginx and lighttpd configurations.

First, if it's to set up  lists.domain.org then the entire Apache config example should be part of a vhost.  That will avoid polluting your web space with MM stuff. 

Having said that, and to keep as close as possible to the original, I suggest one change in /etc/mailman/mm_cfg.py:

DEFAULT_URL_PATTERN = 'http://%s/mailman/'

Substitute some string for mailman that will fit with the URL/path naming for your site.  Make the same change in for the ScriptAlias setting in your httpd.conf

Assuming you've not created any lists besides the system mailman you're ready to go   If you did change the mailman to some string then

/usr/lib/mailman/bin/rmlist mailman
/usr/lib/mailman/bin/newlist mailman

or dig into the mailman tree and manually change the settings in the mailman list (not mailman the software) configuration. 

With those changes the web interface for mailman should be working for you.


Be Appropriate && Follow Your Curiosity

Offline

#7 2013-06-26 07:51:53

Watnuss
Member
Registered: 2013-03-04
Posts: 27

Re: Mailman installation (Postfix, apache) - No web access

Hi,

thanks for your reply.

MichaelRpdx wrote:
DEFAULT_URL_PATTERN = 'https://%s/mailman/'

I didn't have the mailman suffix in my config

MichaelRpdx wrote:

Substitute some string for mailman that will fit with the URL/path naming for your site.  Make the same change in for the ScriptAlias setting in your httpd.conf

What do you mean with that? Do you mean substituting something in the mailman config or in the apache config? Appending the mailman suffix in the top solved the issue for me, which makes some sense. I simply had a wrong URL pattern. I have a ssl vhost know. Thats why I also added a 's' to http and the links on the webinterface as well as in the emails are correct now.

I have still an issue. That is, that I cannot write to the mailman list. If I do so I get a dilivery failed response from my webserver which says "unkown user" mailman@mydomain.net.
The system mailman emails will be send to the owner, though.
I have done the alias configuration as stated in https://wiki.archlinux.org/index.php/Mailman#Postfix and call genaliases.
I have a warning in my postfix config, though.

postfix/trivial-rewrite[27051]: warning: do not list domain mydomain.net in BOTH mydestination and virtual_mailbox_domains

But this doesn't seem to be the issue.

Any ideas?

Best regards,

Watnuss

Offline

#8 2013-06-26 13:11:42

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: Mailman installation (Postfix, apache) - No web access

Watnuss wrote:
DEFAULT_URL_PATTERN = 'https://%s/mailman/'

I didn't have the mailman suffix in my config

MichaelRpdx wrote:

Substitute some string for mailman that will fit with the URL/path naming for your site.  Make the same change in for the ScriptAlias setting in your httpd.conf

What do you mean with that? Do you mean substituting something in the mailman config or in the apache config? Appending the mailman suffix in the top solved the issue for me, which makes some sense. I simply had a wrong URL pattern. I have a ssl vhost now. Thats why I also added a 's' to http and the links on the webinterface as well as in the emails are correct now.

(I'll reply to the email config issues seperately.)

(by the way, I've updated the Mailman page in the Arch wiki to correct the instructions for Apache integration based on your problem.)

The original issue you had - with the link to the list itself not working - was due to configurations in mm_cfg.py and httpd.conf not being syncronized.

The mm_cfg.py DEFAULT_URL_PATTERN needs to have a mirroring ScriptAlias in the httpd.conf or vhost.conf. The lighttpd and nginx accomplish this through a redirect of all traffic to the base of the ULR  ( anyhost.example.org/ ) to the Mailman script.  In the context of a special lists host, ( lists.example.org/ ) this kinda makes some sense, though I disagree with it.   In order to fix the Apache example without breaking the other two, and to provide the most straightforward fix to your original issue (before adding all those aliases) I determined changing the DEFAULT_URL_PATTERN and creating a corresponding ScriptAlias Apache config entry would work.

So assuming you want all of your email lists to be accessed at ''http://www.yourdomain.org/lists/''


mm_cfg.py

DEFAULT_URL_PATTERN = 'http://%s/lists/'

httpd.conf (or vhost.conf section for the web address of interest)

<IfModule alias_module>
    Alias /mailman-icons/ "/usr/lib/mailman/icons/"
    Alias /archives/ "/var/lib/mailman/archives/public/"
    ScriptAlias /lists/ "/usr/lib/mailman/cgi-bin/"
</IfModule>

(extra stuff included for context)

Note: you can change lists to whatever makes sense in the naming scheme used in your web environment. (This is what my "some string" meant in previous entry.)

The admin, listinfo, create, options, private ... aliases you created are all arguments to the mailman CGI scripts.  The config described here will coordinate Apache and Mailman so you don't need to do that.


BTW I recommend setting up vhosts for your Apache installation,


Be Appropriate && Follow Your Curiosity

Offline

#9 2013-06-26 13:22:27

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: Mailman installation (Postfix, apache) - No web access

Watnuss wrote:

I have still an issue. That is, that I cannot write to the mailman list. If I do so I get a dilivery failed response from my webserver which says "unkown user" mailman@mydomain.net.
The system mailman emails will be send to the owner, though.
I have done the alias configuration as stated in https://wiki.archlinux.org/index.php/Mailman#Postfix and call genaliases.
I have a warning in my postfix config, though.

postfix/trivial-rewrite[27051]: warning: do not list domain mydomain.net in BOTH mydestination and virtual_mailbox_domains

But this doesn't seem to be the issue.

In Postfix's main.cf you have a defintion of mydestination with one or more domains.  One of them is repeated in the  virtual_mailbox_domains config you created following the example page.  Please post the relevant bits from your config files if this doesn't make sense or you'd like further help.


Be Appropriate && Follow Your Curiosity

Offline

#10 2013-06-26 13:41:49

Watnuss
Member
Registered: 2013-03-04
Posts: 27

Re: Mailman installation (Postfix, apache) - No web access

Hi,

tanks for your reply again.

I did delete the doubled domain. I still cannot send emails to the list.

postfix/virtual[1114]: 7936F140610: to=<mailman@mydomain.net>, relay=virtual, delay=0.1, delays=0.07/0.02/0/0.02, dsn=5.1.1, status=bounced (unknown user: "mailman@mydomain.net")

The relevant parts of my /etc/postfix/main.cf looks the following:

virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf, hash:/var/lib/mailman/data/virtual-mailman
alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases

If it helps - my complete main.cf: http://pastebin.com/QrhNpsbA

Can you see what the issue might be?

Offline

#11 2013-06-26 13:51:07

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: Mailman installation (Postfix, apache) - No web access

You really have registered mydomain.net? Or are we living in a virtual server farm with custom DNS?

Looks like you didn't run /usr/lib/mailman/bin/genaliases after getting the other things set up.


Be Appropriate && Follow Your Curiosity

Offline

#12 2013-06-26 14:03:57

Watnuss
Member
Registered: 2013-03-04
Posts: 27

Re: Mailman installation (Postfix, apache) - No web access

For privacy's sake I replaced it ; )
I checked the files genaliases generates and to me it looks correct:

/var/lib/mailman/data/aliases:

# This file is generated by Mailman, and is kept in sync with the
# binary hash file aliases.db.  YOU SHOULD NOT MANUALLY EDIT THIS FILE
# unless you know what you're doing, and can keep the two files properly
# in sync.  If you screw it up, you're on your own.

# The ultimate loop stopper address
mailman-loop: /var/lib/mailman/data/owner-bounces.mbox

# STANZA START: mailman
# CREATED: Wed Jun 26 16:00:33 2013
mailman:             "|/usr/lib/mailman/mail/mailman post mailman"
mailman-admin:       "|/usr/lib/mailman/mail/mailman admin mailman"
mailman-bounces:     "|/usr/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:     "|/usr/lib/mailman/mail/mailman confirm mailman"
mailman-join:        "|/usr/lib/mailman/mail/mailman join mailman"
mailman-leave:       "|/usr/lib/mailman/mail/mailman leave mailman"
mailman-owner:       "|/usr/lib/mailman/mail/mailman owner mailman"
mailman-request:     "|/usr/lib/mailman/mail/mailman request mailman"
mailman-subscribe:   "|/usr/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe mailman"
# STANZA END: mailman

/var/lib/mailman/data/virtual-mailman

# This file is generated by Mailman, and is kept in sync with the binary hash
# file virtual-mailman.db.  YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you
# know what you're doing, and can keep the two files properly in sync.  If you
# screw it up, you're on your own.
#
# Note that you should already have this virtual domain set up properly in
# your Postfix installation.  See README.POSTFIX for details.

# LOOP ADDRESSES START
mailman-loop@mydomain.net mailman-loop
# LOOP ADDRESSES END

# STANZA START: mailman
# CREATED: Wed Jun 26 16:00:33 2013
mailman@mydomain.net              mailman
mailman-admin@mydomain.net        mailman-admin
mailman-bounces@mydomain.net      mailman-bounces
mailman-confirm@mydomain.net      mailman-confirm
mailman-join@mydomain.net         mailman-join
mailman-leave@mydomain.net        mailman-leave
mailman-owner@mydomain.net        mailman-owner
mailman-request@mydomain.net      mailman-request
mailman-subscribe@mydomain.net    mailman-subscribe
mailman-unsubscribe@mydomain.net  mailman-unsubscribe
# STANZA END: mailman

I will try a reboot now. Sometimes it helps even on Linux...
Edit: Nope. Not in this case.

Last edited by Watnuss (2013-06-26 14:09:49)

Offline

Board footer

Powered by FluxBB