1

Topic: Mailing list - internal server error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.2 OPENLDAP edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Debian Bullseye
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes, version 5.4.1
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,

when i try to add or view members of a mailing list, i'll get an internal server error. The log says:

iredadmin: [123.45.67.89] GET /iredadmin/profile/maillist/members/list@mydomain.xy 500 202 "https://myserver.mydomain.xy/iredadmin/search"

Editing profiles and viewing moderators is possible.
The list isn't a subscribable mailing list.

Any thoughts on that?

Kind regards

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Mailing list - internal server error

Is "mlmmjadmin" service running?

3

Re: Mailing list - internal server error

Yes, active and running.
/var/log/mlmmjadmin/mlmmjadmin.log is empty btw ...

-rw-r----- 1 root adm 0  7. Mär 00:00 /var/log/mlmmjadmin/mlmmjadmin.log

4

Re: Mailing list - internal server error

jobu wrote:

Yes, active and running.

How did you verify it?

- Any error in /var/log/syslog?
- Try to restart rsyslog and mlmmjadmin services, then reproduce the issue again. Check log files to find related info.

5

Re: Mailing list - internal server error

How did you verify it?

By "service mlmmjadmin restart", i now followed your advice ...

# service rsyslog restart
# service rsyslog status
● rsyslog.service - System Logging Service
     Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-03-17 08:12:11 CET; 8s ago
TriggeredBy: ● syslog.socket
       Docs: man:rsyslogd(8)
             man:rsyslog.conf(5)
             https://www.rsyslog.com/doc/
   Main PID: 1942003 (rsyslogd)
      Tasks: 4 (limit: 19138)
     Memory: 912.0K
        CPU: 7ms
     CGroup: /system.slice/rsyslog.service
             └─1942003 /usr/sbin/rsyslogd -n -iNONE

Mär 17 08:12:11 myserver systemd[1]: Starting System Logging Service...
Mär 17 08:12:11 myserver rsyslogd[1942003]: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd.  [v8.2102.0]
Mär 17 08:12:11 myserver systemd[1]: Started System Logging Service.
Mär 17 08:12:11 myserver rsyslogd[1942003]: [origin software="rsyslogd" swVersion="8.2102.0" x-pid="1942003" x-info="https://www.rsyslog.com"] start

... and ...

