Login Error with Piler 1.4.2 with MailCow integration

Issue #1270 wontfix
simatec iobroker created an issue

Hello Janos,

When I roll out a Docker container and add the Mailcow integration, the login is only possible using the mail addresses from Mailcow.

If I want to log in e.g. as admin or auditor, I get an http 500 error.

Is there already a fix or workaround for this?

Here is my repo to the Docker piler
https://github.com/simatec/piler-docker

thrown in /etc/piler/auth-mailcow.php on line 47" while reading response header from upstream, client: 192.168.75.233, server: archiv.yyy.de, request: "POST /login.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "archiv.xxxxx.de", referrer: "https://archiv.yyy.de/" 2023/01/12 13:32:13 [error] 65#65: *27 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/piler/auth-mailcow.php:47 Stack trace: #0 /var/piler/www/model/user/auth.php(132): query_mailcow_for_email_access() https://github.com/simatec/piler-docker/issues/1 /var/piler/www/model/user/auth.php(49): ModelUserAuth->checkFallbackLogin() https://github.com/simatec/piler-docker/issues/2 /var/piler/www/controller/login/login.php(48): ModelUserAuth->checkLogin() #3 /var/piler/www/system/front.php(36): ControllerLoginLogin->index() #4 /var/piler/www/system/front.php(14): Front->execute() #5 /var/piler/www/index.php(114): Front->dispatch() #6 {main}

Comments (12)

  1. Janos SUTO repo owner

    I’m confused. The stack trace says there’s an issue in /var/piler/www/model/user/auth.php in function query_mailcow_for_email_access(), however I don’t think that function should exist on the piler master branch. And how /etc/piler/auth-mailcow.php content is even called?

  2. simatec iobroker reporter

    If I add the following content to config-site.php, I get the "http error 500" when I login as admin or auditor

    Login with a mail address from Mailcow is possible. Only with admin@local or auditor@local not.

    The source comes directly from Mailcow

    https://docs.mailcow.email/third_party/mailpiler/third_party-mailpiler_integration/

    $config['MAILCOW_API_KEY'] = 'YOUR_READONLY_API_KEY';

    $config['MAILCOW_SET_REALNAME'] = true; // when not specified, then default is false

    $config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';

    include('auth-mailcow.php');

    In version 1.3.x the integration worked without problems

  3. simatec iobroker reporter

    Her is the auth-mailcow.php

    https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php

  4. Janos SUTO repo owner

    Try to disable the mailcow stuff, and check if you can login with admin@local account. Anyway, it’s pretty much a core feature that is known to work, so I suspect it’s a mailcow issue.

  5. Janos SUTO repo owner

    Great, then we isolated the problem to mailcow. I suggest you to contact the mailcow developers to investigate the issue. Or if it’s an empty archive at the moment, then let me check it via ssh after re-enabling the mailcow support.

  6. Janos SUTO repo owner

    OK, then probably your best bet is to contact the mailcow developers to check what’s wrong.

  7. Log in to comment