1 (edited by rafaelr 2015-12-16 14:56:22)

Topic: Greylisting, Throttle and domain profile broken after upgrade

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.3
- Linux/BSD distribution name and version: Ubuntu 14.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Both
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:  iredapd.log
====

After upgrading to 0.9.3 I get an internal server error when accessing System => Anti Spam => Greylisting or System => Anti Spam => Throttle in iRedAdmin.

Looking at the iredapd.log I found out that amavisd_message_size_limit.py does not exist anymore.

INFO Plugin amavisd_message_size_limit (/opt/iredapd/plugins/amavisd_message_size_limit.py) does not exist

... so I removed the plugin from the configuration.

I have successfully upgraded my system from 0.9.2 but these three options are broken. greylisting plugin was enabled as recommended in the upgrade documentation. I also registered throttle plugin just in case.

There is also a server internal error trying to access any of the hosted domains in my server:

https://server.tld/iredadmin/profile/do … domain.com   <= server internal error


How can I further troubleshoot this issue?

Error log:

[Wed Dec 16 01:04:41.297826 2015] [:error] [pid 7192] 'module' object has no attribute 'iredapd_db_host'
[Wed Dec 16 01:04:41.300111 2015] [:error] [pid 7192] [remote x.x.x.x:26295] Traceback (most recent call last):
[Wed Dec 16 01:04:41.300206 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Wed Dec 16 01:04:41.300244 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     return self.handle()
[Wed Dec 16 01:04:41.300263 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Wed Dec 16 01:04:41.300290 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     return self._delegate(fn, self.fvars, args)
[Wed Dec 16 01:04:41.300308 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
[Wed Dec 16 01:04:41.300334 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     return handle_class(cls)
[Wed Dec 16 01:04:41.300352 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
[Wed Dec 16 01:04:41.300377 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     return tocall(*args)
[Wed Dec 16 01:04:41.300394 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/share/apache2/iredadmin/libs/sqllib/decorators.py", line 26, in proxyfunc
[Wed Dec 16 01:04:41.300413 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     return func(*args, **kw)
[Wed Dec 16 01:04:41.300475 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/share/apache2/iredadmin/controllers/sql/domain.py", line 168, in GET
[Wed Dec 16 01:04:41.300493 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     qr = lib_greylist.get_greylist_setting_and_whitelists(account='@' + self.domain)
[Wed Dec 16 01:04:41.300515 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/share/apache2/iredadmin/libs/iredapd/greylist.py", line 9, in get_greylist_setting_and_whitelists
[Wed Dec 16 01:04:41.300560 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     gl = Greylisting()
[Wed Dec 16 01:04:41.300610 2015] [:error] [pid 7192] [remote x.x.x.x:26295]   File "/usr/share/apache2/iredadmin/libs/iredapd/__init__.py", line 44, in __init__
[Wed Dec 16 01:04:41.300631 2015] [:error] [pid 7192] [remote x.x.x.x:26295]     self.db.supports_multiple_insert = True
[Wed Dec 16 01:04:41.300678 2015] [:error] [pid 7192] [remote x.x.x.x:26295] AttributeError: 'Greylisting' object has no attribute 'db'

----

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

2

Re: Greylisting, Throttle and domain profile broken after upgrade

Do you have 'policyd_enabled = False' in iRedAdmin-Pro config file?
And please don't forget to restart Apache or uwsgi (if you're running Nginx) service after changed its config file.

3

Re: Greylisting, Throttle and domain profile broken after upgrade

rafaelr wrote:

[Wed Dec 16 01:04:41.297826 2015] [:error] [pid 7192] 'module' object has no attribute 'iredapd_db_host'

Do you have 'iredapd_db_server =' in iRedAdmin-Pro config file? please replace it by 'iredapd_db_host =', then restart Apache or uwsgi service and try again.

4

Re: Greylisting, Throttle and domain profile broken after upgrade

Zhang, thank you for your help.

I already had policyd_enabled = False and I had removed the policyd_* settings.

iRedAdmin-Pro config file was missing iredapd db settings... basically all I had in that file in relation to iredapd was:

# Enable iRedAPD integration.
iredapd_enabled = True

Looking at /opt/iredapd/settings.py I do see iredapd_db_* settings there. Not sure if the script is supposed to add it to iRedAdmin-Pro settings during the upgrade on its own or not. If that's the case it didn't do it for me.  So I added the configuration in iRedAdmin-Pro config file accordingly and everything is back to normal.


iredapd_db_host = "127.0.0.1"
iredapd_db_port = "3306"
iredapd_db_name = "xxxxxxx"
iredapd_db_user = "xxxxxxxxxxxxxx"
iredapd_db_password = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

5

Re: Greylisting, Throttle and domain profile broken after upgrade

If you check tools/upgrade_iredadmin.sh (in iRedAdmin-Pro), it will copy 'iredapd_db_*' from iRedAPD config file. So, looks like you upgraded iRedAdmin-Pro before upgrading iRedAPD (or iRedMail). Am i right?

6

Re: Greylisting, Throttle and domain profile broken after upgrade

ZhangHuangbin wrote:

If you check tools/upgrade_iredadmin.sh (in iRedAdmin-Pro), it will copy 'iredapd_db_*' from iRedAPD config file. So, looks like you upgraded iRedAdmin-Pro before upgrading iRedAPD (or iRedMail). Am i right?

That's the case indeed. I upgraded iRedMail-Pro before upgrading iRedAPD.

7

Re: Greylisting, Throttle and domain profile broken after upgrade

rafaelr wrote:

That's the case indeed. I upgraded iRedMail-Pro before upgrading iRedAPD.

sad

8 (edited by rafaelr 2015-12-16 17:18:41)

Re: Greylisting, Throttle and domain profile broken after upgrade

ZhangHuangbin wrote:
rafaelr wrote:

That's the case indeed. I upgraded iRedMail-Pro before upgrading iRedAPD.

sad

I'm really sorry, Zhang. I followed the upgrade docs http://www.iredmail.org/docs/upgrade.ir … ion-number and the order seems to be iRedAdmin => iRedAPD. I should've known better. I'll be more careful next time smile

All the best!

9

Re: Greylisting, Throttle and domain profile broken after upgrade

It's ok for me. It requires me to make documents more clearer.

[topic closed since the issue has been solved.]