Jump to content

Mailman Integration Zimbra 7 At ALPHA

From TetraWiki
Revision as of 13:53, 27 November 2012 by Admin (talk | contribs) (Created page with "'''Mailman Intregration with Zimbra Server for Nation Today (Alpha)''' '''Table of Contents'''[#__RefHeading__39_18063887 NOTE: Before installing Mailman, You will need to h...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mailman Intregration with Zimbra Server for Nation Today (Alpha)


Table of Contents[#__RefHeading__39_18063887 NOTE: Before installing Mailman, You will need to have root privileges to perform the steps in this section. 1]

[#__RefHeading__41_18063887 Update packages:1]

[#__RefHeading__43_18063887 Download MailMan Source Code From:1]

[#__RefHeading__45_18063887 Add the group and user:http:1]

[#__RefHeading__47_18063887 Create the installation directory:1]

[#__RefHeading__49_18063887 Create the installation directory:2]

[#__RefHeading__51_18063887 Install Mailman:2]

[#__RefHeading__53_18063887 Default Installation Path:2]

[#__RefHeading__55_18063887 Set up your web server2]

[#__RefHeading__57_18063887 Changes postfix configuration 3]

[#__RefHeading__59_18063887 Add a sitewide list called mailman (Mandatory)4]

[#__RefHeading__61_18063887 Aliases and virtual-mailman must be owned by mailman.4]

[#__RefHeading__63_18063887 Setup mailman cron5]

[#__RefHeading__65_18063887 Setup daemon5]

[#__RefHeading__67_18063887 Create your first list mailman:5]

[#__RefHeading__69_18063887 Start the mailman service:5]

[#__RefHeading__71_18063887 Restart Zimbraserver and Mailman Services5]

[#__RefHeading__73_18063887 Set admin password for all list :5]= NOTE: Before installing Mailman, You will need to have root privileges to perform the steps in this section. =

Update packages:

yum install gcc gcc-c++ python-devel

Download MailMan Source Code From:

http://ftp.gnu.org/gnu/mailman/

http://ftp.gnu.org/gnu/mailman/mailman-2.1.15.tgz

Add the group and user:http:

groupadd mailman

useradd -s /sbin/nologin -g mailman mailman

Create the installation directory:

As the Environment is on DRBD + Heartbeat , /opt is DRBD mounted partition , which is getting block level replicated to other machine so ensure that mailman is created under /opt

mkdir -p /opt/mailman

ln -s /opt/mailman /usr/local/mailman

Create the installation directory:

cd /usr/local/

chgrp mailman mailman

chmod a+rx,g+ws mailman

Install Mailman:

cd /downloads

tar xzvf mailman-2.1.15.tgz

cd mailman-2.1.15

./configure --with-username=mailman --with-groupname=mailman --with-mail-gid=mailman --with-cgi-gid=zimbra

make

make install

Default Installation Path:

cd /usr/local/mailman/

bin/check_perms -f

cd archives

chown zimbra private


chmod o-x private

Set up your web server

cd /opt/zimbra/conf/


vim httpd.conf

Write below lines:

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

</Directory>

#Uncomment line & Modify

ServerName mail.nationtoday.in:80

save and exit

cd /opt/zimbra/httpd/htdocs

mkdir mmimages

cp /usr/local/mailman/icons/* mmimages/

# Zimbra user

zmapachectl stop

zmapachectl start

Changes postfix configuration

Add/Modify /opt/zimbra/postfix/conf/main.cf so that following varibles are set as shown, as zimbra user

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

save and exit


If It's not changed then u apply below steps:

In /opt/zimbra/conf/zmmta.cf

POSTCONF alias_maps LOCAL postfix_alias_maps

to

POSTCONF alias_maps hash:/usr/local/mailman/data/aliases,hash:/etc/aliases


POSTCONF virtual_alias_maps LOCAL postfix_virtual_alias_maps

to

POSTCONF virtual_alias_maps

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


and add a line


POSTCONF inet_interfaces all


then su - zimbra


Command:


# zmprov ms node.nationtoday.in zimbraMtaMyDestination '$myhostname,

localhost.$mydomain, localhost'


where node.nationtoday.in is the hostname of the zimbra server


postfix reload

Add following lines at the end of /usr/local/mailman/Mailman/mm_cfg.py file.


DEFAULT_EMAIL_HOST = 'nationtoday.in'

DEFAULT_URL_HOST = 'mail.nationtoday.in'

VIRTUAL_HOSTS.clear()

add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

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

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

VIRTUAL_HOST_OVERVIEW = On

MTA = 'Postfix'

POSTFIX_ALIAS_CMD = '/opt/zimbra/postfix/sbin/postalias'

POSTFIX_MAP_CMD = '/opt/zimbra/postfix/sbin/postmap'

IMAGE_LOGOS = '/mmimages/'

POSTFIX_STYLE_VIRTUAL_DOMAINS = [ 'nationtoday.in' ]

save and exit

# Zimbra User

# zmcontrol restart

Add a sitewide list called mailman (Mandatory)

# As root

cd /usr/local/mailman

bin/newlist mailman

bin/config_list -i data/sitelist.cfg mailman

# 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.

# cd /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


Create your first list mailman:

bin/newlist mailman "give the information and password:"


Start the mailman service:

bin/mailmanctl -s start

chown mailman:mailman data/aliases*

chmod g+w data/aliases*


Restart Zimbraserver and Mailman Services

# zmcontrol restart

cd /usr/local/mailman

bin/mailmanctl -s stop

bin/mailmanctl -s start

chkconfig --add mailman

chkconfig mailman on


Set admin password for all list :

bin/mmsitepass


[1]