1 (edited by matteo.frakka 2012-11-15 02:45:00)

Topic: May be Bugs? Or I'm doing somethings wrong?

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL Pro
- Linux/BSD distribution name and version: CentOs 6 64bit
- Related log if you're reporting an issue:
====

I've just created some single-domain administrators for domain newdomain.ltd .
Those administrators have as default language "IT" in their profile.
Domain profiling (default quota, throttling, etc...) was made by postmaster (me!) and I set a mail alias (users@newdomain.ltd) as default for new users in domain newdomain.ltd. It works fine.
After some test, I have deleted the alias users@newdomain.ltd and I've created it again, setting it again as "default" for users in newdomain.ltd

Now:
- When I create a new users in domain newdomain.ltd the flag on "users@newdomain.ltd" is not set so users are not added to default alias (tried ad postmaster or single-domain admin, with no change);
- Profile updating don't works. I've tried to remove the flag from the checkbox "Default mail group(s) of new user" and to save changes (successful) but reloading page the flag is still on the checkbox. But users are still not added to mail groups.
- If I log in on iredadmin with an account of a single-domain administrator (previously created) the control panel is in Italian, even if I chose another language in the drop-down list on login form (tested with 2 browsers, so is not a cache related issue...)


Sorry for my English...

P.S:
iredadmin/profile/user/general/username@newdomain.ltd
The second chech box (Mark this user as) is not translated in Italian (should be "Imposta questo utente come") and on the right side of the checkbox "domini" should be replaced with "Amministratore del dominio".

----

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

2

Re: May be Bugs? Or I'm doing somethings wrong?

matteo.frakka wrote:

- Profile updating don't works. I've tried to remove the flag from the checkbox "Default mail group(s) of new user" and to save changes (successful) but reloading page the flag is still on the checkbox. But users are still not added to mail groups.

Works as designed. As it says, it's for new user.

matteo.frakka wrote:

- If I log in on iredadmin with an account of a single-domain administrator (previously created) the control panel is in Italian, even if I chose another language in the drop-down list on login form (tested with 2 browsers, so is not a cache related issue...)

Works as designed. It won't update your profile if you choose other language in login form.
Maybe a good idea to update it?

matteo.frakka wrote:

iredadmin/profile/user/general/username@newdomain.ltd
The second chech box (Mark this user as) is not translated in Italian (should be "Imposta questo utente come") and on the right side of the checkbox "domini" should be replaced with "Amministratore del dominio".

Could you help translate the file i18n/it_IT/LC_MESSAGES/iredadmin.po and mail it back to me?

3

Re: May be Bugs? Or I'm doing somethings wrong?

ZhangHuangbin wrote:

Works as designed. As it says, it's for new user.

Sorry, my mistake: I meant "But new users are still not added to mail groups." I knew it was only for new users.

In iRedMail for one of my domains I have 2 mail alias set as "Default mail group(s) of new users". But when new users are added to that domain they still have the checkbox blank and in database "vmail", table "alias" at rows related to mail aliases, the column "goto" is still empty.
If I add the "new" users to mail aliases manually (selecting the checkbox and saving update to user's profile) it works so the problem is only in the default action.

matteo.frakka wrote:

Works as designed. It won't update your profile if you choose other language in login form.
Maybe a good idea to update it?

Well... A default language is always set when you create a new mail admin, right?
So if the drop-down menu don't allows you to change the language set by administrator what is it? If I still have to login before I can change the display language, that choice is useless... Should be used to set the session language, not to modify the user's profile.

matteo.frakka wrote:

Could you help translate the file i18n/it_IT/LC_MESSAGES/iredadmin.po and mail it back to me?

Sure!
I'll do it today.

4

Re: May be Bugs? Or I'm doing somethings wrong?

matteo.frakka wrote:

Sure!
I'll do it today.

Done. You have mail.

5

Re: May be Bugs? Or I'm doing somethings wrong?

Confirmed, it's a bug in file libs/mysql/user.py (and libs/pgsql/user.py if you're running PostgreSQL edition).
Here's patch to fix it:

diff -r 23446475f5c9 libs/mysql/user.py
--- a/libs/mysql/user.py    Tue Nov 06 22:12:16 2012 +0800
+++ b/libs/mysql/user.py    Mon Nov 19 20:12:17 2012 +0800
@@ -276,10 +276,10 @@
                         self.conn.query(
                             '''
                             UPDATE alias
-                            SET goto=CONCAT('$mail', ',', goto)
-                            WHERE address=$ali AND domain=$domain
+                            SET goto=CONCAT($mail, ',', goto)
+                            WHERE address=$ali
                             ''',
-                            vars={'mail': self.mail, 'ali': ali, 'domain': self.domain, },
+                            vars={'mail': self.mail, 'ali': ali},
                         )
                     except:
                         pass

6 (edited by matteo.frakka 2012-11-19 23:10:02)

Re: May be Bugs? Or I'm doing somethings wrong?

- Change directory to "iredadmin/libs/<sql_backend>/";
- Create the patch file with touch with copy &paste your code into new file "user.patch" (touch user.patch && nano user.patch);
- Copy and paste the patch code you have posted. Save and exit;
- Patch file user.py using command "patch < user.patch":

# patch < user.patch
patching file user.py

- Reload httpd with command: "service httpd reload" (not needed).

Done.
Right?

7

Re: May be Bugs? Or I'm doing somethings wrong?

Please use --dry-run option to verify this patch first:

# patch --dry-run -p3 user.patch

If no error message, then patch it without --dry-run.

8 (edited by matteo.frakka 2012-11-23 18:06:20)

Re: May be Bugs? Or I'm doing somethings wrong?

# patch --dry-run -p3 < user.patch

Patching process works fine.

Bug fixed, confirmed. Thank you.