1

Topic: Mail forwarding stop working (0.9.9)

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

Hello,
We've updated iRedMail from version 0.9.5-1 to 0.9.9. Unfortunately, after the update, we detected a problem with the user mail forwarding.
The problem seems to be in option "Enable mail forwarding" in iredadmin. We can not change the settings of this button, after saving it returns to its previous state.
In case the account has already deselected the forwarding doesn't work.

Apr 15 09:58:04 poczta uwsgi: poczta.wodbud.com.pl [pid: 23492|app: 1|req: 23/124] 85.221.242.78 () {62 vars in 1459 bytes} [Mon Apr 15 09:58:03 2019] POST /iredadmin/profile/user/forwarding/test@wodbud.com.pl => generated 0 bytes in 308 msecs (HTTP/1.1 303) 3 headers in 257 bytes (2 switches on core 0)
Apr 15 09:58:06 poczta uwsgi: poczta.wodbud.com.pl [pid: 23492|app: 1|req: 24/125] 85.221.242.78 () {56 vars in 1322 bytes} [Mon Apr 15 09:58:04 2019] GET /iredadmin/profile/user/forwarding/test@wodbud.com.pl?msg=UPDATED => generated 20591 bytes in 2222 msecs (HTTP/1.1 200) 2 headers in 145 bytes (2 switches on core 0)
Apr 15 09:58:06 poczta uwsgi: poczta.wodbud.com.pl [pid: 23492|app: 1|req: 24/125] 85.221.242.78 () {56 vars in 1322 bytes} [Mon Apr 15 09:58:04 2019] GET /iredadmin/profile/user/forwarding/test@wodbud.com.pl?msg=UPDATED => generated 20591 bytes in 2222 msecs (HTTP/1.1 200) 2 headers in 145 bytes (2 switches on core 0)

----

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

2

Re: Mail forwarding stop working (0.9.9)

kamil.szymkowiak wrote:

We've updated iRedMail from version 0.9.5-1 to 0.9.9. Unfortunately, after the update, we detected a problem with the user mail forwarding.

- Did you skip any iRedMail releases between 0.9.5-1 and 0.9.9?
- Did you correctly apply all SQL structure related changes mentioned in iRedMail upgrade tutorials?

3

Re: Mail forwarding stop working (0.9.9)

1. No, version to version (0.9.5.1->0.9.6->etc)
2. No, step by step. I checked the second time if I missed something. Can you indicate which change may have caused this problem?
Thanks smile

4

Re: Mail forwarding stop working (0.9.9)

kamil.szymkowiak wrote:

Can you indicate which change may have caused this problem?

I don't know without checking the SQL structure and debug iRedAdmin-Pro source code.

1: is it possible to give me direct ssh access with root privilege to debug it?
2: if this is not caused by iRedMail and iRedAdmin-Pro, i will charge one support ticket, is it ok for you?

5

Re: Mail forwarding stop working (0.9.9)

We detected that the problem is related to 3 of our instances (2 updated earlier). These are production servers, so we cannot grant root access.
Of course, I can provide all the information you need

6

Re: Mail forwarding stop working (0.9.9)

I'm sorry that i can not troubleshoot without debug iRedAdmin-Pro source code in this case. sad

7

Re: Mail forwarding stop working (0.9.9)

I understand. We will create environment copy for repair purposes.
Further conversations via email?

8

Re: Mail forwarding stop working (0.9.9)

Confirmed it's a bug of the latest iRedAdmin-Pro-LDAP-3.5. Patch attached.

diff -r bd5a8e306e56 libs/ldaplib/user.py
--- a/libs/ldaplib/user.py    Wed Apr 24 10:17:58 2019 +0800
+++ b/libs/ldaplib/user.py    Wed Apr 24 11:39:26 2019 +0800
@@ -1621,9 +1621,9 @@
     elif profile_type == 'forwarding':
         # Update 'enabledService=forwarding'.
         if 'forwarding' in form:
-            user_enabled_services = iredutils.add_element_to_list(l=user_enabled_services, e='forwarding')
+            user_enabled_services = iredutils.add_element_to_list(l=user_enabled_services, e='forward')
         else:
-            user_enabled_services = iredutils.remove_element_from_list(l=user_enabled_services, e='forwarding')
+            user_enabled_services = iredutils.remove_element_from_list(l=user_enabled_services, e='forward')
 
         # Get mail forwarding addresses.
         forwardingAddresses = list(set([str(v).lower()