Mailman3 Easy Installation

I made script to make mailman3 installation easy (automated) based on my experience installing it manually.  for installation guide and prerequisite condition you can see in it’s repository here https://github.com/iomarmochtar/mailman3_ei

Here’s the post installation topics that may you need:

Creating Admin User

Run this command for create new admin user then follow the guide.

/opt/mailman3/conda/envs/mailman3_ext/bin/python /opt/mailman3/webui/manage.py createsuperuser

Changing Postorius Port to 80/443

see my gist for nginx  configuration for listening to port 80 (http) that will be redirect to 443 (https) here . copy it then paste to nginx main configuration.

cat > /opt/mailman3/etc/nginx/nginx.conf

Restart service to apply the configuration.

service mailman3_webui restart

Change Self Sign Certificate

Please replace self sign certificate that created while installation in your commercial one. the ssl certificate located in /opt/mailman3/etc/nginx/certs

Disabling Archiving Service (hyperkitty)

Edit Django file configuration then give comment (#) for hyperkitty in INSTALLED_APPS

vim /opt/mailman3/webui/webui/settings.py

so the code moreless will be like this

...
INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'postorius',
    #'hyperkitty',
    'django_mailman3',
...

Also edit urls configuration for hyperkitty app by give comment (#) on it.

vim /opt/mailman3/webui/webui/urls.py

the code will be like this.

...
urlpatterns = [
    url(r'^$', RedirectView.as_view(
        url=reverse_lazy('list_index'),
        permanent=True)),
    url(r'^postorius/', include('postorius.urls')),
    #url(r'^hyperkitty/', include('hyperkitty.urls')),
...

Disable archiver in mailman3 main configuration from enable: yes to enable: no

vim /opt/mailman3/etc/mailman.cfg

Restart services to apply new configuration

service mailman3 restart
service mailman3_webui restart

Change Lookup File Type to Regex

By default mailman3 will generating postfix’s hash file which is using postmap command so postfix must be installed, Do following steps  if you want to change to regex.

Add/adjust following config in mailman3 main configuration file (/opt/mailman3/etc/mailman3.cfg)

[mta]
incoming: mailman.mta.postfix.LMTP
outgoing: mailman.mta.deliver.deliver
lmtp_host: 127.0.0.1
lmtp_port: 8023
smtp_host: localhost
smtp_port: 25
configuration: /opt/mailman3/etc/mailman_rgx.cfg

Create mailman3 regex configuration file, don’t forget to restart mailman3 service to apply.

cat > /opt/mailman3/etc/mailman_rgx.cfg

[postfix]
transport_file_type: regex
postmap_command: /opt/zimbra/postfix/sbin/postmap

The generated lookup file will be located in folder /opt/mailman3/var/data/postfix_lmtp, it’s will be added in every time you add new mail-list

Advertisements

2 thoughts on “Mailman3 Easy Installation

  1. Starting mailman3:
    /etc/init.d/mailman3: line 69: /opt/mailman3/conda/bin/mailman: No such file or directory
    /etc/init.d/mailman3: line 72: /opt/mailman3/conda/bin/mailman: No such file or directory

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s