Mailman Integration Zimbra 7 At ALPHA: Difference between revisions
No edit summary |
No edit summary |
||
| (4 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
[[category:Tetra Clients]] | |||
[[category:Zimbra]] | |||
[[category:Alpha]] | |||
'''Mailman Intregration with Zimbra Server for Nation Today (Alpha)''' | '''Mailman Intregration with Zimbra Server for Nation Today (Alpha)''' | ||
== Update packages: == | == Update packages: == | ||
yum install gcc gcc-c++ python-devel | yum install gcc gcc-c++ python-devel | ||
== Download MailMan Source Code From: == | == Download MailMan Source Code From: == | ||
[http://ftp.gnu.org/gnu/mailman/ http://ftp.gnu.org/gnu/mailman/] | [http://ftp.gnu.org/gnu/mailman/ http://ftp.gnu.org/gnu/mailman/] | ||
http://ftp.gnu.org/gnu/mailman/mailman-2.1.15.tgz | http://ftp.gnu.org/gnu/mailman/mailman-2.1.15.tgz | ||
== Add the group and user:http: == | == Add the group and user:http: == | ||
groupadd mailman | groupadd mailman | ||
useradd -s /sbin/nologin -g mailman mailman | useradd -s /sbin/nologin -g mailman mailman | ||
== Create the installation directory: == | == 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 | 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 | mkdir -p /opt/mailman | ||
ln -s /opt/mailman /usr/local/mailman | ln -s /opt/mailman /usr/local/mailman | ||
== Create the installation directory: == | == Create the installation directory: == | ||
cd /usr/local/ | cd /usr/local/ | ||
chgrp mailman mailman | |||
chgrp mailman mailman | chmod a+rx,g+ws mailman | ||
chmod a+rx,g+ws mailman | |||
== Install Mailman: == | == Install Mailman: == | ||
cd /downloads | cd /downloads | ||
tar xzvf mailman-2.1.15.tgz | |||
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 | |||
cd mailman-2.1.15 | make | ||
make install | |||
./configure --with-username=mailman --with-groupname=mailman --with-mail-gid=mailman --with-cgi-gid=zimbra | |||
make | |||
make install | |||
== Default Installation Path: == | == Default Installation Path: == | ||
cd /usr/local/mailman/ | cd /usr/local/mailman/ | ||
bin/check_perms -f | |||
bin/check_perms -f | cd archives | ||
chown zimbra private | |||
cd archives | chmod o-x private | ||
chown zimbra private | |||
chmod o-x private | |||
== Set up your web server == | == Set up your web server == | ||
vim httpd.conf | cd /opt/zimbra/conf/ | ||
vim httpd.conf | |||
'''Write below lines:''' | '''Write below lines:''' | ||
ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/ | ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/ | ||
<nowiki><Directory /usr/local/mailman/cgi-bin/></nowiki> | |||
AllowOverride None | |||
Options ExecCGI | |||
Order allow,deny | |||
Allow from all | |||
<nowiki></Directory></nowiki> | |||
Alias /pipermail/ /usr/local/mailman/archives/public/ | |||
<nowiki><Directory /usr/local/mailman/archives/public></nowiki> | |||
Options Indexes MultiViews FollowSymLinks | |||
AllowOverride None | |||
Order allow,deny | |||
Allow from all | |||
<nowiki></Directory></nowiki> | |||
'''<nowiki>#Uncomment line & Modify </nowiki>''' | '''<nowiki>#Uncomment line & Modify </nowiki>''' | ||
ServerName mail.nationtoday.in:80 | ServerName mail.nationtoday.in:80 | ||
save and exit | save and exit | ||
cd /opt/zimbra/httpd/htdocs | cd /opt/zimbra/httpd/htdocs | ||
mkdir mmimages | |||
mkdir mmimages | cp /usr/local/mailman/icons/* mmimages/ | ||
cp /usr/local/mailman/icons/* mmimages/ | |||
'''<nowiki># Zimbra user</nowiki>''' | '''<nowiki># Zimbra user</nowiki>''' | ||
zmapachectl stop | zmapachectl stop | ||
zmapachectl start | zmapachectl start | ||
== Changes postfix configuration == | == Changes postfix configuration == | ||
Add/Modify '''/opt/zimbra/postfix/conf/main.cf '''so that following varibles are set as shown, as zimbra user | 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''' | '''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''' | '''alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases''' | ||
save and exit | save and exit | ||
| Line 120: | Line 98: | ||
'''If It's not changed then u apply below steps:''' | '''If It's not changed then u apply below steps:''' | ||
'''In /opt/zimbra/conf/zmmta.cf''' | '''In /opt/zimbra/conf/zmmta.cf''' | ||
POSTCONF alias_maps LOCAL postfix_alias_maps | POSTCONF alias_maps LOCAL postfix_alias_maps | ||
to | to | ||
POSTCONF alias_maps hash:/usr/local/mailman/data/aliases,hash:/etc/aliases | POSTCONF alias_maps hash:/usr/local/mailman/data/aliases,hash:/etc/aliases | ||
POSTCONF virtual_alias_maps LOCAL postfix_virtual_alias_maps | POSTCONF virtual_alias_maps LOCAL postfix_virtual_alias_maps | ||
to | to | ||
POSTCONF virtual_alias_maps | POSTCONF virtual_alias_maps | ||
hash:/usr/local/mailman/data/virtual-mailman,proxy:ldap:/opt/zimbra/conf/ldap-vam.cf, | |||
hash:/usr/local/mailman/data/virtual-mailman,proxy:ldap:/opt/zimbra/conf/ldap-vam.cf, | |||
| Line 141: | Line 118: | ||
POSTCONF inet_interfaces all | POSTCONF inet_interfaces all | ||
| Line 150: | Line 127: | ||
'''<nowiki># zmprov ms node.nationtoday.in zimbraMtaMyDestination '$myhostname,</nowiki>''' | '''<nowiki># zmprov ms node.nationtoday.in zimbraMtaMyDestination '$myhostname,</nowiki>''' | ||
'''localhost.$mydomain, localhost'''' | |||
'''localhost.$mydomain, localhost'''' | |||
| Line 158: | Line 134: | ||
postfix reload | postfix reload | ||
Add following lines at the end of '''/usr/local/mailman/Mailman/mm_cfg.py '''file. | Add following lines at the end of '''/usr/local/mailman/Mailman/mm_cfg.py '''file. | ||
DEFAULT_EMAIL_HOST = 'nationtoday.in' | DEFAULT_EMAIL_HOST = 'nationtoday.in' | ||
DEFAULT_URL_HOST = 'mail.nationtoday.in' | |||
DEFAULT_URL_HOST = 'mail.nationtoday.in' | VIRTUAL_HOSTS.clear() | ||
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) | |||
VIRTUAL_HOSTS.clear() | DEFAULT_URL_PATTERN = 'http://%s:7780/mailman/' | ||
PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/pipermail/%(listname)s' | |||
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) | VIRTUAL_HOST_OVERVIEW = On | ||
MTA = 'Postfix' | |||
DEFAULT_URL_PATTERN = 'http://%s:7780/mailman/' | POSTFIX_ALIAS_CMD = '/opt/zimbra/postfix/sbin/postalias' | ||
POSTFIX_MAP_CMD = '/opt/zimbra/postfix/sbin/postmap' | |||
PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/pipermail/%(listname)s' | IMAGE_LOGOS = '/mmimages/' | ||
<nowiki>POSTFIX_STYLE_VIRTUAL_DOMAINS = [ </nowiki>'nationtoday.in' ] | |||
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/' | |||
<nowiki>POSTFIX_STYLE_VIRTUAL_DOMAINS = [ </nowiki>'nationtoday.in' ] | |||
save and exit | save and exit | ||
| Line 196: | Line 161: | ||
'''<nowiki># As root</nowiki>''' | '''<nowiki># As root</nowiki>''' | ||
cd /usr/local/mailman | cd /usr/local/mailman | ||
bin/newlist mailman | |||
bin/newlist mailman | bin/config_list -i data/sitelist.cfg mailman | ||
bin/config_list -i data/sitelist.cfg mailman | |||
<nowiki># 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.</nowiki> | <nowiki># 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.</nowiki> | ||
<nowiki># cd /usr/local/mailman</nowiki> | <nowiki># cd /usr/local/mailman</nowiki> | ||
<nowiki># bin/genaliases</nowiki> | |||
<nowiki># bin/genaliases</nowiki> | |||
== Aliases and virtual-mailman must be owned by mailman. == | == Aliases and virtual-mailman must be owned by mailman. == | ||
chown mailman:mailman /usr/local/mailman/data/virtual-mailman* | chown mailman:mailman /usr/local/mailman/data/aliases* | ||
chown mailman:mailman /usr/local/mailman/data/virtual-mailman* | |||
== Setup mailman cron == | == Setup mailman cron == | ||
cd /usr/local/mailman/cron | cd /usr/local/mailman/cron | ||
crontab -u mailman crontab.in | |||
crontab -u mailman crontab.in | |||
== Setup daemon == | == Setup daemon == | ||
cp /usr/local/mailman/scripts/mailman /etc/init.d | cp /usr/local/mailman/scripts/mailman /etc/init.d | ||
chkconfig --add mailman | |||
chkconfig --add mailman | |||
== Create your first list mailman: == | == Create your first list mailman: == | ||
bin/newlist mailman '''''"give the information and password:"''''' | bin/newlist mailman '''''"give the information and password:"''''' | ||
== Start the mailman service: == | == Start the mailman service: == | ||
bin/mailmanctl -s start | bin/mailmanctl -s start | ||
chown mailman:mailman data/aliases* | |||
chown mailman:mailman data/aliases* | chmod g+w data/aliases* | ||
chmod g+w data/aliases* | |||
== Restart Zimbraserver and Mailman Services == | == Restart Zimbraserver and Mailman Services == | ||
<nowiki># zmcontrol restart</nowiki> | <nowiki># zmcontrol restart</nowiki> | ||
cd /usr/local/mailman | cd /usr/local/mailman | ||
bin/mailmanctl -s stop | |||
bin/mailmanctl -s stop | bin/mailmanctl -s start | ||
chkconfig --add mailman | |||
bin/mailmanctl -s start | chkconfig mailman on | ||
chkconfig --add mailman | |||
chkconfig mailman on | |||
== Set admin password for all list : == | == Set admin password for all list : == | ||
bin/mmsitepass | bin/mmsitepass | ||
Latest revision as of 09:11, 22 December 2012
Mailman Intregration with Zimbra Server for Nation Today (Alpha)
Update packages:[edit]
yum install gcc gcc-c++ python-devel
Download MailMan Source Code From:[edit]
http://ftp.gnu.org/gnu/mailman/
http://ftp.gnu.org/gnu/mailman/mailman-2.1.15.tgz
Add the group and user:http:[edit]
groupadd mailman
useradd -s /sbin/nologin -g mailman mailman
Create the installation directory:[edit]
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:[edit]
cd /usr/local/ chgrp mailman mailman chmod a+rx,g+ws mailman
Install Mailman:[edit]
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:[edit]
cd /usr/local/mailman/ bin/check_perms -f cd archives chown zimbra private chmod o-x private
Set up your web server[edit]
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[edit]
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)[edit]
# 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.[edit]
chown mailman:mailman /usr/local/mailman/data/aliases* chown mailman:mailman /usr/local/mailman/data/virtual-mailman*
Setup mailman cron[edit]
cd /usr/local/mailman/cron crontab -u mailman crontab.in
Setup daemon[edit]
cp /usr/local/mailman/scripts/mailman /etc/init.d chkconfig --add mailman
Create your first list mailman:[edit]
bin/newlist mailman "give the information and password:"
Start the mailman service:[edit]
bin/mailmanctl -s start chown mailman:mailman data/aliases* chmod g+w data/aliases*
Restart Zimbraserver and Mailman Services[edit]
# 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 :[edit]
bin/mmsitepass