Da hast übrigens noch einen notwendigen Schritt ausgelassen:
Add IMAP server name (or IP-addresse) used in EGroupware in Mail site configuration: Admin > Applications > Mail > Site configuration
Sonst trägt die EGroupware das Benutzertoken nicht in die IMAP Metadaten ein (war aber nicht Dein Problem mit UCS).
Ralf
Das lasse ich erst mal. Wenn lediglich die Inbox aktualisiert wird würde das vorerst mal ausreichen.
Nur vergessen hier zu erwähnen. Dort ist:
com01.test.lan
eingetragen.
Die conf-Datei für 2.3+ habe ich entfernt und die /etc/dovecot/conf.d/99-egroupware-push.conf wie folgt angelegt:
mail_attribute_dict = file:%h/dovecot-metadata
protocol imap {
imap_metadata = yes
}
protocol lmtp {
mail_plugins = $mail_plugins notify push_notification
}
plugin {
push_notification_driver = ox:url=http://Bearer:AbCdEfGhIjK@com01.test.lan/egroupware/push user_from_metadata
}
angelegt und neu gestartet.
Allerdings erhalte ich trotzdem einen Fehler im Log
Jan 22 14:39:07 com01 dovecot[5775]: lmtp(5840): Error: push-notification-ox: Error when sending notification: Redirect refused
Ich habe auch schon, wie im Forum gefunden vor com01 noch ein http:// gestellt aber dann kommt ein Fehler das er den Namen nicht auflösen kann. Also denke ich mal ohne http:// rechts vom @
Dann würde ich mal sagen, irgendwas sendet einen Redirect - vermutlich auf https - wenn Du die URL aufrufst.
Führ doch einfach mal folgendes auf dem Host aus:
curl -i http://Bearer:AbCdEfGhIjK@com01.test.lan/egroupware/push
curl -i https://Bearer:AbCdEfGhIjK@com01.test.lan/egroupware/push
curl -i http://Bearer:AbCdEfGhIjK@127.0.0.1/egroupware/push
Wenn es ein https redirect ist, nimm einfach die https-URL, der Dovecot 2.3 kann das.
Das Bearer Token des Push Servers hier zu posten ist keine gute Idee, damit kann man den Push Server beliebige Befehle an die EGroupware Clients senden lassen
Ralf
HTTP/1.1 301 Moved Permanently
Date: Mon, 24 Jan 2022 07:34:40 GMT
Server: Apache/2.4.38 (Univention)
Location: https://com01.test.lan/egroupware/push
Content-Length: 330
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://com01.test.lan/egroupware/push">here</a>.</p>
<hr>
<address>Apache/2.4.38 (Univention) Server at com01.test.lan Port 80</address>
</body></html>
TTP/1.1 500 Internal Server Error
Date: Mon, 24 Jan 2022 07:35:30 GMT
Server: nginx/1.20.2
Content-Type: text/html
Content-Length: 0
Via: 1.1 com01.test.lan
Connection: close
HTTP/1.1 301 Moved Permanently
Date: Mon, 24 Jan 2022 07:36:11 GMT
Server: Apache/2.4.38 (Univention)
Location: https://127.0.0.1/egroupware/push
Content-Length: 320
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://127.0.0.1/egroupware/push">here</a>.</p>
<hr>
<address>Apache/2.4.38 (Univention) Server at 127.0.0.1 Port 80</address>
</body></html>
Also obwohl bei dem curl-Befehl mit https ein Fehler kommt?
Der gepostete Token ist der Anfang unseres Alphabetes und entspricht nicht dem tatsächlichen Token.
root@com01:~# docker logs -f --tail=1 egroupware-nginx
2022/01/24 08:57:27 [error] 23#23: *4 FastCGI sent in stderr: "PHP message: PHP Deprecated: Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated. in /usr/share/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 352
PHP message: PHP Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /usr/share/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 169
PHP message: PHP Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /usr/share/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 169
PHP message: PHP Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /usr/share/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 169
PHP message: PHP Deprecated: Not specifying the signer and key to Builder#getToken() is deprecated. Please move the arguments from Builder#sign() to Builder#getToken(). in /usr/share/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 524"
while reading response header from upstream, client: 172.16.1.1, server: _, request: "POST /egroupware/json.php?menuaction=EGroupware\Status\Ui::ajax_refresh HTTP/1.1", upstream: "fastcgi://172.16.1.2:9000", host: "com01.test.lan", referrer: "https://com01.test.lan/egroupware/index.php?cd=yes"
Nein, war während fetchmail Mails geholt hat. Habe jetzt nochmal fetchmail gestoppt. Den Log gestartet:
root@com01:~# docker logs -f --tail=1 egroupware-nginx
und uf einer zweiten Konsole:
curl -i https://Bearer:AbCdEfGhIjK@com01.test.lan/egroupware/push
ausgeführt.
Da taucht im Log aber nichts auf.
Ok, fetchmail läuft wieder. Log gestartet und Mail von extern gesendet:
Datei /etc/dovecot/conf.d/99-egroupware-push.conf:
mail_attribute_dict = file:%h/dovecot-metadata
protocol imap {
imap_metadata = yes
}
protocol lmtp {
mail_plugins = $mail_plugins notify push_notification
}
plugin {
push_notification_driver = ox:url=http://Bearer:AbCdEfGhIjKlNm@com01.test.lan/egroupware/push user_from_metadata
}
Wenn die Mail rein kommt taucht im normalen Syslog nach wie vor die Meldung:
Jan 24 10:18:38 com01 dovecot[763]: lmtp(5771): Error: push-notification-ox: Error when sending notification: Redirect refused
auf. Im Fenster in welchem “root@com01:~# docker logs -f --tail=1 egroupware-nginx” läuft ist keine neue Meldung hinzu gekommen.
ok, auf https geändert. VM neu gestertet und gleiches Spiel nochmal. Im “docker logs -f --tail=1 egroupware-nginx” taucht zwar noch immer nichts auf. Die Fehlermeldung im Syslog ist nun aber weg.
Im während des Tests angemeldeten Mail-Empfänger ist die Mail alleine aufgetaucht und gelb unterlegt. Das werte ich mal als “funktioniert”
Was ich nicht verstehe ist was jetzt anders ist. Mit https hatte ich es schon einmal versucht.
In der Zwischenzeit habe ich jedoch (nach Webrecherche) in der /etc/dovecot/conf.d/10-mail.conf die Zeile:
mail_plugins = $mail_plugins acl quota notify push_notification
um die letzten beiden Parameter erweitert. Eventuell liegt es ja daran.