
Dies ist wahrscheinlich die größte Herausforderung, die ich je unter Linux hatte. Ich hätte nie gedacht, dass das Senden und Empfangen der allgegenwärtigen E-Mails so kompliziert ist!
Nach diesem Tutorial aufMailserver auf CentOS 8 mit Postfix, Dovecot, MySQL und RoundCube einrichten, ich habe versucht, einen Mailserver zu erstellen, nachdem meine vorherigen Versuche fehlgeschlagen waren, da dies eine komplette E-Mail-Suite zu erstellen schien. Ich habe alle Schritte einschließlich der Installation und Konfiguration von Dovecot, Postfix, PHP, MySQL und RoundCube mit dem Tutorial doppelt überprüft und kann mich trotzdem nicht bei RoundCube anmelden. Im Setup verwende ich MySQL, um E-Mail-Benutzer zu speichern. Datenbank und Tabellen sowie Benutzer und alles wurde korrekt eingerichtet. Der Fehler lautet:
Die Verbindung zum Speicherserver ist fehlgeschlagen.
Meine aktuelle Roundcube config.inc.php sieht wie folgt aus:
/* Local configuration for Roundcube Webmail */
$config['db_dsnw'] = 'mysql://roundcube:PassWord@localhost/roundcubemail';
$config['default_host'] = 'ssl://mail.example.com';
$config['support_url'] = '';
$config['default_port'] = 143;
$config['des_key'] = 'AQI98mYP4asPYRIGW6dm4Pj5';
$config['plugins'] = array();
$config['language'] = 'en_US';
$config['spellcheck_engine'] = 'pspell';
//-----------
// SMTP
$config['smtp_server'] = 'ssl://mail.example.com';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'LOGIN';
$config['debug_level'] = 1;
$config['smtp_debug'] = true;
$config['plugins'] = array('virtuser_query');
$config['virtuser_query'] = "SELECT Email FROM postfix_accounts.accounts_table WHERE Email = '%u'";
Der aktuelle Status von Postfix und Dovecot auf dem System:
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-05-17 02:27:38 EDT; 2h 30min ago
Process: 969 ExecStop=/usr/sbin/postfix stop (code=exited, status=0/SUCCESS)
Process: 1012 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
Process: 1010 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
Process: 1006 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
Main PID: 1087 (master)
Tasks: 7 (limit: 24008)
Memory: 26.1M
CGroup: /system.slice/postfix.service
├─ 1087 /usr/libexec/postfix/master -w
├─ 1089 qmgr -l -t unix -u
├─ 1393 tlsmgr -l -t unix -u
├─ 1394 anvil -l -t unix -u
├─ 7982 smtpd -n submission -t inet -u -o stress= -s 3 -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=no -o smtpd_tls_auth_only=yes -o smtpd_reject_unlisted_recipient=no -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject -o smtpd_relay_restrictions=permit_sasl_authenticated -o milter_macro_daemon_name=ORIGINATINGmixed -o smtpd_reject_unlisted_recipient=no
├─13355 pickup -l -t unix -u
└─19712 smtpd -n smtp -t inet -u -o stress= -s 3
May 17 04:57:33 mail.example.com postfix/submission/smtpd[7982]: connect from unknown[45.142.195.14]
May 17 04:57:35 mail.example.com postfix/smtpd[19712]: disconnect from unknown[45.142.195.13] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
May 17 04:57:44 mail.example.com postfix/submission/smtpd[7982]: disconnect from unknown[45.142.195.14] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4
May 17 04:57:59 mail.example.com postfix/submission/smtpd[7982]: connect from unknown[45.142.195.14]
May 17 04:58:01 mail.example.com postfix/anvil[1394]: statistics: max connection rate 3/60s for (submission:45.142.195.14) at May 17 04:49:05
May 17 04:58:01 mail.example.com postfix/anvil[1394]: statistics: max connection count 1 for (submission:45.142.195.14) at May 17 04:48:12
May 17 04:58:01 mail.example.com postfix/anvil[1394]: statistics: max cache size 2 at May 17 04:49:26
May 17 04:58:10 mail.example.com postfix/submission/smtpd[7982]: disconnect from unknown[45.142.195.14] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4
May 17 04:58:25 mail.example.com postfix/submission/smtpd[7982]: connect from unknown[45.142.195.14]
May 17 04:58:36 mail.example.com postfix/submission/smtpd[7982]: disconnect from unknown[45.142.195.14] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4
● dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2020-05-16 14:24:57 EDT; 14h ago
Docs: man:dovecot(1)
http://wiki2.dovecot.org/
Process: 16278 ExecStop=/usr/bin/doveadm stop (code=exited, status=0/SUCCESS)
Process: 16322 ExecStart=/usr/sbin/dovecot (code=exited, status=0/SUCCESS)
Process: 16300 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
Main PID: 16349 (dovecot)
Tasks: 5 (limit: 24008)
Memory: 6.8M
CGroup: /system.slice/dovecot.service
├─16349 /usr/sbin/dovecot
├─16373 dovecot/anvil
├─16374 dovecot/log
├─16376 dovecot/config
└─28350 dovecot/auth
May 17 02:05:48 mail.example.com dovecot[16374]: pop3-login: Disconnected: Too many bad commands (no auth attempts in 0 secs): user=<>, rip=51.178.78.153, lip=178.238.237.150, session=<G9d61tGlquozsk6Z>
May 17 02:38:47 mail.example.com dovecot[16374]: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=45.136.108.68, lip=178.238.237.150, session=<nkZmTNKllActiGxE>
May 17 02:48:21 mail.example.com dovecot[16374]: imap-login: Aborted login (no auth attempts in 7 secs): user=<>, rip=66.240.219.146, lip=178.238.237.150, session=<1QGqbtKlqKZC8NuS>
May 17 02:48:27 mail.example.com dovecot[16374]: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=66.240.219.146, lip=178.238.237.150, TLS, session=<b2IFb9Kl8rBC8NuS>
May 17 02:48:28 mail.example.com dovecot[16374]: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=66.240.219.146, lip=178.238.237.150, TLS handshaking: SSL_accept() failed: error:142090FC:SSL routines:tls_early_post_process_client_hello:unknown protocol, session=<psUVb9Kl9LFC8NuS>
May 17 02:51:01 mail.example.com dovecot[16374]: imap-login: Disconnected (no auth attempts in 156 secs): user=<>, rip=66.240.219.146, lip=178.238.237.150, TLS: Disconnected, session=<J9o0eNKlgK9C8NuS>
May 17 04:02:06 mail.example.com dovecot[16374]: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=45.136.108.23, lip=178.238.237.150, session=<knxgdtOlaActiGwX>
May 17 04:17:12 mail.example.com dovecot[16374]: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca: SSL alert number 48, session=</91qrNOlDJB/AAAB>
May 17 04:17:35 mail.example.com dovecot[16374]: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca: SSL alert number 48, session=<5ILKrdOlDpB/AAAB>
May 17 04:24:38 mail.example.com dovecot[16374]: pop3-login: Disconnected (tried to use disallowed plaintext auth): user=<[email protected]>, rip=185.234.219.224, lip=178.238.237.150, session=<GZ32xtOl+re56tvg>
Ich würde mir wirklich eine einzige Lösung dafür wünschen, anstatt so viele Schrauben und Muttern einstecken zu müssen, um einen einfachen Mailserver zum Laufen zu bringen!
Kennt jemand das Problem?
PS.
Aus irgendeinem Grund funktioniert SSL nicht, also habe ich default_host in der RoundCube-Konfiguration in localhost geändert und die beiden folgenden Zeilen in /etc/postfix/master.cf kommentiert
# -o smtpd_tls_security_level=encrypt
# -o smtpd_tls_auth_only=yes
Jetzt funktioniert RoundCube, obwohl ich anscheinend keine E-Mails von Gmail empfangen kann. Obwohl ich Schlüssel- und CRT-Dateien für Postfix angegeben habe, funktioniert es aus irgendeinem Grund nicht:
smtpd_tls_key_file = /etc/postfix/ssl/mykey.key ##SSL Key
smtpd_tls_cert_file = /etc/postfix/ssl/mycertificate.crt
Das ist also alles, was ich jetzt habe! Ich hoffe, jemand kann eine bessere Lösung dafür anbieten, als nur SSL zu deaktivieren.
Antwort1
Dies könnte für Sie funktionieren. Versuchen Sie, die Autorisierungsdaten in der Konfigurationsdatei zu entfernen, und klicken Sie auf „Senden“.
$config['smtp_user'] = '';
$config['smtp_pass'] = '';