cabriofahrer
Well-Known Member
Ich möchte gerne einen Modellversuch für einen lokalen Mailserver starten und die Angelegenheit so unkompliziert wie nur möglich halten. Aus diesem Grund soll die out-of-the-box existierende und funktionierende Infrastruktur von Sendmail genutzt werden, mit der ohne weiteres Zutun jeder Unix-User schon mal in der Lage ist, mit "mail" Nachrichten zu versenden und zu empfangen. Soweit so gut.
Die Idee ist, dass der Mailserver auf der FreeBSD-Maschine läuft und weitere Maschinen, z.B. ein Windows Laptop mittles Thunderbird ebenfalls Emails senden und empfangen kann. Voraussetzung dafür ist dann ein IMAP-Server, dieser soll mittles mail/imap-uw bewerkstelligt werden, wie in diesem alten Artikel beschrieben:
Zunächst ist noch zu sagen, dass, da es sich ja um einen lokalen Server handeln soll, die Namensauflösung mittles mdns/avahi ermöglicht wird.
Ein "ping amd64.local" (Hostname der FreeBSD Maschine) von dem Windows Laptop aus ist erfolgreich.
Jetzt zurück zu dem Artikel und seinen einzelnen Schritten:
In den Schritten 1-6 ("Installing IMAP-IW") werden mail/cclient und mail/imap-iw als ports installiert. Ich habe sie direkt als Packages installiert.
Erste Frage: Wofür dient cclient?
Ein pkg info -D imap-iw gibt folgendes aus:
Demnach habe ich schonmal der /etc/inetd.conf am Ende folgende Zeilen hinzugefügt:
Und danach ein "service inetd onestart" ausgeführt. Schein soweit korrekt zu sein, denn ein "sockstat -4l" ergibt:
Allerdings fehlt mir glaube ich der Schritt 3 der Anleitung:
Da ich nicht den Port, sondern das Package installiert habe, erschien bei mir auch keine Message "make cert", usw.
Auch den Satz aus dem Install report des Packages
verstehe ich nicht. Wo soll ich denn \"make cert\" eingeben?
Ich denke, darin liegt auch der Fehler, warum es dann mit der Neueinrichtung eines Email-Accounts in Thunderbird letztendlich nicht klappt.
Ich denke mir zunächst eine neue Email-Adresse aus: superman@amd64.local
Der letzte Screenshot erschien, nachdem ich "Configure manually" gedrückt habe. Und scheinbar wird Port 143 für IMAP vorgeschlagen.
OK, wie komme ich weiter und liegt es am scheinbar noch nicht erzeugtem Zertifikat?
Die Idee ist, dass der Mailserver auf der FreeBSD-Maschine läuft und weitere Maschinen, z.B. ein Windows Laptop mittles Thunderbird ebenfalls Emails senden und empfangen kann. Voraussetzung dafür ist dann ein IMAP-Server, dieser soll mittles mail/imap-uw bewerkstelligt werden, wie in diesem alten Artikel beschrieben:
Zunächst ist noch zu sagen, dass, da es sich ja um einen lokalen Server handeln soll, die Namensauflösung mittles mdns/avahi ermöglicht wird.
Ein "ping amd64.local" (Hostname der FreeBSD Maschine) von dem Windows Laptop aus ist erfolgreich.
Jetzt zurück zu dem Artikel und seinen einzelnen Schritten:
In den Schritten 1-6 ("Installing IMAP-IW") werden mail/cclient und mail/imap-iw als ports installiert. Ich habe sie direkt als Packages installiert.
Erste Frage: Wofür dient cclient?
Ein pkg info -D imap-iw gibt folgendes aus:
Code:
$ pkg info -D imap-uw
imap-uw-2007f_1,1:
On install:
The ipop2d, ipop3d, and imapd daemons should be invoked by your
/etc/inetd.conf file with lines such as:
pop2 stream tcp nowait root /usr/local/libexec/ipop2d ipop2d
pop3 stream tcp nowait root /usr/local/libexec/ipop3d ipop3d
imap4 stream tcp nowait root /usr/local/libexec/imapd imapd
If PAM authentication support has been compiled in you will need to add
something like the following lines to /etc/pam.conf (PAM authentication is
default):
imap auth required pam_unix.so
imap account required pam_unix.so
imap session required pam_unix.so
pop3 auth required pam_unix.so
pop3 account required pam_unix.so
pop3 session required pam_unix.so
The pam_unix module does not have session support, so we do not use it for
session management. Be sure to read up on pam.conf(5).
To configure imap-uw read /usr/local/share/doc/imap-uw/imaprc.txt. Particularly consider
changing mail-subdirectory to mail to have ~/mail the default mail
directory as is default in some MUAs, and to avoid having the whole home
dir accessed.
===> NB: IMAP-UW now rejects non-encrypted logins by default. To change this
===> behaviour, recompile and reinstall cclient and imap-uw ports with one of
===> the following make variables defined:
WITHOUT_SSL - build without SSL/encryption support.
WITH_SSL_AND_PLAINTEXT - build with SSL/encryption support, but allow
non-encrypted logins.
================================================================================
To create and install a new SSL certificate for imapd and ipop3d, type \"make
cert\". Or install manually in /usr/local/certs.
Example inetd config for SSL only services:
pop3s stream tcp nowait root /usr/local/libexec/ipop3d ipop3d
imaps stream tcp nowait root /usr/local/libexec/imapd imapd
================================================================================
Always:
===> NOTICE:
The imap-uw port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:
https://bugs.freebsd.org/bugzilla
More information about port maintainership is available at:
https://docs.freebsd.org/en/articles/contributing/#ports-contributing
$
Demnach habe ich schonmal der /etc/inetd.conf am Ende folgende Zeilen hinzugefügt:
Code:
# Entries according to pkg info -D imap-uw
pop2 stream tcp nowait root /usr/local/libexec/ipop2d ipop2d
pop3 stream tcp nowait root /usr/local/libexec/ipop3d ipop3d
imap4 stream tcp nowait root /usr/local/libexec/imapd imapd
imaps stream tcp nowait root /usr/local/libexec/imapd imapd
pop3s stream tcp nowait root /usr/local/libexec/ipop3d ipop3d
Und danach ein "service inetd onestart" ausgeführt. Schein soweit korrekt zu sein, denn ein "sockstat -4l" ergibt:
Code:
$ sockstat -4l
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
root inetd 4150 6 tcp4 *:109 *:*
root inetd 4150 7 tcp4 *:110 *:*
root inetd 4150 8 tcp4 *:143 *:*
root inetd 4150 9 tcp4 *:993 *:*
root inetd 4150 10 tcp4 *:995 *:*
www httpd 3252 4 tcp4 *:80 *:*
www httpd 3251 4 tcp4 *:80 *:*
www httpd 3249 4 tcp4 *:80 *:*
www httpd 3248 4 tcp4 *:80 *:*
www httpd 3246 4 tcp4 *:80 *:*
root httpd 3244 4 tcp4 *:80 *:*
mysql mysqld 3199 29 tcp4 *:3306 *:*
root sshd 1294 4 tcp4 *:22 *:*
root perl 1276 5 tcp4 *:10000 *:*
root perl 1276 7 udp4 *:10000 *:*
root sendmail 1261 4 tcp4 *:25 *:*
root sendmail 1261 6 tcp4 *:587 *:*
root smbd 1244 36 tcp4 *:445 *:*
root smbd 1244 37 tcp4 *:139 *:*
root nmbd 1240 14 udp4 *:137 *:*
root nmbd 1240 15 udp4 *:138 *:*
root nmbd 1240 16 udp4 192.168.1.131:137 *:*
root nmbd 1240 17 udp4 192.168.1.255:137 *:*
root nmbd 1240 18 udp4 192.168.1.131:138 *:*
root nmbd 1240 19 udp4 192.168.1.255:138 *:*
root cupsd 1226 7 tcp4 *:631 *:*
avahi avahi-daem 1222 14 udp4 *:5353 *:*
avahi avahi-daem 1222 16 udp4 *:61848 *:*
root syslogd 1088 7 udp4 *:514 *:*
$
Allerdings fehlt mir glaube ich der Schritt 3 der Anleitung:
Code:
Install an OpenSSL certificate. When you install the mail/imap-uw port you should see a message about "make cert" to generate a certificate for imapd and ipop3d to use.
make cert
Be sure you use the FQDN for your mail server when it asks for "Common Name."
Da ich nicht den Port, sondern das Package installiert habe, erschien bei mir auch keine Message "make cert", usw.
Auch den Satz aus dem Install report des Packages
Code:
To create and install a new SSL certificate for imapd and ipop3d, type \"make
cert\". Or install manually in /usr/local/certs.
verstehe ich nicht. Wo soll ich denn \"make cert\" eingeben?
Ich denke, darin liegt auch der Fehler, warum es dann mit der Neueinrichtung eines Email-Accounts in Thunderbird letztendlich nicht klappt.
Ich denke mir zunächst eine neue Email-Adresse aus: superman@amd64.local
Der letzte Screenshot erschien, nachdem ich "Configure manually" gedrückt habe. Und scheinbar wird Port 143 für IMAP vorgeschlagen.
OK, wie komme ich weiter und liegt es am scheinbar noch nicht erzeugtem Zertifikat?