1 (edited by vinacc 2018-04-16 01:46:43)

Topic: iRedapd problems

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

I have a machine with Debian 8 + Apache + iRedMail 0.9.7 and everything works fine.

Today I set up a new machine with Debian 9 + Nginx + iRedMail 0.9.8 to see if I can migrate to the new configuration. Everything seems to be fine except that I receive error cronjob emails in the postmaster box. In detail:

Cron <root@mail2> python /opt/iredapd/tools/cleanup_db.py >/dev/null

Traceback (most recent call last):
  File "/opt/iredapd/tools/cleanup_db.py", line 34, in <module>
    total_before = sql_count_id(conn_iredapd, 'throttle_tracking')
  File "/opt/iredapd/tools/../tools/__init__.py", line 80, in sql_count_id
    qr = conn.select(table,
AttributeError: 'NoneType' object has no attribute 'select'
Cron <root@mail2> python /opt/iredapd/tools/spf_to_greylist_whitelists.py >/dev/null

Traceback (most recent call last):
  File "/opt/iredapd/tools/spf_to_greylist_whitelists.py", line 91, in <module>
    qr = conn.select('greylisting_whitelist_domains', what='domain')
AttributeError: 'NoneType' object has no attribute 'select'

How can I solve the problem?

----

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

2

Re: iRedapd problems

Seems you don't have correct SQL username/password for SQL database "iredapd" in /opt/iredapd/settings.py, please double check.

3

Re: iRedapd problems

ZhangHuangbin wrote:

Seems you don't have correct SQL username/password for SQL database "iredapd" in /opt/iredapd/settings.py, please double check.

Thank you. I have restored the old one on the new server. I have imported all the databases except the mysql table. At this point I would like to know if the original passwords are saved on other files than what you have indicated to me. I had understood that to restore the system it was enough not to import the mysql table. Thanks in the meantime.

4

Re: iRedapd problems

SQL usernames/passwords will be used in some application config files.

On a new iRedMail server, if you restored SQL databases, you should NOT restore the database with name "mysql", it contains passwords for each sql users, but they're different on old and new servers. Config files on new servers use new passwords too, so do not restore old passwords.