# service mlmmjadmin restart
# service mlmmjadmin status
● mlmmjadmin.service - RESTful API server used to manage mlmmj myservering list manager
     Loaded: loaded (/lib/systemd/system/mlmmjadmin.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-03-17 08:12:41 CET; 5s ago
    Process: 1942103 ExecStartPre=/bin/mkdir -p /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
    Process: 1942104 ExecStartPre=/bin/chown mlmmj:mlmmj /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
    Process: 1942105 ExecStartPre=/bin/chmod 0755 /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
   Main PID: 1942106 (uwsgi)
      Tasks: 6 (limit: 19138)
     Memory: 16.5M
        CPU: 107ms
     CGroup: /system.slice/mlmmjadmin.service
             ├─1942106 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
             ├─1942107 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
             ├─1942108 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
             ├─1942109 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
             ├─1942110 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
             └─1942111 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid

Mär 17 08:12:41 myserver mlmmjadmin[1942106]: mapped 437616 bytes (427 KB) for 5 cores
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: *** Operational MODE: preforking ***
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x55ec8c564e40 pid: 1942106 (default app)
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: *** uWSGI is running in multiple interpreter mode ***
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: spawned uWSGI master process (pid: 1942106)
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: spawned uWSGI worker 1 (pid: 1942107, cores: 1)
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: spawned uWSGI worker 2 (pid: 1942108, cores: 1)
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: spawned uWSGI worker 3 (pid: 1942109, cores: 1)
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: spawned uWSGI worker 4 (pid: 1942110, cores: 1)
Mär 17 08:12:41 myserver mlmmjadmin[1942106]: spawned uWSGI worker 5 (pid: 1942111, cores: 1)

The error stays the same, but now there is a little more information in /var/log/syslog:

Mar 17 08:14:44 mail iredadmin: [123.45.67.68] GET /iredadmin/profile/maillist/members/list@myserver.mydomain.xy 500 202 "https://myserver.mydomain.xy/iredadmin/search"
Mar 17 08:14:49 mail roundcube: <nq7fiaqh> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain,o=domains,dc=mydomain,dc=xy. Bad search filter (POST /mail/?_task=mail&_action=autocomplete)

6

Re: Mailing list - internal server error

jobu wrote:

Mar 17 08:14:44 mail iredadmin: [123.45.67.68] GET /iredadmin/profile/maillist/members/list@myserver.mydomain.xy 500 202 "https://myserver.mydomain.xy/iredadmin/search"

It says "500" (internal server error). Any related error in /var/log/syslog?

7

Re: Mailing list - internal server error

It says "500" (internal server error). Any related error in /var/log/syslog?

No, nothing else in the logs ...
What about the "Bad search filter (POST /mail/?_task=mail&_action=autocomplete)"?

And why did you remove the buy me a coffee-button? wink

8

Re: Mailing list - internal server error

jobu wrote:

What about the "Bad search filter (POST /mail/?_task=mail&_action=autocomplete)"?

It's a Roundcube "issue", it sends ldap query while user input in recipient address is still incomplete, which causes invalid ldap search filter.

jobu wrote:

And why did you remove the buy me a coffee-button?

Because not many people bought it, so let's save some space on forum web page.

Please try to get some related error log in log files under /var/log/, otherwise i cannot help much.

9 (edited by jobu 2023-04-24 16:08:39)

Re: Mailing list - internal server error

I have an update for the problem - when i try to add a member i'm getting this error:

Fehler: UnboundLocalError("local variable 'r' referenced before assignment") 

/var/log/syslog says ...

Apr 24 07:59:29 mail iredadmin: [12.34.56.78] POST /iredadmin/profile/maillist/members/redaktion-alle@sub.mydomain.xyz 303 358 "https://mail.mydomain.xyz/iredadmin/profile/maillist/members/redaktion-alle@sub.mydomain.xyz?msg=Unboun
dLocalError(%22local%20variable%20%27r%27%20referenced%20before%20assignment%22)"
Apr 24 07:59:30 mail iredadmin: [12.34.56.78] GET /iredadmin/profile/maillist/members/redaktion-alle@sub.mydomain.xyz?msg=UnboundLocalError(%22local%20variable%20%27r%27%20referenced%20before%20assignment%22) 200 41732 "https://mail.tu-da
rmstadt.de/iredadmin/profile/maillist/members/redaktion-alle@sub.mydomain.xyz?msg=UnboundLocalError(%22local%20variable%20%27r%27%20referenced%20before%20assignment%22)"

10

Re: Mailing list - internal server error

jobu wrote:

Fehler: UnboundLocalError("local variable 'r' referenced before assignment")

Looks like a bug of iRedAdmin-Pro or mlmmjadmin, but i can not reproduce this issue locally.

Which mlmmjadmin release are you running?

11

Re: Mailing list - internal server error

ZhangHuangbin wrote:

Which mlmmjadmin release are you running?

# apt show mlmmj
Package: mlmmj
Version: 1.3.0-4

12

Re: Mailing list - internal server error

I mean "mlmmjadmin", not "mlmmj".
Please run command below to check installed version:

ls -dl /opt/mlmmjadmin*

13

Re: Mailing list - internal server error

# ls -dl /opt/mlmmjadmin*
lrwxrwxrwx  1 root  root    21 13. Jan 07:53 /opt/mlmmjadmin -> /opt/mlmmjadmin-3.1.5
drwxr-xr-x 11 mlmmj mlmmj 4096 13. Jan 13:22 /opt/mlmmjadmin-3.1.5

14

Re: Mailing list - internal server error

Can you reproduce this issue on our online demo?
https://www.iredmail.org/admin_demo.html

15

Re: Mailing list - internal server error

No, i can't - so thank your for you always trying to help!

16

Re: Mailing list - internal server error

Maybe it's cause due to data integrity on your server, but I cannot help figure it out without direct ssh access with root privilege.

17

Re: Mailing list - internal server error

FYI - the error is gone since the lastest update to iRedMail 1.6.3.

Best regards and thank you!