January 17, 20224 yr Meine Postfix/Dovecot installation hat nicht funktioniert. Fehlermeldung war, dass z.B. warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' warning: virtual_alias_domains: mysql:/etc/postfix/mysql-virtual_alias_maps.cf: table lookup problem warning: virtual_alias_domains lookup failure Temporary lookup failure Erst nachdem ich in den betreffenden .cf dateien localhost durch 127.0.0.1 ersetzt hatte, hat es funktioniert. In der /etc/hosts ist eingetragen 127.0.0.1 localhost weswegen ich mich frage, warum es nicht funktioniert mit localhost.
January 18, 20224 yr Author Was muss ich denn ändern, damit es mit der Einstellung localhost funktioniert? Ich frage deswegen, weil ich Froxlor eigentlich nach der Anleitung eingerichtet habe und mir die Konfigurationsdateien so kopiert habe, wie es von den Froxlor templates angezeigt wurde. Und da ist es natürlich doof wenn es nicht funktionniert. Ich musste übrigens auch in den Dovecot-Einstellungen erst disable_plaintext_auth = no einstellen, damit es funktioniert hat. Vielleicht kann man das in den templates irgendwie berücksichtigen?
January 18, 20224 yr 8 minutes ago, matsy said: Und da ist es natürlich doof wenn es nicht funktionniert. Tut es aber wunderbar...
January 18, 20224 yr Author 1 hour ago, d00p said: Tut es aber wunderbar... Bei mir leider nur mit den besagten Änderungen.
January 18, 20224 yr Ich kann dir nur sagen, dass es mit plain/frischer installation wunderbar funktioniert. Sorry.
January 18, 20224 yr Author Ich hatte ja auch erwartet, dass es funktioniert. Darauf gekommen bin ich, da ein andere User hier das gleiche Problem hatte: Ich habe dann meine alten Configs vom umgezogenen Server angeschaut, und auch da war der localhost durch 127.0.0.1 ersetzt. Das muss also schon damals mit localhost nicht funktioniert haben.
January 18, 20224 yr musste halt einfach mal in der mysql-server config schauen wie der eingerichtet ist
January 18, 20224 yr Author Ich habe jetzt einmal die mysql config verändert. Folgende Ausgaben müssten doch bestätigen, dass eine erfolgreiche Socketverbindung stattfindet, oder? # mysqladmin -u root -p --socket=/var/run/mysqld/mysqld.sock version Enter password: mysqladmin Ver 9.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu on x86_64 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Server version 10.3.31-MariaDB-0+deb10u1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 1 min 24 sec # mysql -u root -p -S /var/run/mysqld/mysqld.sock Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 136 Server version: 10.3.31-MariaDB-0+deb10u1 Debian 10 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
January 18, 20224 yr Author 1 hour ago, d00p said: steht ja da Dann sollte es auch funktionieren, oder?. Tut es aber nicht. Ich habe alle hosts Einträge in den .cf Dateien wieder auf localhost umgestellt und bekomme: postfix/smtpd[27766]: connect from XX.XX.de[XXX.XXX.XXX.XXX] postfix/trivial-rewrite[27779]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) postfix/trivial-rewrite[27779]: warning: mysql:/etc/postfix/transport_maps.cf lookup error for "*" postfix/trivial-rewrite[27779]: warning: mysql:/etc/postfix/transport_maps.cf lookup error for "*" postfix/trivial-rewrite[27779]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) postfix/trivial-rewrite[27779]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql-virtual_alias_maps.cf: table lookup problem postfix/trivial-rewrite[27779]: warning: virtual_alias_domains lookup failure postfix/trivial-rewrite[27779]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql-virtual_alias_maps.cf: table lookup problem postfix/trivial-rewrite[27779]: warning: virtual_alias_domains lookup failure postfix/trivial-rewrite[27779]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql-virtual_alias_maps.cf: table lookup problem postfix/trivial-rewrite[27779]: warning: virtual_alias_domains lookup failure postfix/smtpd[27766]: NOQUEUE: reject: RCPT from XX.XX.de[XXX.XXX.XXX.XXX]: 451 4.3.0 <XXX@XX.de>: Temporary lookup failure; from=<XXX@XX.de> to=<YYY@YY.de> proto=ESMTP helo=<XXX@XX.de> Mit 127.0.0.1 funktioniert es.
January 18, 20224 yr mach doch bitte mal einen connect versuch mit dem 'froxlor' user und dem zugehörigen passwort (welches beides in den configs gesetzt ist), einmal mit -h localhost und einmal mit -h 127.0.0.1
January 18, 20224 yr Author Folgende Ergebnisse: # mysql -u froxlor -p -S /var/run/mysqld/mysqld.sock Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2953 Server version: 10.3.31-MariaDB-0+deb10u1 Debian 10 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> Ctrl-C -- exit! Aborted # mysqladmin -u froxlor -p --socket=/var/run/mysqld/mysqld.sock version Enter password: mysqladmin Ver 9.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu on x86_64 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Server version 10.3.31-MariaDB-0+deb10u1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 2 hours 26 min 6 sec Threads: 12 Questions: 132348 Slow queries: 0 Opens: 331 Flush tables: 1 Open tables: 321 Queries per second avg: 15.097 # mysqladmin -u froxlor -p -h localhost version Enter password: mysqladmin Ver 9.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu on x86_64 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Server version 10.3.31-MariaDB-0+deb10u1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 2 hours 28 min 36 sec Threads: 12 Questions: 134164 Slow queries: 0 Opens: 336 Flush tables: 1 Open tables: 326 Queries per second avg: 15.047 # mysqladmin -u froxlor -p -h 127.0.0.1 version Enter password: mysqladmin Ver 9.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu on x86_64 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Server version 10.3.31-MariaDB-0+deb10u1 Protocol version 10 Connection 127.0.0.1 via TCP/IP TCP port 3306 Uptime: 2 hours 28 min 47 sec Threads: 12 Questions: 134214 Slow queries: 0 Opens: 336 Flush tables: 1 Open tables: 326 Queries per second avg: 15.034
January 18, 20224 yr Schau doch am besten im IRC oder Discord vorbei - da kann man etwas "zügiger" helfen...so zieht sich das ja unnötig in die länge bei jeder nachfrage
January 18, 20224 yr Author 24 minutes ago, d00p said: ja...sieht doch auch als geht alles... Hab nun folgendes gefunden: https://workaround.org/ispmail/jessie/postfix-mysql Quote You may be tempted to write “localhost” instead of “127.0.0.1”. Don’t do that because there is indeed a difference in this context. “localhost” will make Postfix look for the MySQL socket file and it can’t find it within it’s chroot jail at /var/spool/postfix because it is at /var/run/mysqld/mysqld.sock by default. But if you tell Postfix to use 127.0.0.1 as described here you make Postfix use a TCP connection to port 3306 on localhost which is working even if Postfix is jailed. Auf Debian scheint der Postfix standardmäßig im chroot jail bzw. steht in der Froxlor Konfig auch: # # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master" or # on-line: http://www.postfix.org/master.5.html). # # Do not forget to execute "postfix reload" after editing this file. # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - y - - smtpd Kann das die Erklärung sein, dass es mit localhost nicht funktionieren kann?
January 18, 20224 yr kann schon, aber mit nem chroot'eten postfix müsste man dem auch das mysql-socket in seinem chroot bereitstellen damit das geht - du fährst also am besten einfach 127.0.0.1 zu benutzen (zumindest für postfix)
January 18, 20224 yr Author 25 minutes ago, d00p said: mit nem chroot'eten postfix müsste man dem auch das mysql-socket in seinem chroot bereitstellen Ich verstehe, das hört sich logisch an. Vielleicht probiere ich das mal irgendwann aus.
September 16, 20223 yr Für mich war auch der Patch in allen /etc/postfix/mysql*.cf notwendig: hosts = 127.0.0,1 Hintergrund: Das von mir aufgesetzte Debain 11 ist Dual-Stack (IPv4 und IPv6). localhost wird von sowohl zu IPv4 als auch zu IPv6 aufgelöst, obwohl in /etc/hosts nur 127.0.0.1 steht: # host localhost localhost has address 127.0.0.1 localhost has IPv6 address ::1 MariaDB hat immer noch ein Thema mit Dual Stack. Nun ist es IMHO gute Praxis, MariaDB normalerweise nur lokalen Zugriff zu gewähren. Das wird (best practice) erreicht durch bind-address = 127.0.0.1 Egal ob ich in /etc/mysql/mariadb.conf.d/50-server.cnf als bind-address 'localhost' oder '127.0.0.1' eingebe, MariaDB lauscht immer nur auf IPv4. Falls in den mysql_*.cf jetzt 'hosts = localhost' steht, priorisiert der Mysql-Client anscheinend die IPv6 Adresse, kann darunter jedoch den MariaDB-Server nicht erreichen und bricht ab, ohne IPv4 versucht zu haben. Statt dessen versucht er nun, MariaDB über den Standard-Socket zu erreichen. Der Socket ist aber im chroot-Jail nicht erreichbar. Das führt zur verwirrenden Fehlermeldung (can't connect through socket obwohl doch localhost angegeben ist). Daher sollten wir in Erwägung ziehen, in den Debian 11 Templates "hosts = 127.0.0.1" statt des aktuellen "localhost" zu verwenden.
September 16, 20223 yr der datenbank host wird halt bei der installation von froxlor angegeben, du kannst ihn doch in der lib/userdata.inc.php einfach anpassen. Die Config-Templates nehmen auch nur diese Settings, beachte bitte das sich aber die "grundconfigs" der dienste nicht automatisch erneuert, da dies normalerweise nur 1x notwendig ist beim setup.
September 16, 20223 yr Interessanter Weise hat PHP kein Thema mit dem Dual Stack. Dort funktioniert die Konfiguration "localhost". Entweder wird hier IPv4 priorisert oder beide Protokolle ausprobiert. Es würde ja sonst auch sofort auffallen. Postfix handhabt das halt anders. Nun gut, hoffen wir, der Thread hilft, dass der Workaround schnell gefunden wird.
Create an account or sign in to comment