Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-2006, 03:43 PM
Intermediate Member
 
Posts: 19
Smile [SOLVED] Zimbra+Mailman Howto

This How-To will explain how to get mailman mailing list working with Zimbra. I have tried this on a Fedora Core 4. You may need to adjust certain things for other OSes.

Requirements:
This ONLY works if Zimbra's postfix is able to deliver mail locally. One thing you should note is ALL the domains added to Zimbra are by default 'virtual_mailbox_domains', so if your hostname is set to be one of the virtual mailbox domains, Mailman will NOT work for you.
Zimbra's default install sets following in /opt/zimbra/postfix/conf/main.cf
Code:
$mydestination = localhost localhost.localdomain
You may need to change it to get the local delivery working.
I shall leave it to you to figure out how to achieve that. The variations in this regard are so many that covering all possiblities is impossible and I'm not a 'Postfix Expert' by a long shot.

Limitations:
List names must be unique across all virtual domains. For example, you can not have funlist@domain1.com and funlist@domain2.com.


OK so lets get going.

First download the latest mailman sources. You can find them here.

I followed instruction on mailman documentation page.

Now, ungzip-tar, configure and install. We are going to install mailman under default location, /usr/local/mailman, user mailman and group mailman.

Code:
# As root
groupadd mailman
useradd -c''GNU Mailman'' -s /sbin/nologin -d /no/home -g mailman mailman
cd /usr/local
mkdir mailman
chgrp mailman mailman
chmod a+rx,g+ws mailman
If you want to use Zimbra's httpd running on port 7780, you need the –with-cgi-gid option. If you have another web server running, use the group id of that web server here.
Code:
# As normal user
tar xvfz mailman-2.1.7.tgz
cd mailman-2.1.7
./configure –with-cgi-gid=zimbra
Now compile and install.
Code:
# As root
make install
# following is required only if you are using Zimbra's httpd
cd /usr/local/mailman/archives
chown zimbra private
chmod o-x private
# Check your installation
/usr/local/mailman/bin/check_perms -f
Now setup the web server. Add following lines at the end of /opt/zimbra/conf/httpd.conf

Code:
#
#  httpd configuration settings for use with mailman.
#

ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
<Directory /usr/local/mailman/cgi-bin/>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

Alias /pipermail/ /usr/local/mailman/archives/public/
<Directory /usr/local/mailman/archives/public>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    # Only if you have internationalized archives
    AddDefaultCharset Off
</Directory>

