relecture et adaptation à Debian 11
This commit is contained in:
parent
3cd999b9e8
commit
f8db3049f5
124
HowtoSympa.md
124
HowtoSympa.md
|
@ -3,7 +3,7 @@ categories: email
|
|||
title: Howto Sympa
|
||||
...
|
||||
|
||||
* Documentation : <http://www.sympa.org/doc/>
|
||||
* Documentation : <https://sympa-community.github.io/manual/>
|
||||
|
||||
[Sympa](http://www.sympa.org/) est un logiciel libre de gestion de listes de diffusion. Il est développé en Perl depuis plus de 20 ans par des développeurs français.
|
||||
Il s'utilise avec une base de données [MySQL](HowtoMySQL) ou [PostgreSQL](HowtoPostgreSQL), et peut aller lire des données dans un annuaire [LDAP](HowtoOpenLDAP).
|
||||
|
@ -13,10 +13,10 @@ Il s'utilise avec une base de données [MySQL](HowtoMySQL) ou [PostgreSQL](Howto
|
|||
Installer au préalable [Postfix](HowtoPostfix), [Apache](HowtoApache) et [MariaDB](HowtoMySQL).
|
||||
|
||||
~~~
|
||||
# aptitude install sympa default-mysql-server libapache2-mod-fcgid opendkim-tools
|
||||
# apt install sympa default-mysql-server libapache2-mod-fcgid opendkim-tools
|
||||
|
||||
# sympa -v
|
||||
Sympa 6.2.16
|
||||
Sympa 6.2.60
|
||||
|
||||
# systemctl status sympa
|
||||
● sympa.service - SYMPA mailing list manager
|
||||
|
@ -34,10 +34,34 @@ Nov 05 20:34:36 sympa_msg[18009]: notice main:: Sympa/msg 6.2.16 Started
|
|||
Nov 05 20:34:36 systemd[1]: Started SYMPA mailing list manager.
|
||||
~~~
|
||||
|
||||
Il faut ensuite ajuster le paramètre suivant dans `/etc/sympa/sympa/sympa.conf` :
|
||||
Nous conseillons d'utiliser une unité [systemd](HowtoSystemd) `wwsympa.service` pour la partie web.
|
||||
D'ailleurs, à partir de Debian 11, le wrapper FastCGI n'est même plus inclus pour des raisons de sécurité.
|
||||
Voici l'unité à créer :
|
||||
|
||||
~~~
|
||||
use_fast_cgi 1
|
||||
~~~ {.ini}
|
||||
[Unit]
|
||||
Description=WWSympa - Web interface for Sympa mailing list manager
|
||||
After=syslog.target sympa.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=%t/sympa/wwsympa.pid
|
||||
ExecStart=/usr/bin/spawn-fcgi -F $FCGI_CHILDREN \
|
||||
-P ${RUNTIME_DIRECTORY}/wwsympa.pid \
|
||||
-s ${RUNTIME_DIRECTORY}/wwsympa.socket \
|
||||
-u $FCGI_USER -g $FCGI_GROUP $FCGI_OPTS -- \
|
||||
/usr/lib/cgi-bin/sympa/wwsympa.fcgi
|
||||
Environment="FCGI_CHILDREN=5"
|
||||
Environment="FCGI_USER=sympa"
|
||||
Environment="FCGI_GROUP=sympa"
|
||||
Environment="FCGI_OPTS=-M 0600 -U www-data -G www-data"
|
||||
EnvironmentFile=-/etc/default/sympa
|
||||
Restart=always
|
||||
RuntimeDirectory=sympa
|
||||
RuntimeDirectoryPreserve=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
~~~
|
||||
|
||||
Et ajouter la gestion des alias Sympa dans `/etc/postfix/main.cf` :
|
||||
|
@ -100,7 +124,9 @@ wwsympa_url http://lists.example.com/wws
|
|||
lang fr
|
||||
~~~
|
||||
|
||||
> *Note* : en cas de changement de configuration de Sympa, il faut redémarrer Sympa **et** Apache (à cause des process FastCGI).
|
||||
> *Note 1* : pour Debian 10 ou inférieur, on indiquera `use_fast_cgi 1` pour utiliser le wrapper FastCGI avec Apache
|
||||
|
||||
> *Note 2* : en cas de changement de configuration de Sympa, il faut redémarrer Sympa **et** l'unité system `wwsympa` (ou Apache) à cause des process FastCGI.
|
||||
|
||||
## Apache
|
||||
|
||||
|
@ -112,53 +138,18 @@ Vous devez créer un VirtualHost du type après avoir désactivé la configurati
|
|||
RedirectMatch ^/$ /wws/
|
||||
#Include /etc/apache2/ssl/sympa.conf
|
||||
|
||||
<IfModule mod_fcgid.c>
|
||||
Alias /static-sympa /var/lib/sympa/static_content
|
||||
<Directory /var/lib/sympa/static_content>
|
||||
Require all granted
|
||||
</Directory>
|
||||
ScriptAlias /wws /usr/lib/cgi-bin/sympa/wwsympa-wrapper.fcgi
|
||||
<Directory /usr/lib/cgi-bin/sympa>
|
||||
Require all granted
|
||||
</Directory>
|
||||
</IfModule>
|
||||
Alias /static-sympa /usr/share/sympa/static_content
|
||||
<Directory /usr/share/sympa/static_content>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
~~~
|
||||
Alias /css-sympa /var/lib/sympa/css
|
||||
<Directory /var/lib/sympa/css>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
On conseille bien sûr de l'activer en [HTTPS](HowtoSSL), par exemple avec [Let's Encrypt](HowtoLetsEncrypt).
|
||||
|
||||
### Avec un service FastCGI séparé
|
||||
|
||||
Il est aussi possible de faire tourner wwsympa.fcgi en tant que service fastcgi séparé avec spawn-fcgi (entre autre solutions), un service systemd pour cette méthode est le suivant:
|
||||
|
||||
~~~ { .ini }
|
||||
[Unit]
|
||||
Description=WWSympa - Web interface for Sympa mailing list manager
|
||||
After=syslog.target sympa.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=sympa
|
||||
Group=sympa
|
||||
ExecStart=!/usr/bin/spawn-fcgi -F 5 -P ${RUNTIME_DIRECTORY}/wwsympa.pid -s ${RUNTIME_DIRECTORY}/wwsympa.socket -u sympa -g sympa -M 0660 -G www-data -- /usr/lib/cgi-bin/sympa/wwsympa.fcgi
|
||||
Restart=always
|
||||
|
||||
RuntimeDirectory=sympa
|
||||
RuntimeDirectoryPreserve=yes
|
||||
PIDFile=%t/sympa/wwsympa.pid
|
||||
~~~
|
||||
|
||||
La configuration du vhost apache devient alors :
|
||||
|
||||
~~~ { .apache }
|
||||
<VirtualHost *:80 *:443>
|
||||
ServerName lists.example.com
|
||||
RedirectMatch ^/$ /wws/
|
||||
#Include /etc/apache2/ssl/sympa.conf
|
||||
|
||||
Alias /static-sympa /var/lib/sympa/static_content
|
||||
<Directory /var/lib/sympa/static_content>
|
||||
Alias /pictures-sympa /var/lib/sympa/pictures
|
||||
<Directory /var/lib/sympa/pictures>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
|
@ -167,9 +158,26 @@ La configuration du vhost apache devient alors :
|
|||
Require all granted
|
||||
</Location>
|
||||
|
||||
#RewriteEngine On
|
||||
#RewriteCond %{HTTPS} !=on
|
||||
#RewriteCond %{HTTP:X-Forwarded-Proto} !=https
|
||||
#RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R=permanent]
|
||||
|
||||
</VirtualHost>
|
||||
~~~
|
||||
|
||||
On conseille bien sûr de l'activer en [HTTPS](HowtoSSL), par exemple avec [Let's Encrypt](HowtoLetsEncrypt).
|
||||
|
||||
> *Note* : pour Debian 10 ou inférieur, si l'on utilise le wrapper FastCGI, on utilisera plutôt :
|
||||
> ~~~
|
||||
> <IfModule mod_fcgid.c>
|
||||
> ScriptAlias /wws /usr/lib/cgi-bin/sympa/wwsympa-wrapper.fcgi
|
||||
> <Directory /usr/lib/cgi-bin/sympa>
|
||||
> Require all granted
|
||||
> </Directory>
|
||||
> </IfModule>
|
||||
> ~~~
|
||||
|
||||
## DKIM
|
||||
|
||||
Génération des clés DKIM :
|
||||
|
@ -177,7 +185,7 @@ Génération des clés DKIM :
|
|||
~~~
|
||||
# opendkim-genkey -D /etc/ssl/private/ -d lists.example.com -s sympa2018 -v
|
||||
# adduser sympa ssl-cert
|
||||
# chown sympa:sympa /etc/ssl/private/foo_lists.example.com.key
|
||||
# chown sympa:sympa /etc/ssl/private/sympa2018.private
|
||||
~~~
|
||||
|
||||
On active ensuite dans `/etc/sympa/sympa/sympa.conf` :
|
||||
|
@ -189,6 +197,9 @@ dkim_signer_domain lists.example.com
|
|||
dkim_selector sympa2018
|
||||
~~~
|
||||
|
||||
On peut ainsi configurer DKIM dans les paramètres de chaque liste de diffusion.
|
||||
|
||||
|
||||
# Plomberie
|
||||
|
||||
Les emails d'administration (changement de mot de passe, modération, etc.) sont envoyés à `sympa@lists.example.com`,
|
||||
|
@ -279,7 +290,7 @@ Usage:
|
|||
alias_manager.pl add | del listname domain
|
||||
~~~
|
||||
|
||||
## emails d'une liste vers une autre non archivés ?
|
||||
## emails d'une liste vers une autre non archivée ?
|
||||
|
||||
C'est probablement à cause de la présence de l'entête `X-No-Archive: yes` !
|
||||
|
||||
|
@ -301,3 +312,8 @@ En cas d'erreur "foo@sympa.example.com: Recipient address rejected: User unknown
|
|||
|
||||
(ou plus simplement un `newaliases` si Postfix est bien configuré).
|
||||
|
||||
## Forcer l'adresse email expéditrice
|
||||
|
||||
Pour différentes raisons - notamment de délivrabilité - nous conseillons de positionner le paramètre `Auteur anonyme (anonymous_sender)`
|
||||
afin de forcer l'expéditeur avec l'adresse email de la liste.
|
||||
|
||||
|
|
Loading…
Reference in a new issue