2013-09-05 05:10:46 +02:00
== Allgemein ==
2013-09-04 15:11:04 +02:00
Die Mail-Infrastruktur des c3d2 dient, wie man sich denken kann, der Kommunikation sowohl untereinander als auch nach außen.
2013-09-05 05:10:46 +02:00
Obwohl es sich von außen betrachtet nur um eine Funktionalität handelt, sind trotzdem mehrere Dienste notwendig, um diese auch herzustellen. In unserem speziellen Fall ist es [[w:de:Postfix (Mail Transfer Agent)|Postfix]] als [[w:de:Mail Transfer Agent|MTA]] und [[w:de:Dovecot|Dovecot]] als [[w:de:Mail Delivery Agent|MDA]].
2013-09-04 15:11:04 +02:00
2014-07-20 07:51:53 +02:00
== Mail-Adressen verwalten ==
2014-07-20 03:18:39 +02:00
2014-07-20 07:51:53 +02:00
=== Mail-Adresse hinzufügen ===
2014-07-20 03:18:39 +02:00
2014-07-20 07:51:53 +02:00
Wer eine Mail-Adresse %<code>@c3d2.de</code> haben möchte, kann sich an Admins wenden, um einen virtuellen Account anlegen zu lassen.
2014-07-20 03:18:39 +02:00
2014-07-20 07:51:53 +02:00
==== virtuelle user anlegen ====
2013-09-30 18:42:56 +02:00
2014-10-27 19:57:44 +01:00
In dem Ordner <code>/root/wetuscripts/mail/bin</code> (oder [[cgit:wetuscripts/tree/mail/bin/]]) liegt die Datei <code>[[cgit:wetuscripts/tree/mail/bin/create_vmail_user|create_vmail_user]]</code>. Wenn sie ausführt wird, hilft sie selbsterklärend dabei einen virtuellen Account anzulegen. Da der Ordner <code>/root/wetuscripts/mail/bin</code> in <code>export PATH</code> steht kann <source lang="bash">create_vmail_user</source> auch einfach ausgeführt werden, ohne den langen Pfad zu kennen.
2014-07-20 07:51:53 +02:00
=== Passwort zum Mail-Account ändern ===
Accounts mit einer Mail-Adressen können das Passwort per <code>ssh user@mail.c3d2.de</code> ändern.
2013-09-30 18:42:56 +02:00
2013-09-05 05:10:46 +02:00
== Konfiguration ==
2013-09-04 15:11:04 +02:00
2013-09-05 05:10:46 +02:00
=== Postfix ===
2013-09-04 15:11:04 +02:00
2013-09-05 05:10:46 +02:00
Konfigurationsdateien für Postfix liegen in <code>/etc/postfix/</code>. Grundsätzlich können alle Konfigurationparameter in der [http://www.postfix.org/postconf.5.html Dokumentation von Postfix] nachgelesen werden. Nachfolgend soll nur auf Besonderheiten in unserer Konfiguration eingegangen werden.
2013-09-04 15:11:04 +02:00
2013-09-05 05:10:46 +02:00
==== main.cf ====
2013-09-04 15:11:04 +02:00
2013-09-04 15:44:22 +02:00
* in der Option <code>relay_domains</code> neben <code>$mydestination</code> auch <code>lists.c3d2.de</code> eintragen
2013-09-05 05:10:46 +02:00
* Um für [[Wetu/Mailman|Mailman]] Funktionalität herzustellen, muss im Eintrag <code>relay_recipient_maps</code> <code>hash:/var/lib/mailman/data/virtual-mailman</code> eingetragen werden.
2013-09-04 22:57:26 +02:00
* <code>smtpd_banner</code> ist ein Scherz.
2013-09-05 05:10:46 +02:00
* Um Bots, Spammern und Ähnlichen das Leben schwer zu machen, werden die folgenden Optionen verwendet:
<pre>
smtpd_error_sleep_time = 20
smtpd_soft_error_limit = 1
smtpd_hard_error_limit = 3
smtpd_junk_command_limit = 2
</pre>
* Da der c3d2 ein Netzwerk aus Rechnern betriebt, ist das auch hier zu berücksichtigen. Dazu setze man <code>mynetworks_style = subnet</code>. In <code>mynetwork</code> sind dann alle vom mailserver zu verwaltenden Netze einzutragen, welches momentan <code>127.0.0.0/8 89.238.79.216/29 89.238.64.140/32 172.22.98.0/24 [::1]/128 [fe80::]/10 [2a00:1828:2000:655::]/64 [2a00:1828:a008::]/48</code> sind.
2013-09-04 15:11:04 +02:00
2014-03-21 13:23:48 +01:00
===== Daemon-Einstellungen =====
2014-03-25 04:27:41 +01:00
Folgendes sind die grundlegenden Einstellungen für den Postfix-Daemon:
2014-03-21 13:23:48 +01:00
<pre>
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
setgid_group = postdrop
home_mailbox = .maildir/
smtpd_banner = $myhostname ESMTP Ia! Ia! Cthulhu Fthagn!
debug_peer_level = 2
biff = no
mail_spool_directory = /var/mail
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mailbox_command = /usr/lib/dovecot/deliver
defer_transports =
mailbox_size_limit = 0
message_size_limit = 10240000
</pre>
2014-03-25 04:27:41 +01:00
*: Dabei gibt <code>home_mailbox</code>
*:* den Namen und gleichzeitig
*:* den Typ der Mailbox im Nutzerverzeichnis des Empfängers
*: an.
2014-03-21 16:07:55 +01:00
2015-08-07 22:21:26 +02:00
===== Fingerprint / Fingerabdruck =====
2015-08-07 22:22:05 +02:00
<pre>
2015-08-07 22:21:26 +02:00
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--===============5200945931581301021==
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="e66LpEthTo3EP2dWprOlHhlC7qbE7Tamu"
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--e66LpEthTo3EP2dWprOlHhlC7qbE7Tamu
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hi,
das Zertifikat f=C3=BCr mail.c3d2.de (IMAP, SMTP) =C3=A4ndert sich in K=C3=
=BCrze. Der
neue Fingerprint ist
SHA1 8F:A4:CE:59:5F:F4:BB:BF:96:9E:8B:51:81:49:BC:F6:77:EF:B9:19
Der alte Fingerprint war SHA1
85:A7:8B:4D:14:B4:E1:32:94:80:F6:48:20:51:67:A9:20:A6:CD:8D
Bitte eventuell auftretende Probleme via Jabber melden:
c3d2@chat.c3d2.de oder =C3=BCber die Webseite https://www.c3d2.de/muc.htm=
l
--e66LpEthTo3EP2dWprOlHhlC7qbE7Tamu
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJVfZKoAAoJEKAKIGjIaOoNRLQQALHXE2YMcACI+CNMwt6WTWdG
/EbDV9CKgqBlZtx+pFxwxQH2GEJQTlpCi6Fq7vf/SWxHtlt5peHKEjwEJlwWA03b
IqVbbdciOSeV8xKNHADrYmbeUjqFSBzlsdt+t+ebqtqUzrFRC1KAYUReB07m436t
yFp727zy2wMKHcnKFhkfxQTd3jKt2YqzcxdlbXE8mrh8LcVRwR0uqRoOTNR44LJK
dFDeODmi5g14jUiilKrgScYdWnhaafTuY09XnrhTSFtacwpKg4trHY/ad8ZfTza0
iv+e1drqDkPro/qZ5mI9lBWOj6i4QT7HRgKyoZZ6j4zGFVmQosHyaXrFKQ5HVvBR
TRTF7mP9lbiZUpRdiKrz5mBvr1QtZqAtTnF5sCuyrrFpDX9tV0gtyFi8zzdsGWjN
X+TueCJnomAT/18CWEQ5sk2uTP4ZiBa8qgFEfVU+19HsA/2zXJuvZ4KYHeOP+4ox
Rqrfgjq/Hr5w4Afq0ATCGA9DqEyHidgxxeHLIQeaxk+fIKsicg18G/9tcGgZfn/5
cTCu0RunjQ7E26P8ZhCWlTwwkq/tillUu9dTiXJBqRtE4As+5wMUGtDKT6wWZhef
l9J+84o6hIqUL1XtR4o1SAnNIHMt4E4G47GNdN2OhqNv/dQly/Nnp1TCpQWviu4c
ldOekwbbrQwUZqnRorO6
=wgqc
-----END PGP SIGNATURE-----
2015-08-07 22:22:05 +02:00
</pre>
2015-08-07 22:21:26 +02:00
2014-03-21 16:07:55 +01:00
===== SSL Konfiguration =====
<pre>
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
</pre>
===== TLS Konfiguration =====
<pre>
2014-03-23 22:06:36 +01:00
tls_random_source = dev:/dev/urandom
### mail - server to server
2014-03-21 16:07:55 +01:00
smtp_tls_cert_file = /etc/postfix/ssl/server.crt
smtp_tls_key_file = /etc/postfix/ssl/server.key
2014-03-23 22:06:36 +01:00
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
### _mandatory gilt fuer security_level = encrypt / _OHNE_mandatory gilt fuer security_level = may
smtp_tls_mandatory_exclude_ciphers = MEDIUM, LOW, aNULL, eNULL, SEED, 3DES, DES, MD5, EXP, CBC, PSD, PSK, SRP, DSS, RC4
smtp_tls_exclude_ciphers = MEDIUM, LOW, aNULL, eNULL, SEED, 3DES, DES, MD5, EXP, CBC, PSD, PSK, SRP, DSS, RC4
smtp_tls_mandatory_protocols = TLSv1, TLSv1.1, Tlsv1.2, !SSLv2, !SSLv3
smtp_tls_ciphers = high
smtp_tls_mandatory_ciphers = high
smtp_tls_security_level = may
smtp_tls_protocols = TLSv1, TLSv1.1, Tlsv1.2, !SSLv2, !SSLv3
smtp_tls_loglevel = 1
### mail - client to server
smtpd_tls_cert_file = /etc/postfix/ssl/server.crt
smtpd_tls_key_file = /etc/postfix/ssl/server.key
#smtpd_tls_CAfile = /etc/postfix/ssl/class3.crt
2014-03-21 16:07:55 +01:00
smtpd_use_tls = yes
2014-03-23 22:29:19 +01:00
smtpd_tls_auth_only = yes
smtpd_tls_security_level = may
2014-03-21 16:07:55 +01:00
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
2014-03-23 22:06:36 +01:00
### _mandatory gilt fuer security_level = encrypt / _OHNE_mandatory gilt fuer security_level = may
2014-03-21 16:07:55 +01:00
smtpd_tls_ciphers = high
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = MEDIUM, LOW, aNULL, eNULL, SEED, 3DES, DES, MD5, EXP, CBC, PSD, PSK, SRP, DSS, RC4
smtpd_tls_exclude_ciphers = MEDIUM, LOW, aNULL, eNULL, SEED, 3DES, DES, MD5, EXP, CBC, PSD, PSK, SRP, DSS, RC4
smtpd_tls_mandatory_protocols = TLSv1, TLSv1.1, Tlsv1.2, !SSLv2, !SSLv3
2014-03-21 16:13:48 +01:00
smtpd_tls_protocols = TLSv1, TLSv1.1, Tlsv1.2, !SSLv2, !SSLv3
2014-03-23 22:06:36 +01:00
smtpd_tls_loglevel = 1
2014-03-23 22:29:19 +01:00
</pre>
2014-03-21 16:13:48 +01:00
2014-03-23 22:29:19 +01:00
<pre>
2014-03-23 22:39:40 +01:00
### smtpd security_level = MUSS may sein! ###
### --- sonst kann sich Amavis nicht connecten ###
2014-03-23 23:04:25 +01:00
### --- können NICHT-TLS fähige Mailserver Mails nicht zustellen ###
2014-03-23 22:39:40 +01:00
###
2014-03-23 22:06:36 +01:00
### From MTA(smtp:[127.0.0.1]:10025) during fwd-rundown-1 (Negative SMTP response to RSET: 530 5.7.0 Must issue a STARTTLS command first at
### Blocked MTA-BLOCKED {RejectedInbound} proxy-reject: END-OF-MESSAGE: 530 5.7.0 - Rejected by next-hop MTA on relaying, from MTA(smtp:[127.0.0.1]:10025): 530 5.7.0 Must issue a STARTTLS command first
2014-03-23 22:39:40 +01:00
###
2014-03-23 22:06:36 +01:00
#smtpd_tls_security_level = may
2014-03-21 16:07:55 +01:00
</pre>
2014-03-23 20:29:51 +01:00
===== SSL Cipher Suites Supported =====
Postfix:
<pre>
Testing ECDHE-RSA-AES256-GCM-SHA384...YES
Testing ECDHE-RSA-AES256-SHA384...YES
Testing ECDHE-RSA-AES256-SHA...YES
Testing DHE-RSA-AES256-GCM-SHA384...YES
Testing DHE-RSA-AES256-SHA256...YES
Testing DHE-RSA-AES256-SHA...YES
Testing DHE-RSA-CAMELLIA256-SHA...YES
Testing AES256-GCM-SHA384...YES
***Testing AES256-SHA256...YES
***Testing AES256-SHA...YES
***Testing CAMELLIA256-SHA...YES
Testing ECDHE-RSA-AES128-GCM-SHA256...YES
Testing ECDHE-RSA-AES128-SHA256...YES
Testing ECDHE-RSA-AES128-SHA...YES
Testing DHE-RSA-AES128-GCM-SHA256...YES
Testing DHE-RSA-AES128-SHA256...YES
Testing DHE-RSA-AES128-SHA...YES
Testing DHE-RSA-CAMELLIA128-SHA...YES
Testing AES128-GCM-SHA256...YES
***Testing AES128-SHA256...YES
***Testing AES128-SHA...YES
***Testing CAMELLIA128-SHA...YES
</pre>
Dovecot:
<pre>
Testing DHE-RSA-AES256-GCM-SHA384...YES
Testing DHE-RSA-AES256-SHA...YES
***Testing AES256-SHA...YES
</pre>
2014-03-23 20:31:37 +01:00
<pre>
2014-03-23 20:32:43 +01:00
*** für Kompatibilität mit Microsoft Outlook & Co. / Clients mit OpenSSL < 0.9.8
2014-03-23 20:31:37 +01:00
</pre>
2014-03-23 20:29:51 +01:00
2013-09-29 23:22:53 +02:00
==== virtual ====
2013-09-30 20:59:49 +02:00
In der virtual sind alle Weiterleitungen / Aliase konfiguriert. Wenn diese geändert wird, muss anschließend <source lang="bash">postmap /etc/postfix/virtual</source> ausgeführt werden.
2013-09-29 23:22:53 +02:00
2014-03-23 23:15:00 +01:00
=== Dovecot ===
==== dovecot.conf ====
<pre>
disable_plaintext_auth = yes
ssl = required
ssl_cipher_list = ECDHE-RSA-AES256-GCM-SHA384:ECDH-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDH-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA:AES256-SHA
log_timestamp = "%Y-%m-%d %H:%M:%S "
### für protocol imap / pop3 ###
{
mail_max_userip_connections = 99
}
</pre>
==== TEST: telnet pass plain login credentials ====
Sollte LOGINDISABLED sein!
<pre>
telnet mail.c3d2.de 143
Connected to mail.c3d2.de.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED AUTH=GSSAPI] Dovecot ready.
</pre>
2013-09-04 15:11:04 +02:00
[[Kategorie:Infrastruktur]]