# Uncomment the following line, replacing www.example.com with your server's
# name, to redirect queries to /mailman to the listinfo page (recommended).
# RedirectMatch ^/mailman[/]*$ http://www.example.com/mailman/listinfo
Now copy mailman icons and then restart apache.
Code:
# As User 'zimbra'
cd /opt/zimbra/httpd/htdocs
mkdir mmimages
cp /usr/local/mailman/icons/* mmimages/
zmapachectl stop
zmapachectl start
Now change postfix configuration.
Add/Modify /opt/zimbra/postfix/conf/main.cf so that following varibles are set as shown.
Code:
virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/mailman/data/virtual-mailman
alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases
Add following lines at the end of /usr/local/mailman/Mailman/mm_cfg.py file.
Code:
MTA = 'Postfix'
POSTFIX_ALIAS_CMD = '/opt/zimbra/postfix/sbin/postalias'
POSTFIX_MAP_CMD = '/opt/zimbra/postfix/sbin/postmap'
IMAGE_LOGOS = '/mmimages/'
DEFAULT_URL_PATTERN = 'http://%s:7780/mailman/'
POSTFIX_STYLE_VIRTUAL_DOMAINS = [ 'virtual-domain1.com', 'virtual-domain2.com' ]
In the last variable, you need to list all your virtual mailbox domains for which you want to add mailing lists. Remember you should ONLY list your virtual domains here, not your local domain for which postfix delivers mail locally.

Now add your first list on virtual domain.
Code:
# As root
# first add a sitewide list called mailman, this is mandatory
cd /usr/local/mailman
bin/newlist mailman 
bin/config_list -i data/sitelist.cfg mailman

bin/newlist --emailhost=virtual-domain1.com --urlhost=<your zimbra host> <listname> <admin-email-address> <admin-password>

# This is just to make sure that aliases and virtual-mailman files get generated. Until you add a virtual-domain based list, virtual-mailman won't be generated.

/usr/local/mailman/bin/genaliases
# aliases and virtual-mailman must be owned by mailman.

chown mailman:mailman /usr/local/mailman/data/aliases*
chown mailman:mailman /usr/local/mailman/data/virtual-mailman*

# setup mailman cron
cd /usr/local/mailman/cron
crontab -u mailman crontab.in

# setup daemon
cp /usr/local/mailman/scripts/mailman /etc/init.d
chkconfig --add mailman
Now your should be able to visit http://<zimbra host>:7780/mailman/listinfo and browse/create new lists etc. And of course you can always use mailman's command line utilities for list maintainance.

Hope this helps.
Reply With Quote
  #2 (permalink)  
Old 06-23-2006, 12:27 AM
Junior Member
 
Posts: 6
Default CGI error

Thank you so much for the step by step instructions.

I have faced 2 problems with my installation

1) When I add a mailing list on the command line, I get
"Hit Enter to notify the mailing list administrator"

However on checking the email of the mailing list owner, no email is received. I have tried this with an external email as well as email which is hosted on the server too.

2) On accessing http://myhostname.mydomainname.com:7780/mailman/listinfo

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 "zimbra". Try tweaking the web server to run the
script as group "nobody", or re-run configure,
providing the command line option `--with-cgi-gid=zimbra'.


Can you help me out with this?
Reply With Quote
  #3 (permalink)  
Old 10-09-2006, 08:14 AM
Starter Member
 
Posts: 2
Default

My problem is with
virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/mailman/data/virtual-mailman
alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases

i change with zmlocalconfig but zimbra don't take new alias, so it is impossibile to post on the mailman list... how can I do to check if zimbra create the list alias?
Reply With Quote
  #4 (permalink)  
Old 10-09-2006, 08:16 AM
Zimbra Consultant & Moderator
 
Posts: 20,312
Default

Quote:
Originally Posted by ios77
My problem is with
virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/mailman/data/virtual-mailman
alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases

i change with zmlocalconfig but zimbra don't take new alias, so it is impossibile to post on the mailman list... how can I do to check if zimbra create the list alias?
Please don't post the same message in multiple threads, it gets confusing trying to follow what's happened. In future start a new thread or just tag it onto one that's on-subject.
__________________
Regards


Bill

Last edited by phoenix; 10-20-2008 at 07:08 AM..
Reply With Quote
  #5 (permalink)  
Old 11-03-2006, 05:14 AM
Loyal Member
 
Posts: 88
Default

Thanks for this. I've got a bit of tweaking to do, but the procedure worked great.

On RHEL, I needed to install the python-devel package along with gcc (without python-devel I got an error about a korean module not existing).
Reply With Quote
  #6 (permalink)  
Old 11-03-2006, 05:37 AM
Elite Member & Volunteer
 
Posts: 255
Default

RHEL has an RPM for mailman, then you don't need to install a compiler.
Reply With Quote
  #7 (permalink)  
Old 11-03-2006, 05:55 AM
Loyal Member
 
Posts: 88
Default

I didn't try that.

I considered it but thought it wouldn't have the --with-cgi-gid setting correct for Zimbra and getting it right might be more hassle than it was worth.
Reply With Quote
  #8 (permalink)  
Old 11-06-2006, 12:06 PM
Elite Member & Volunteer
 
Posts: 255
Default

I'm using it and I didn't have a single problem.
Reply With Quote
  #9 (permalink)  
Old 11-15-2006, 10:56 AM
Intermediate Member
 
Posts: 16
Default

Quote:
Originally Posted by rsharpe
I'm using it and I didn't have a single problem.
Can you elaborate on your setup? I'm trying to integrate the mailman rpm with Zimbra and I can't get list creation to work correctly...I keep getting a permissions error in the httpd log (using the non-Zimbra httpd) when it tries to run /opt/zimbra/postfix/sbin/postalias. Any pointers would be appreciated...

-chris
Reply With Quote
  #10 (permalink)  
Old 02-20-2007, 05:00 AM
Active Member
 
Posts: 46
Default

Quote:
Originally Posted by Chris_H View Post
Can you elaborate on your setup? I'm trying to integrate the mailman rpm with Zimbra and I can't get list creation to work correctly...I keep getting a permissions error in the httpd log (using the non-Zimbra httpd) when it tries to run /opt/zimbra/postfix/sbin/postalias. Any pointers would be appreciated...

-chris
After restarting of zimbra or postfix service , After restart /opt/zimbra/postfix/conf/main.cf
gets appended ...

vi /opt/zimbra/postfix/conf/main.cf

add this at the bottom

$mydestination = localhost localhost.localdomain


please add few parameter as given below in the line ( virtual_alias_maps , alias_maps )

virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/mailman/data/virtual-mailman

alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases
Attached Files
File Type: txt mailman_Doc.txt (7.0 KB, 725 views)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.