Topic: [SOLVED] bug: "per-user" relay in ira-Pro-LDAP (1.5.0) not working

setting up a new relay/transport for an user gives "saved" but setting is missing

need to add new attribute "mtaTransport" via phpldap to make setting work


Re: [SOLVED] bug: "per-user" relay in ira-Pro-LDAP (1.5.0) not working

Confirmed. Thanks for your feedback.

Here's patch to fix it:

diff -r 4cf524236552 libs/ldaplib/user.py
--- libs/ldaplib/user.py    Tue May 03 10:07:17 2011 +0800
+++ libs/ldaplib/user.py    Wed May 04 00:22:32 2011 +0800
@@ -833,10 +833,8 @@
             if self.transport == '':
                 # Remove attr.
                 mod_attrs += [(ldap.MOD_REPLACE, 'mtaTransport', None)]
-            elif self.transport != self.defaultTransport:
+            else:
                 mod_attrs += [(ldap.MOD_REPLACE, 'mtaTransport', self.transport)]
-            else:
-                pass
             # Enabled services.
             self.enabledService = [

Steps to apply this patch:

- Save above code as file "transport.patch".
- Upload to your server which has iRedAdmin-Pro-LDAP-1.5.0 running. We assume it's /tmp/transport.patch.
- Change current working directory to root directory of iRedAdmin-Pro-LDAP-1.5.0. e.g.

# cd /var/www/iRedAdmin-Pro-LDAP-1.5.0/

- Verify patch, make sure it can be applied without error:

# patch -p0 --dry-run < /tmp/transport.patch
patching file libs/ldaplib/user.py

If you got same output message as above, it's safe to apply it with below command. If not, please ***STOP*** here and do ***NOT*** try below command.

- Patch it:

# patch -p0 < /tmp/transport.patch
patching file libs/ldaplib/user.py


Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee