{"id":4765,"date":"2016-05-07T08:10:16","date_gmt":"2016-05-07T06:10:16","guid":{"rendered":"https:\/\/www.bdjl.de\/localhost\/?p=4765"},"modified":"2025-12-31T13:48:52","modified_gmt":"2025-12-31T12:48:52","slug":"lokaler-mailserver-unter-arch","status":"publish","type":"post","link":"https:\/\/www.bdjl.de\/localhost\/?p=4765","title":{"rendered":"Lokaler Mailserver unter Arch"},"content":{"rendered":"<p>Eine neuere Version f\u00fcr dovecot 2.4.x ist <a href=\"https:\/\/www.bdjl.de\/localhost\/?p=5820\">hier<\/a> zu finden.<\/p>\n<p><a href=\"https:\/\/www.bdjl.de\/localhost\/?p=4558\">Hier<\/a> hatte ich vor einiger Zeit meine main.cf und dovecot.conf f\u00fcr Arch dokumentiert, war dann jedoch auf dem ollen Wind U100 zu Kali gewechselt. Auf einem meiner anderen Oldtimer &#8211; einem Dell Vostro 1510 &#8211; l\u00e4uft jetzt wieder ein Arch. Es wei\u00df mit alter Hardware sehr ressourcenschonend umzugehen &#8211; im Gegensatz zu bloated Ubuntu &#8211; und das Mehr an Gefummel ist auf einem Laptop, den ich nicht im Dauereinsatz habe, auch nicht weiter tragisch.<\/p>\n<p>Zu Dokumentationszwecken erneut die main.cf und dovecot.conf f\u00fcr einen lokalen Mailserver als Speicherplatz f\u00fcr die E-Mails der letzten Jahre:<\/p>\n<p>\/etc\/postfix\/main.cf<\/p>\n<pre class=\"lang:default decode:true\"># local paths\r\nqueue_directory = \/var\/spool\/postfix\r\ncommand_directory = \/usr\/bin\r\ndaemon_directory = \/usr\/lib\/postfix\/bin\r\nmail_owner = postfix\r\n\r\n# local domain settings\r\nmyhostname = dellaro \r\n# mydestination = $myhostname, localhost.$mydomain, localhost\r\nmydestination = $myhostname, localhost.localdomain, localhost\r\n\r\n# Timeout settings and limits\r\n# not nec. needed on localhost\r\n# but will not do any harm either\r\ndelay_warning_time = 1h\r\nunknown_local_recipient_reject_code = 450\r\nminimal_backoff_time = 300s\r\nmaximal_backoff_time = 1200s\r\nmaximal_queue_lifetime = 1d\r\nbounce_queue_lifetime = 1d\r\nsmtp_helo_timeout = 60s\r\nsmtpd_soft_error_limit = 3\r\nsmtpd_hard_error_limit = 12\r\n\r\n# SMTP settings\r\n# SSL not needed on localhost\r\n# but will not harm either\r\nsmtpd_tls_cert_file=\/etc\/ssl\/certs\/mail.crt\r\nsmtpd_tls_key_file=\/etc\/ssl\/private\/mail.key\r\nsmtpd_use_tls=yes\r\n# add some modern SSL stuff \r\nsmtpd_tls_received_header = yes\r\nsmtpd_tls_mandatory_protocols = SSLv3, TLSv1\r\nsmtpd_tls_mandatory_ciphers = medium\r\nsmtpd_tls_auth_only = yes\r\n\r\nsmtpd_tls_session_cache_database = btree:\/var\/lib\/postfix\/smtpd_scache\r\nsmtp_tls_session_cache_database = btree:\/var\/lib\/postfix\/smtp_scache\r\nsmtpd_tls_loglevel = 1\r\nsmtpd_sasl_auth_enable = yes\r\n\r\nsmtpd_recipient_restrictions = permit_sasl_authenticated,\r\n                               permit_mynetworks,\r\n                               reject_unauth_destination,\r\n                               \r\n# Sender SASL not needed on localhost\r\n# but will not harm either\r\nsmtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks\r\nsmtpd_sasl_security_options = noanonymous\r\n\r\n# SASL\r\nsmtpd_sasl_type = dovecot\r\nsmtpd_sasl_path = \/var\/run\/dovecot\/auth-client\r\n\r\n# Network settings\r\ninet_interfaces = loopback-only\r\ninet_protocols = all\r\nmynetworks = 127.0.0.0\/8 [::ffff:127.0.0.0]\/104 [::1]\/128 \r\nrelayhost =\r\n\r\nsmtpd_relay_restrictions = permit_mynetworks \r\n                           permit_sasl_authenticated\r\n                           defer_unauth_destination\r\n\r\n# Email and mailbox settings\r\nalias_maps = hash:\/etc\/postfix\/aliases\r\nalias_database = $alias_maps\r\nhome_mailbox = Maildir\/\r\nmailbox_size_limit = 0\r\n\r\n# misc other stuff\r\nmailbox_command = \/usr\/lib\/dovecot\/deliver -c \/etc\/dovecot\/dovecot.conf -m \"${EXTENSION}\"\r\n\r\nsmtpd_banner = $myhostname ESMTP\r\nbiff = no\r\nappend_dot_mydomain = no\r\ndebug_peer_level = 2\r\nsendmail_path = \/usr\/sbin\/sendmail\r\nnewaliases_path = \/usr\/bin\/newaliases\r\nmailq_path = \/usr\/bin\/mailq\r\nsetgid_group = postdrop\r\nhtml_directory = no\r\nmanpage_directory = \/usr\/man\r\nsample_directory = \/etc\/postfix\/sample\r\nreadme_directory = no\r\nrecipient_delimiter = +\r\n<\/pre>\n<p>\/etc\/dovecot\/dovecot.conf<\/p>\n<pre class=\"lang:default decode:true \">auth_mechanisms = plain login\r\nmail_access_groups = mail\r\nmail_location = maildir:~\/Maildir\r\npassdb {\r\n  driver = pam\r\n}\r\nprotocols = imap\r\nservice auth {\r\n  unix_listener auth-client {\r\n    group = postfix\r\n    mode = 0660\r\n    user = postfix\r\n  }\r\n  user = root\r\n}\r\nssl_cert = &lt;\/etc\/ssl\/certs\/mail.crt\r\nssl_key = &lt;\/etc\/ssl\/private\/mail.key\r\nuserdb {\r\n  driver = passwd\r\n}\r\nprotocol imap {\r\n  imap_client_workarounds = delay-newmail tb-extra-mailbox-sep\r\n}\r\n<\/pre>\n<p>Scheint rund zu laufen. Zumindest werfen mir weder Postfix noch Dovecot noch Fehlermeldungen entgegen. Zur Einrichtung selbst siehe die entsprechenden Seiten im Arch-Wiki:<\/p>\n<p><a href=\"https:\/\/wiki.archlinux.org\/index.php\/postfix\" target=\"_blank\" rel=\"noopener\">https:\/\/wiki.archlinux.org\/index.php\/postfix<\/a><\/p>\n<p><a href=\"https:\/\/wiki.archlinux.org\/index.php\/Dovecot\" target=\"_blank\" rel=\"noopener\">https:\/\/wiki.archlinux.org\/index.php\/Dovecot<\/a><\/p>\n<p>Wie immer bei meinen auf jedem Laptop vorhandenen lokalen Mailservern: Der Mailserver ist von au\u00dfen Dank iptables nicht zu erreichen. Nur der lokale Thunderbird nimmt Kontakt auf. Sicherheitsl\u00fccken in der Konfiguration sind deswegen nicht tragisch.<\/p>\n<p>Auf gleichem Stand halte ich die lokalen Mailserver auf den Laptops im Moment noch mit rsync gegen\u00fcber meiner heimischen Workstation. Da muss ich mir mal was Neues \u00fcberlegen &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Eine neuere Version f\u00fcr dovecot 2.4.x ist hier zu finden. Hier hatte ich vor einiger Zeit meine main.cf und dovecot.conf f\u00fcr Arch dokumentiert, war dann jedoch auf dem ollen Wind U100 zu Kali gewechselt. Auf einem meiner anderen Oldtimer &#8211; einem Dell Vostro 1510 &#8211; l\u00e4uft jetzt wieder ein Arch. Es wei\u00df mit alter Hardware [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,5,7],"tags":[511,45,44],"class_list":["post-4765","post","type-post","status-publish","format-standard","hentry","category-laptop","category-linux","category-office","tag-arch","tag-dovecot","tag-postfix"],"_links":{"self":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/4765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4765"}],"version-history":[{"count":6,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/4765\/revisions"}],"predecessor-version":[{"id":5824,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/4765\/revisions\/5824"}],"wp:attachment":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}