1

Topic: Troubles with the database??

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  PGSQL
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: Ubuntu 14.04
- Related log if you're reporting an issue:
====

I really don't know wath's going on, dont even know qhat logs to look at. This is the problem:

I'm using the free version (can't pay the pro) so I'm creating the domains admins directly into the database. Now, sometimes this admins complains that they cannot log on into the admin page, and when I check the database the domains admins table doesn't have the admin. What's going on?? I would appreciate any help.

Thanks in advance from Cuba

----

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

2

Re: Troubles with the database??

Please show the commands/script you are using to create such a user.

3 (edited by Tony-admincujae 2015-06-12 04:01:07)

Re: Troubles with the database??

This are the comands

update mailbox set isadmin = 1 where username = 'user@dcrhmail.cujae.edu.cu';

insert into domain_admins (username,domain) values ('user@dcrhmail.cujae.edu.cu','dcrhmail.cujae.edu.cu');

4

Re: Troubles with the database??

The commands look fine.

Tony-admincujae wrote:

Now, sometimes this admins complains that they cannot log on into the admin page, and when I check the database the domains admins table doesn't have the admin. What's going on?? I would appreciate any help.

This confuses me. Did you update this mail user with iRedAdmin or other tools? or shell/python script?

5

Re: Troubles with the database??

ZhangHuangbin wrote:

The commands look fine.

Tony-admincujae wrote:

Now, sometimes this admins complains that they cannot log on into the admin page, and when I check the database the domains admins table doesn't have the admin. What's going on?? I would appreciate any help.

This confuses me. Did you update this mail user with iRedAdmin or other tools? or shell/python script?

I'm sorry I didn't reply earlier. I only have an Internet conection at work so couldn't do it before.

I updated the users without any scripts. I did it by introducing those comands directly into the database. This are the steps one by one.
1) I create the users using the IredAdmin web page
2) I log into the database using the comand sudo su - postgres -c 'psql vmail'
3) then I put the comands that I've explained earlier in this post.
It's this wrong?
Sorry for the delay.

6

Re: Troubles with the database??

Your procedure is fine, SQL commands are fine too.
What confuses me is why SQL records were deleted. iRedMail doesn't have cron job or other tools to delete SQL records automatically.