Mailman

Aus Tutorials
Zur Navigation springen Zur Suche springen

Noch in Bearbeitung


Installation

sudo apt-get install mailman

Konfiguration

newlist mailman
sudo newlist mailman
## mailman Mailingliste
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"
INSERT INTO aliases (source, destination) values ('mailman@<domain>', 'mailman@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-admin@<domain>', 'mailman-admin@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-bounces@<domain>', 'mailman-bounces@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-confirm@<domain>', 'mailman-confirm@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-join@<domain>', 'mailman-join@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-leave@<domain>', 'mailman-leave@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-owner@<domain>', 'mailman-owner@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-request@<domain>', 'mailman-request@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-subscribe@<domain>', 'mailman-subscribe@lists.<domain>');
INSERT INTO aliases (source, destination) values ('mailman-unsubscribe@<domain>', 'mailman-unsubscribe@lists.<domain>');

Postfix

Checken, ob die Datei /etc/postfix/master.cf folgende Zeilen enthält (sollte standardmäßig enthalten sein):

mailman   unix   -      n      n      -      -      pipe
   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
   ${nexthop} ${user}

Die Relay-Domains können auf 2 Arten definiert werden - als MySQL-Datenbank oder als Datei:

Transport-MySQL

Datenbank erstellen:

mysql -u root -p
mysql> use mails;
mysql> CREATE TABLE transports (id INT UNSIGNED AUTO_INCREMENT NOT NULL, domain VARCHAR(128) NOT NULL default '', transport VARCHAR(128) NOT NULL default '', UNIQUE (id), PRIMARY KEY (domain));
mysql> INSERT INTO `transports` (`domain`, `transport`) VALUES ('lists.<domain>', 'mailman:');
mysql> quit;

In der Datei /etc/postfix/main.cf folgende Zeilen eintragen:

transport_maps = mysql:/etc/postfix/virtual/mysql-transport.cf
relay_domains = $transport_maps

Eingetragenen Dateipfad erstellen:

sudo touch /etc/postfix/virtual/mysql-transport.cf

Datei /etc/postfix/virtual/mysql-transport.cf mit folgenden Inhalt befüllen:

user = mailserver
password = <password>
hosts = <server ip>
dbname = mails
query = SELECT transport FROM transports WHERE domain='%d'

Transport-Datei

Neue Datei /etc/postfix/transport anlegen:

cd /etc/postfix/
sudo su
echo "lists.<domain>     mailman:" > transport
exit
sudo postmap -v transport

In der Datei /etc/postfix/main.cf am Ende folgende Zeilen hinzufügen:

relay_domains = lists.<domain>
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1
sudo /etc/init.d/postfix reload

Apache

sudo cp /etc/mailman/apache.conf /etc/apache2/conf-available/mailman.conf
sudo cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman-ssl.conf
sudo /etc/init.d/apache2 restart

Mailman Abschluß

sudo a2enmod cgi
sudo service apache2 restart

In der Datei /etc/mailman/mm_cfg.py folgende Zeilen anpassen:

DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/';
DEFAULT_EMAIL_HOST = 'lists.<domain>'
DEFAULT_URL_HOST   = 'lists.<domain>'
sudo /etc/init.d/mailman start

Links

https://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3-p4#g0.0.15

https://help.ubuntu.com/community/Mailman

http://freemars.org/howto/mailman.html

https://www.howtoforge.com/how-to-install-and-configure-mailman-with-postfix-on-debian-squeeze

http://wiki.list.org/DOC/4.27%20Securing%20Mailman's%20web%20GUI%20by%20using%20Secure%20HTTP-SSL

http://list.org/

https://mail.python.org/pipermail/mailman-users/2010-June/069610.html

http://www.list.org/mailman-install/node9.html

http://free-electrons.com/blog/mailman-howto-ubuntu-10-04/


Zurück zu Mailserver einrichten