Outils pour utilisateurs

Outils du site


Action disabled: media
admin:services:mailman

< retour à la page de l'administration technique

Mailman

Installation mailman

# apt install mailman
# dpkg-reconfigure mailman
Languages to support: fr
# nano /etc/mailman/mm_cfg.py

DEFAULT_URL_PATTERN = 'https://%s/'
DEFAULT_EMAIL_HOST = 'federez.net'
DEFAULT_URL_HOST   = 'lists.federez.net'
DEFAULT_SERVER_LANGUAGE = 'fr'

# Archives privées à leur création
DEFAULT_ARCHIVE_PRIVATE = 1
# Décommenter:
MTA='Postfix'

Configuration postfix

# nano /etc/postfix/main.cf
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
# check_perms -f
# chown -R list:list /var/lib/mailman/
# check_perms

Configuration Apache

Il faut créer deux VHOST, un pour la gestion des listes, l'autre pour consulter les archives.

/etc/apache2/sites-available/mailman.conf
<VirtualHost *:443>
    ServerName lists.federez.net
 
    <Directory /usr/lib/cgi-bin/mailman/>
        AllowOverride None
        Options ExecCGI
        AddHandler cgi-script .cgi
        Require all granted
    </Directory>
    <Directory /var/lib/mailman/archives/public/>
        Options FollowSymlinks
        AllowOverride None
        Require all granted
    </Directory>
    <Directory /usr/share/images/mailman/>
        AllowOverride None
        Require all granted
    </Directory>
 
    Alias /pipermail/ /var/lib/mailman/archives/public/
    Alias /images/mailman/ /usr/share/images/mailman/
    ScriptAlias /admin /usr/lib/cgi-bin/mailman/admin
    ScriptAlias /admindb /usr/lib/cgi-bin/mailman/admindb
    ScriptAlias /confirm /usr/lib/cgi-bin/mailman/confirm
    ScriptAlias /create /usr/lib/cgi-bin/mailman/create
    ScriptAlias /edithtml /usr/lib/cgi-bin/mailman/edithtml
    ScriptAlias /listinfo /usr/lib/cgi-bin/mailman/listinfo
    ScriptAlias /options /usr/lib/cgi-bin/mailman/options
    ScriptAlias /private /usr/lib/cgi-bin/mailman/private
    ScriptAlias /rmlist /usr/lib/cgi-bin/mailman/rmlist
    ScriptAlias /roster /usr/lib/cgi-bin/mailman/roster
    ScriptAlias /subscribe /usr/lib/cgi-bin/mailman/subscribe
    ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
    ScriptAlias / /usr/lib/cgi-bin/mailman/listinfo
 
    # Logs
    # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel warn
    ErrorLog ${APACHE_LOG_DIR}/lists-error.log
    CustomLog ${APACHE_LOG_DIR}/lists-access.log combined
 
    # SSL
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/federez.net/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/federez.net/privkey.pem
</VirtualHost>
/etc/apache2/sites-available/archives.conf
<VirtualHost *:443>
    ServerName archives.federez.net
    DocumentRoot /var/lib/mailman/archives/private/federez/
 
    ErrorLog ${APACHE_LOG_DIR}/archives-error.log
    CustomLog ${APACHE_LOG_DIR}/archives-access.log combined
 
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/federez.net/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/federez.net/privkey.pem
 
    <Directory /var/lib/mailman/archives/private/federez/>
        Include /etc/apache2/ldap.conf
        AllowOverride None
        Options -Indexes +FollowSymlinks
    </Directory>
    <Directory "/var/lib/mailman/archives/private/federez/database">
        Require all denied
    </Directory>
    <Files ~ "^pipermail.pck">
        Require all denied
    </Files>
</VirtualHost>
# a2ensite mailman
# a2ensite archives
# adduser www-data list
# service apache2 reload

Mise en route

Soit on crée des MLs

Mailing-list nécessaire :

# newlist mailman
-> utiliser admin@federez.net ou root en propriétaire.
# /etc/init.d/mailman start
# /etc/init.d/postfix restart
# newlist blabla

Soit on rsync

hexagon copie les fichiers sur quigon

rsync -e ssh -avz --delete-after /var/lib/mailman/ quigon.federez.net:/var/lib/mailman/
rsync -e ssh -avz /etc/aliases /etc/aliases.db quigon.federez.net:/etc/

# /etc/init.d/mailman start
# /etc/init.d/postfix restart

BUGFIX

4/12/2018 : la liste aurore-ca n'apparaissait plus dans la liste des listes, et les url d'administration de la liste apparaissaient en federez.net au lieu de lists.federez.net
résolu avec :

sudo /var/lib/mailman/bin/withlist -l -r fix_url aurore-ca --urlhost=lists.federez.net 
admin/services/mailman.txt · Dernière modification : 2018/12/04 17:19 de lazouz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki