LinuxZimbra

Zimbra – Mailman, integrazione mailing lists

Pubblicato il
twitterlinkedin

Linee guida per compilare mailman e integrare il gestore di mailing lists in Zimbra.

Sorgente da scaricare.

> mkdir /compile
> cd /compile
> wget http://ftp.gnu.org/gnu/mailman/mailman-2.1.14.tgz

Preparazione ambiente per mailman.

> yum install gcc
> yum install python-devel.x86_64
> groupadd mailman
> useradd -c”GNU Mailman” -s /sbin/nologin -d /home/mailman -g mailman mailman
> mkdir /home/mailman
> chown mailman:mailman /home/mailman
> cd /usr/local
> mkdir mailman-2.1.14
> chgrp mailman mailman-2.1.14
> chmod a+rx,g+ws mailman-2.1.14

Compilazione mailman 2.1.14

> cd /compile
> tar zxfv mailman-2.1.14.tgz
> cd mailman-2.1.14
> ./configure –prefix=/usr/local/mailman-2.1.14 –with-cgi-gid=zimbra
> make install
> cd /usr/local
> ln -s mailman-2.1.14/ mailman
> cd /usr/local/mailman/archives
> chown zimbra private
> chmod o-x private
> /usr/local/mailman/bin/check_perms -f
> /usr/local/mailman/bin/check_perms -f

Integrazione WebServer Zimbra.

> nano /opt/zimbra/conf/httpd.conf

# alla fine aggiungere le seguenti righe
#
#  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

 

> cd /opt/zimbra/httpd/htdocs
> mkdir mmimages
> cp /usr/local/mailman/icons/* mmimages/
> su zimbra
> zmapachectl stop
> zmapachectl start
> exit

Integrazione mailman su Zimbra MTA.

# modificare il file /opt/zimbra/postfix/conf/main.cf,

> su zimbra

# la riga
# mydestination = localhost
# dovrà diventare
# mydestination = localhost, nome host del proprio server
> zmprov mcf zimbraMtaMyDestination ‘localhost, nome host del proprio server

# la riga
# virtual_alias_maps = proxy:ldap:/opt/zimbra/conf/ldap-vam.cf
# dovrà diventare
# virtual_alias_maps = proxy:ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/mailman/data/virtual-mailman
> zmlocalconfig -e postfix_virtual_alias_maps=proxy:ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/mailman/data/virtual-mailman

# la riga
# alias_maps = hash:/etc/aliases
# dovrà diventare
# alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases
> zmlocalconfig -e postfix_alias_maps=hash:/etc/aliases,hash:/usr/local/mailman/data/aliases

# rilanciare MTA su nuova configurazione
> /opt/zimbra/libexec/zmmtaconfig mta

> exit

Integrazione mailman su postfix Zimbra.

# alla fine del file aggiungere le linee
> nano /usr/local/mailman/Mailman/mm_cfg.py

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’ ]

Attivazione gestore di mailing lists mailman.

# 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 in Centos
> cp /usr/local/mailman/scripts/mailman /etc/init.d
> chkconfig –add mailman

# start mailman
> /etc/init.d/mailman start

# http://[zimbra host]:7780/mailman/listinfo

twitterlinkedin