Author Topic: [HOWTO] Mailman  (Read 9492 times)

G2LOQ

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +1/-0
    • View Profile
[HOWTO] Mailman
« 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:
Code: [Select]
$ sudo aptitude install mailman
Create the required mailman list:
Code: [Select]
$ newlist mailman
Check your mailman installation (check permission file) :
Code: [Select]
$ cd /usr/lib/mailman
$ sudo bin/check_perms

if there are errors, type :
Code: [Select]
$ sudo bin/check_perms –f
Create the file /etc/apache2/conf.d/mailman-apache.conf
Code: [Select]
#------------------------------------------------------------
# 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
Code: [Select]
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
Code: [Select]
[...]
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
Code: [Select]
[...]
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!!!  ;)
« Last Edit: May 03, 2011, 06:17:15 pm by G2LOQ »

Jaime Soriano

  • Zen Monk
  • **
  • Posts: 55
  • Karma: +1/-0
    • View Profile
Re: [HOWTO] Mailman
« Reply #1 on: April 18, 2011, 01:10:44 pm »
Hi,

Many thanks for your howto! I've added "Mailing lists" to the new modules wishlist referencing it.

Regards,
Jaime.

G2LOQ

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +1/-0
    • View Profile
Re: [HOWTO] Mailman
« Reply #2 on: April 19, 2011, 02:31:27 am »
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:  ;)
Code: [Select]
$ tail -f /var/log/mail.infoSend 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:
Code: [Select]
$ 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:
Code: [Select]
$ 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:
Code: [Select]
$ sudo postmap /etc/postfix/transportThis 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!!!



christian

  • Guest
Re: [HOWTO] Mailman
« Reply #3 on: April 19, 2011, 11:57:25 am »
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.

Jaime Soriano

  • Zen Monk
  • **
  • Posts: 55
  • Karma: +1/-0
    • View Profile
Re: [HOWTO] Mailman
« Reply #4 on: April 19, 2011, 06:11:32 pm »
You can also use hooks to modify Zentyal files, hooks are not overrided or deleted on upgrades :)

christian

  • Guest
Re: [HOWTO] Mailman
« Reply #5 on: April 28, 2011, 11:22:54 am »
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.

andygraybeal

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +4/-0
    • View Profile
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

andygraybeal

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +4/-0
    • View Profile
Re: [HOWTO] Mailman
« Reply #7 on: May 31, 2011, 12:13:23 am »
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

freeoli

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Mailman
« Reply #8 on: February 06, 2013, 12:42:20 pm »
Hi All!

Somebody try install mailman to 3.0?

Oli

swidmer

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Mailman
« Reply #9 on: April 04, 2013, 07:51:17 pm »
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.

swidmer

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Mailman
« Reply #10 on: April 04, 2013, 08:00:44 pm »
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>
« Last Edit: April 04, 2013, 08:03:33 pm by swidmer »