Mailserver einrichten: Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
 
(109 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 4: Zeile 4:
Siehe dazu auch [[MySQL installieren]].
Siehe dazu auch [[MySQL installieren]].


== Dovecot ==
== Einrichtung ==


=== Installation ===
[[PostfixAdmin]]
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
sudo apt-get install dovecot-core
sudo apt-get install dovecot-imapd dovecot-pop3d
sudo apt-get install dovecot-mysql
</pre>


=== Datenbank erstellen ===
[[Dovecot]]
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
mysql -u root -p
mysql> create database if not exists mails;
mysql> create user 'dovecot'@'%' identified by '<password>';
mysql> grant usage on *.* to 'dovecot'@'%' identified by '<password>';
mysql> grant all privileges on mails.* to 'dovecot'@'%';
mysql> flush privileges;
mysql> use mails;
mysql> CREATE TABLE users (id INT UNSIGNED AUTO_INCREMENT NOT NULL, username VARCHAR(128) NOT NULL, domain VARCHAR(128) NOT NULL, password VARCHAR(128) NOT NULL, UNIQUE (id), PRIMARY KEY (username, domain));
mysql> quit;
</pre>


Soll nur von ''localhost'' auf die Datenbank zugegriffen werden können, dann folgenden Befehl verwenden:
[[Postfix]]
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
mysql> create user 'dovecot'@'localhost' identified by '<password>';
</pre>


=== Konfiguration  ===
[[Mailserver Umgebung]]


==== SSL Zertifikat ====
[[Mailserver testen]]


Hilfe zu Erstellung eines SSL-Zertifikates siehe [[SSL Zertifikat]]
[[Webmail]]


Erstelltes Zertifikat in der Datei ''/etc/dovecot/conf.d/10-ssl.conf'' eintragen.
[[Amavis-Spam-Virenfilter]]
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
ssl = required
ssl_cert = </etc/ssl/certs/dovecot.crt
ssl_key = </etc/ssl/private/dovecot.key
</pre>


==== Benutzer Authentifizierung ====
[[Sieve Mailfilter]]


Datei <code>/etc/dovecot/conf.d/10-auth.conf</code>:
[[Fetchmail]]
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
# Folgende Zeile auskommentieren:
# !include auth-system.conf.ext


# Folgende Zeile einkommentieren:
[[Mailman]]
!include auth-sql.conf.ext
</pre>


Datei <code>/etc/dovecot/dovecot-sql.conf.ext</code>:
[[Leafnode]]
<pre style="white-space: pre-wrap;
 
white-space: -moz-pre-wrap;
[[Mails verschlüsseln]]
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
# Database driver: mysql, pgsql, sqlite
driver = mysql
</pre>


== Links ==
== Links ==


[https://help.ubuntu.com/community/PostfixDovecotSASL https://help.ubuntu.com/community/PostfixDovecotSASL]
[https://help.ubuntu.com/community/PostfixDovecotSASL https://help.ubuntu.com/community/PostfixDovecotSASL]
[https://thomas-leister.de/internet/mailserver-ubuntu-server-dovecot-postfix-mysql/ https://thomas-leister.de/internet/mailserver-ubuntu-server-dovecot-postfix-mysql/]




Zurück zu [[Ubuntu]]
Zurück zu [[Mailserver einrichten (unterschiedliche Versionen)|Mailserver einrichten]]

Aktuelle Version vom 31. Dezember 2019, 12:17 Uhr