1

Topic: What is the purpose rows in "/opt/iRedAPD-1.4.4/settings.py" (sql...)?

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: Debian 7.8
====

What is the purpose rows in "/opt/iRedAPD-1.4.4/settings.py":
  # For SQL (MySQL/MariaDB/PostgreSQL) backends, used to query mail accounts.
  sql_server = "127.0.0.1"
  sql_port = "3306"
  sql_db = "vmail"
  sql_user = "vmail"
  sql_password = "2DcEsdsdnW6DDsHVNkIw3HM8kvBpXS"

  # For Amavisd policy lookup
  amavisd_db_server = "127.0.0.1"
  amavisd_db_port = "3306"
  amavisd_db_name = "amavisd"
  amavisd_db_user = "amavisd"
  amavisd_db_password = "9vPBucsdsdsdcMfDDDSEttSYweweweAOLwn"

MySQL Database amavisd: in table policy is column "message_size_limit".
I set in "iRedAdmin-Pro v1.9.2 (MySQL)" Domain and Acconts / mydomain.com / Spam Policy / Max size of single incoming email on: 13300 bytes.
In column message_size_limit is changes on 13300 bytes.
It is right. But...

I remove all rows amavisd and sql from settings.py. I am restart service iredapd and server.
Why change works still "Max size of single incoming email" in iRedAdmin-Pro (change value in table Policy too)?

In /var/log/iredapd.log no problem too:
2015-04-29 23:33:46 INFO Starting iRedAPD (version: 1.4.4, backend: mysql), listening on 127.0.0.1:7777.
2015-04-29 23:33:46 INFO Loading plugin: reject_null_sender
2015-04-29 23:33:46 INFO Loading plugin: amavisd_message_size_limit
2015-04-29 23:33:46 INFO Loading plugin: amavisd_wblist
2015-04-29 23:33:46 INFO Loading plugin: sql_alias_access_policy

----

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

2

Re: What is the purpose rows in "/opt/iRedAPD-1.4.4/settings.py" (sql...)?

jan.lex wrote:

I remove all rows amavisd and sql from settings.py. I am restart service iredapd and server.
Why change works still "Max size of single incoming email" in iRedAdmin-Pro (change value in table Policy too)?

I'm afraid that I don't quite understand what your issue is.

Do you mean you deleted all records in SQL table `amavisd.policy`, and iRedAdmin-Pro still shows old value (13300 bytes)?

3

Re: What is the purpose rows in "/opt/iRedAPD-1.4.4/settings.py" (sql...)?

ZhangHuangbin wrote:
jan.lex wrote:

I remove all rows amavisd and sql from settings.py. I am restart service iredapd and server.
Why change works still "Max size of single incoming email" in iRedAdmin-Pro (change value in table Policy too)?

I'm afraid that I don't quite understand what your issue is.

Do you mean you deleted all records in SQL table `amavisd.policy`, and iRedAdmin-Pro still shows old value (13300 bytes)?


I deleted these records in file settings.py:
sql_server = "127.0.0.1"
sql_port = "3306"
sql_db = "vmail"
sql_user = "vmail"
sql_password = "2DcEsdsdnW6DDsHVNkIw3HM8kvBpXS"
amavisd_db_server = "127.0.0.1"
amavisd_db_port = "3306"
amavisd_db_name = "amavisd"
amavisd_db_user = "amavisd"
amavisd_db_password = "9vPBucsdsdsdcMfDDDSEttSYweweweAOLwn"

After this change:
Why does overwrite table `amavisd.policy` still work from iRedAdmin-Pro?

I expected (after remove access to SQL) that I will not be able to make changes in table `amavisd.policy` with iRedAdmin-Pro.

4

Re: What is the purpose rows in "/opt/iRedAPD-1.4.4/settings.py" (sql...)?

jan.lex wrote:

I deleted these records in file settings.py:

iRedAPD and iRedAdmin use different config files. iRedAPD uses /opt/iredapd/settings.py, iRedAdmin uses /usr/share/apache2/iredadmin/settings.py on Debian/Ubuntu.

If you don't want per-user message size limit and other amavisd policy lookup, you can set below setting in iRedAdmin config file:

amavisd_enable_policy_lookup = False

5

Re: What is the purpose rows in "/opt/iRedAPD-1.4.4/settings.py" (sql...)?

ZhangHuangbin wrote:
jan.lex wrote:

I deleted these records in file settings.py:

iRedAPD and iRedAdmin use different config files. iRedAPD uses /opt/iredapd/settings.py, iRedAdmin uses /usr/share/apache2/iredadmin/settings.py on Debian/Ubuntu.

If you don't want per-user message size limit and other amavisd policy lookup, you can set below setting in iRedAdmin config file:

amavisd_enable_policy_lookup = False

Ok. The second part of my question.
How checked correct password in rows?:
sql_password = "2DcEsdsdnW6DDsHVNkIw3HM8kvBpXS"
amavisd_db_password = "9vPBucsdsdsdcMfDDDSEttSYweweweAOLwn"

6

Re: What is the purpose rows in "/opt/iRedAPD-1.4.4/settings.py" (sql...)?

How about try to login with mysql command line tool?

mysql -u username -p