1 (edited by nicolasfo 2017-05-23 15:54:29)

Topic: [SOLVED] Unable to uncheck "Member of Mail Aliases"

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,
I changed default settings of a domain when I create a new account : add automatically this new account to an alias (Default mail group(s) of new user).
If I want to remove an account from an alias, I uncheck the box in front of the alias name, clik "Save changes" and the box come back checked again.
If I want to really remove the account from member of an alias, I had to modify the MySQL DB manually.

On the other hand, add an account to an alias works fine.

Thanks

Nicolas

----

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

2

Re: [SOLVED] Unable to uncheck "Member of Mail Aliases"

nicolasfo wrote:

I changed default settings of a domain when I create a new account : add automatically this new account to an alias (Default mail group(s) of new user).
If I want to remove an account from an alias, I uncheck the box in front of the alias name, clik "Save changes" and the box come back checked again.

Did you do both steps in the domain profile page? I cannot reproduce this issue with either the latest stable release or development edition. Could you please try our online demo to reproduce it?

http://www.iredmail.org/admin_demo.html

3 (edited by nicolasfo 2017-05-22 19:11:44)

Re: [SOLVED] Unable to uncheck "Member of Mail Aliases"

The problem occurs enven on the demo interface.
Here's what I do :

  • Create a new domain :
        - Top of the page : Add -> Domain
        - Fill domain name field and click "Add"

  • Create a new alias :
        - Top of the page : Add -> Alias
        - Select my previously created domain and fill the mail address. Than clik "Add"

  • Modify default alias strategy :
        - Start dashboard page : "Domains and accounts", select my previously created domain,
        - Go to "advanced" tab
        - Default mail group(s) of new user : check the box in front of my previously alias
        - Click on "Save changes"

  • Create an user account (top of the page : Add -> User)
        - Select my previously created domain
        - Fill the "Mail address" field
        - Set a new password
        - Click on "add"

Then the user is created, the management page of the account occurs. I uncheck the box wich have been set by default in "Member of Mail Address" in front of the alias and click on "Save Changes".
The page reloads. I should have the box unchecked but the box is still checked and the SQL DB has not been modified.

I precise I juste want this user not be part of the alias but all others still be part of the alias.

Nicolas

4

Re: [SOLVED] Unable to uncheck "Member of Mail Aliases"

Thanks for the detailed instruction. I can reproduce this issue with the online demo, but not the latest development edition.

Here's patch to fix it (just change variable name "v" to "i" in one line):

diff -r 4afc9e9c5ae9 libs/sqllib/user.py
--- a/libs/sqllib/user.py    Mon Mar 20 14:22:35 2017 +0800
+++ b/libs/sqllib/user.py    Mon May 22 23:23:39 2017 +0000
@@ -1114,7 +1114,7 @@
 
             for als in alias_profiles:
                 try:
-                    als_members = [str(v).lower()
+                    als_members = [str(i).lower()
                                    for i in str(als.goto).replace(' ', '').split(',')
                                    if str(i).lower() != mail]
 

You need to restart Apache or uwsgi (if you're running Nginx) service to load modified code.

5

Re: [SOLVED] Unable to uncheck "Member of Mail Aliases"

Works perfectly.
As usual you rule !
Thanks
Nicolas