1

Topic: Informational - extending iredadmin

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.8.6
- Linux/BSD distribution name and version: RHEL 6.5 (Santiago)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): OpenLDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Nope
- Related log if you're reporting an issue:
====
We would like to add more fields when adding new users in iRedadmin,
which function we currently implement by directly modifying ldap entries through bash scripts
(which is part of a replication schema between two iredmail implementation).
Is there a guideline to follow to modify iredadmin fields and layout?
This would help a lot.

----

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

2

Re: Informational - extending iredadmin

Maybe you can check iRedMail LDAP schema file (i guess you already did):
https://bitbucket.org/zhb/iredmail/src/ … ail.schema

I don't quite sure what kind of help you're looking for. For LDAP, you just need to add required ldap attributes and values.

BTW, in upcoming iRedAdmin-Pro release, you can manage additional LDAP attributes by defining parameter "ADDITIONAL_MANAGED_USER_ATTRIBUTES". Below is the detailed comment:

# Additional LDAP attribute names of user object you want to manage.
# Format:
#
#   {'attribute_name': {'desc': 'A short description of this attribute',
#                       'allowed_domains': [...],
#                       'properties': [...]}}
#    'attribute_name2': {...}}
#
# Arguments
# ----------
#
# desc: string. [optional]
#       a short description of this attribute.
#       If not present, defaults to show attribute name.
#
# allowed_domains: list. [optional]
#       a list of domain names which are allowed to use this attribute.
#       if not present, defaults to allow all domains to use the attribute.
#
# properties: list. [optional]
#       a list of pre-defined property names (string).
#       If not present, defaults to ['string'].
#
# Properties
# ----------
#
# - 'require_global_admin': attribute is only managed by global domain admin.
# - 'multivalue': indicates attribute may contain multiple values.
#           If not present, defaults to single value.
#
# - 'string': indicates attribute value is short text. will be displayed as
#           HTML tag "<input type='text'>".
# - 'text': indicates attribute value is long text. will be displayed as HTML
#           "<textarea>".
#
# Warning: 'string', 'text', 'integer' cannot be used at the same time for same
#          attribute.
#
# Sample settings:
#
#   {'carLicense': {}}      # The minimalist setting, just attribute name.
#
#   {'carLicense': {'desc': 'Car License',
#                   'properties': ['string'],
#                   'allowed_domains': ['example.com', 'test.com']}}
ADDITIONAL_MANAGED_USER_ATTRIBUTES = {}

3

Re: Informational - extending iredadmin

Let me elaborate a little.
When creating a mail user, we need to associate a bunch of related info which depends on the mail user.
When creating the mail user using iRedAdmin, these extra attributes will not be inserted by default,
so right now, using shell scripting,
we insert this information in a database as soon as the mail user creation request arrives
and afterwards we periodically execute direct modifications on ldap to insert this extra info(using ldapmodify).

I think it would be best if this information was entered through extra input fields in iRedAdmin,
so I am currently checking how to add this functionality,
instead of executing the above process.

As far as I ve been through iRedadmin 3.0 which we use, it's built on webpy framework,
so my question is, in order to add more ldap input fields in user creation, what steps should I follow next?

4

Re: Informational - extending iredadmin

mpoudim wrote:

so my question is, in order to add more ldap input fields in user creation, what steps should I follow next?

The steps you explained do the right things for you, i'm not sure what "next" steps you're looking for. sad

The iRedAdmin-Pro feature mentioned in my previous reply does exactly what you want while creating new user, and you can modify those extra attributes in user profile page.

5 (edited by mpoudim 2016-10-10 21:09:39)

Re: Informational - extending iredadmin

You are completely right, since the fields are editable this feature in iRedAdmin-Pro is exactly what I had in mind.
The thing is that this would force us to migrate to latest iRedMail from current  0.8.6 , in order to install latest iRedAdmin.
In any case circumstances lead me to try to implement the feature,
by adjusting the currently installed iRedAdmin version 3.0
since the number of added input fields that I need is constant.

6

Re: Informational - extending iredadmin

You have clear mind about what you need to do, so i think i'm done in this case. Good luck. smile


BTW, upgrading from iRedMail-0.8.6 to the latest iRedMail-0.9.5-1 should be easy, maybe you should give it a try.

7

Re: Informational - extending iredadmin

ZhangHuangbin wrote:

You have clear mind about what you need to do, so i think i'm done in this case. Good luck. smile


BTW, upgrading from iRedMail-0.8.6 to the latest iRedMail-0.9.5-1 should be easy, maybe you should give it a try.

It is set up in something like a failover setup (two load balancers + two mail hosts ) so it's not so straightforward,
or at least not for me.
Anyway, thank you!