1

Topic: "Always insert X-Spam-* headers" cannot be enabled

==== Required information ====
- iRedMail version: 0.9.0
- iRedAdminPro version: 1.9.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Linux/BSD distribution name and version: Debian 7
====

Hi,

I've updated today to latest version of iRedMail and iRedAdminPro and i've seen that "Always insert X-Spam-* headers" checkbox back unchecked after press save button. I've not checked this before, then i don't know if is a new problem.

http://s23.postimg.org/5gg8uvzcr/Captura_de_pantalla_de_2015_01_13_17_14_21.png

¡¡Greetings!!

----

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

2

Re: "Always insert X-Spam-* headers" cannot be enabled

Looks like a bug in iRedAdmin-Pro. I will try to reproduce this issue and come back to you with a fix.

3

Re: "Always insert X-Spam-* headers" cannot be enabled

I can reproduce this issue, and here's patch to fix it:

diff -r ed6e8b9ff9ae libs/amavisd/spampolicy.py
--- a/libs/amavisd/spampolicy.py    Sun Jan 11 15:09:40 2015 +0800
+++ b/libs/amavisd/spampolicy.py    Wed Jan 14 09:39:38 2015 +0800
@@ -114,7 +114,7 @@
            and updates['spam_quarantine_to'] == 'spam-quarantine' \
            and updates['spam_tag2_level'] is None:
             if session.get('is_global_admin') or session.get('is_normal_admin'):
-                if updates['message_size_limit'] is None:
+                if updates['spam_tag_level'] is None and updates['message_size_limit'] is None:
                     use_default_setting = True
             else:
                 use_default_setting = True

4

Re: "Always insert X-Spam-* headers" cannot be enabled

Just Working!!!, thanks!!!