ASIX/M08/UF1/P41/217

De Lordwektabyte Wiki
Salta a la navegació Salta a la cerca

Permet fer llistes de distribució de correu. Com que és compatible amb ISPConfig, permetrà crear noves llistes des de l'ISPConfig mateix:

yum -y install mailman

Una vegada instal·lat, hem de crear una mail list original:

[root@ispconfig ~]# touch /var/lib/mailman/data/aliases

[root@ispconfig ~]# postmap /var/lib/mailman/data/aliases

[root@ispconfig ~]# /usr/lib/mailman/bin/newlist mailman
Introduïu l'adreça electrònica de l'encarregat de la llista: guillem_solaboeck@iescarlesvallbona.cat
Contrasenya inicial de mailman: 
Haureu d'editar el fitxer /etc/aliases (o equivalent) per a finalitzar la
creació de la vostra llista de correu. Hi haureu d'afegir les línies
següents i possiblement executar el programa «newaliases»:

## Llista de correu mailman
mailman:              "|/usr/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/usr/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/usr/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/usr/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/usr/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/usr/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/usr/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/usr/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

Premeu la tecla de retorn per a notificar el propietari de mailman...


[root@ispconfig ~]# ln -s /usr/lib/mailman/mail/mailman /usr/bin/mailman

Tal com ens ha suggerit, editarem el fitxer /etc/aliases i hi afegirem el següent contingut al final:

(...)

mailman:              "|/usr/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/usr/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/usr/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/usr/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/usr/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/usr/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/usr/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/usr/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

I executarem la següent comanda:

newaliases

Reiniciarem Postfix:

systemctl restart postfix.service

Ara obrirem l'arxiu de configuració de Mailman - Apache /etc/httpd/conf.d/mailman.conf. . Comment out Alias /pipermail/ /var/lib/mailman/archives/public/ and add the line Alias /pipermail /var/lib/mailman/archives/public/

  • Afegirem ScriptAlias /cgi-bin/mailman/ /usr/lib/mailman/cgi-bin/
  • Comentarem Alias /pipermail/ /var/lib/mailman/archives/public/
  • Afegirem Alias /pipermail /var/lib/mailman/archives/public/

De manera que quedi l'arxiu:

#
#  httpd configuration settings for use with mailman.
#

ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/
ScriptAlias /cgi-bin/mailman/ /usr/lib/mailman/cgi-bin/
<Directory /usr/lib/mailman/cgi-bin/>
    AllowOverride None
    Options ExecCGI
    Require all granted
</Directory>


#Alias /pipermail/ /var/lib/mailman/archives/public/
Alias /pipermail /var/lib/mailman/archives/public/
<Directory /var/lib/mailman/archives/public>
    Options MultiViews FollowSymLinks
    AllowOverride None
    Require all granted
    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

Restart Apache:

systemctl restart httpd.service

Habilitar i arrencar mailman:

systemctl enable mailman.service
systemctl start mailman.service

Ens arribarà un correu electrònic com a owners de la mail list que hem creat.