Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: G2LOQ on April 17, 2011, 04:33:04 pm
-
Hi,
I've finally successfully installed Mailman on my Zentyal box. As requirement you must have a sub-domain dedicated to yours mailing lists (ex: lists.domain.com). Edit: This sub-domain can not must be referred as a Virtual domain aliase in the Zential web administration (if not, you'll see Relay access denied in mail log).
This has been tested on a system without Zarafa installed. If you do have Zarafa installed further tests must be done.
There're quite a lots of files to modify. So let's go step-by-step...
First of all, install mailman package:
$ sudo aptitude install mailman
Create the required mailman list:
$ newlist mailman
Check your mailman installation (check permission file) :
$ cd /usr/lib/mailman
$ sudo bin/check_perms
if there are errors, type :
$ sudo bin/check_perms –f
Create the file /etc/apache2/conf.d/mailman-apache.conf
#------------------------------------------------------------
# mailman
#------------------------------------------------------------
# We can find mailman here
ScriptAlias /cgi-bin/mailman /usr/lib/cgi-bin/mailman
# And the public archives:
Alias /pipermail/ /var/lib/mailman/archives/public/
Alias /mailman/public /var/lib/mailman/archives/public
# Logos:
Alias /images/mailman/ /usr/share/images/mailman/
# Redirect to mailman start page
RedirectMatch ^/mailman[/]*$ /cgi-bin/mailman/listinfo
<Directory /usr/lib/cgi-bin/mailman>
Options ExecCGI
AllowOverride None
order deny,allow
deny from all
allow from all
</Directory>
<Directory /var/lib/mailman/archives/public>
Options Indexes Includes FollowSymLinks
order deny,allow
deny from all
allow from all
</Directory>
<Directory /usr/share/images/mailman/>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Next, modify mailman configuration. Here are the relevant parameters:
/etc/mailman/mm_cfg.py
DEFAULT_EMAIL_HOST = 'lists.domain.com'
DEFAULT_URL_HOST = 'lists.domain.com'
[...]
MTA='Postfix'
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.domain.com']
Postfix must now be informed that we're going to use mailman. We have to modify the stubs files of Zential:
/usr/share/ebox/stubs/mail/main.cf.mas
[...]
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
[...]
virtual_alias_maps = ldap:valiases, hash:/var/lib/mailman/data/virtual-mailman
[...]
# Mailman
owner_request_special = no
mailman_destination_recipient_limit = 1
transport_maps = hash:/etc/postfix/transport
And:
/usr/share/ebox/stubs/mail/transport.mas
[...]
lists.domain.com mailman:
Force the templates to be redeployed by restarting the Mail on the Zential dashboard.
You can now create your own mailing list via the web interface (http://.../mailman) or with the command line newlist.
Feedbacks are welcome!!! ;)
-
Hi,
Many thanks for your howto! I've added "Mailing lists" to the new modules wishlist (http://trac.zentyal.org/wiki/Document/Development/Wishlist/Module/New#Mailinglists) referencing it.
Regards,
Jaime.
-
That's would be great to have it as module !!!
To finish this howto here are some troubleshooting tips:
If something goes wrong, check your logs: ;)
$ tail -f /var/log/mail.info
Send a test email to your mailing list: mailman-request@lists.domain.com with the subject "help".
1) [...]Recipient address rejected: User unknown in virtual mailbox table[...]
Check that Postfix is searching in the good aliases map:
$ postmap -q "mailman-request@lists.domain.com" hash:/var/lib/mailman/data/virtual-mailman
Should return
$ mailman-request
If not, check alias_maps, alias_database, virtual_alias_maps in /etc/postfix/main.cf, and do:
$ cd /var/lib/mailman/
$ sudo bin/genaliases
2) The email is not received in the user mailbox.
Check which transport Postfix used to dispatch your email. You should find in your logs:
[...]to=<...@lists.domain.com>, relay=mailman[...]
If you find:
[...]to=<...@lists.domain.com>, relay=dovecot[...]
Check /etc/postfix/transport. You must have a line lists.domain.com mailman:.
And do:
$ sudo postmap /etc/postfix/transport
This point explains why you need a sub-domain to run mailman. Postfix will use different relays function of the domain. Zarafa uses /etc/postfix/transport as well. I haven't test this configuration...
Hope that it can help you.
Enjoy Mailman!!!
-
I'm using mailman too and did more or less what you did 8)
The issue I'm facing is that each and every update modifying "mail" will potentially modify main.cf .mas and kill your mailman service.
Because of this, I've removed automatic update... :(
This aside, it works pretty well ;)
What I would like is to have mailman part of standard Zentyal modules.
-
You can also use hooks (http://doc.zentyal.org/en/develop.html#service-advanced-customisation) to modify Zentyal files, hooks are not overrided or deleted on upgrades :)
-
Sure, hook fits here but can be quite complex depending on what you want to introduce in conf files.
That's the reason why I would be much happier with Mailman natively handled (if I can say so) as Zentyal component.
When I write "Mailman", I mean mailing list feature. Mailman is the one I use but some others exist.
-
I've followed through the HOWTO and it works great if I email listname@lists.domain.com. I'm wondering if it's possible for me to mail listname@domain.com (leaving out the lists hostname).
Thank you for this tutorial!
-Andy
-
Got it! I apt-get purged mailman... then re-installed, following the instructions and removed 'lists' from each domain configuration line so it simply read domain.com... all but the DEFAULT_URL_HOST setting, i kept that the same ... 'lists.domain.com
yes!! :)
-Andy
-
Hi All!
Somebody try install mailman to 3.0?
Oli
-
Yes..But I am receiving Relay Errors. I am also using Zarfara. Any Ideas to help stamp-out the bug, I have followed the above instructions, Mailman works well from the local domain, but it will not work from a message sent from any other domain to it.
-
The below message is received when other domains attempt to access the Mailman Service on my Zentyal 3 w/ Zafara, as I mentioned in the above post.
Your message
To: mailman-request@lists.domain.com
Subject: help
Sent: Wed, 3 Apr 2013 23:29:57 -0400
did not reach the following recipient(s):
mailman-request@lists.domain.com on Wed, 3 Apr 2013 23:29:57 -0400
You do not have permission to send to this recipient. For
assistance, contact your system administrator.
<sbshp.myotherdomain.local #5.7.1 smtp;554 5.7.1
<mailman-request@lists.domain.com>: Relay access denied>
Reporting-MTA: dns; sbshp.myotherdomain.local
Final-Recipient: RFC822; mailman-request@lists.domain.com
Action: failed
Status: 5.7.1
X-Supplementary-Info: <sbshp.myotherdomain.local #5.7.1 smtp;554 5.7.1 <mailman-request@lists.domain.com>: Relay access denied>
X-Display-Name: mailman-request@lists.domain.com
ForwardedMessage.eml
Subject:
help
From:
"Stephen Widmer" <SWidmer@my_other_domain.com>
Date:
4/3/2013 23:29
To:
<mailman-request@lists.domain.com>