1

Topic: Stop spam message subject from being automatically changed

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

Does one modify this setting in amavis (/etc/amavis/conf.d/50-user)

# Modify email subject, add '$sa_spam_subject_tag'.
#   0:  disable
#   1:  enable
$sa_spam_modifies_subj = 1;

or this setting in spamassassin (/etc/mail/spamassassin/local.cf) to stop the subject of spam messages from being changed?

# These two lines will not affect due to Amavisd use its
# own variables setting in /etc/amavisd.conf.
required_score      5.0
rewrite_header      subject [ SPAM ]

Additionally does stopping the subject from being changed have any unknown unintended consequences in iRedMail 0.9.0?

----

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

2

Re: Stop spam message subject from being automatically changed

Amavis and no unintended consequences apart from the obvious of not seeing spam as easily. Its actually a per-recipient option within iRedAdmin-Pro.

3

Re: Stop spam message subject from being automatically changed

This messages comes up when changing in Amavis:

Variable $sa_spam_modifies_subj was retired, changing its value has no effect. See release notes.
at /etc/amavis/conf.d/50-user line 202

4

Re: Stop spam message subject from being automatically changed

Good that you've noticed that, it is no longer done in that manner; now it is done by setting

$sa_spam_subject_tag = undef;

if undef doesn't work, it might be two single quotes instead.
@Zhang, iRedAdmin Pro relies on this which was retired, http://lists.amavis.org/pipermail/amavi … 01746.html
You'll have to look into removing the column from the Amavisd.Policy table and also changing how iRedAdmin controls it into changing the "[Spam] " bit of the DB.

5

Re: Stop spam message subject from being automatically changed

Looks like the sql column is still used: policy.spam_modifies_subj. But the setting in amavisd config file is retired.

6

Re: Stop spam message subject from being automatically changed

I don't think you're right there Zhang, look at the link I provided; in the 2.7 Upgrade Notes it tells you to drop that SQL Column.

ALTER TABLE policy  ADD COLUMN unchecked_lover     char(1) default NULL;
  ALTER TABLE policy  ADD COLUMN spam_tag3_level     real default NULL;
  ALTER TABLE policy  ADD COLUMN spam_subject_tag3   varchar(64) default NULL;
  ALTER TABLE policy  ADD COLUMN disclaimer_options  varchar(64) default NULL;
  ALTER TABLE policy  ADD COLUMN forward_method      varchar(64) default NULL;
  ALTER TABLE policy  ADD COLUMN sa_userconf         varchar(64) default NULL;
  ALTER TABLE policy  ADD COLUMN sa_username         varchar(64) default NULL;
  ALTER TABLE policy DROP COLUMN spam_modifies_subj;

The spam_modifies_subj setting and a corresponding SQL field
was retired in 2.7.0:

7

Re: Stop spam message subject from being automatically changed

My mistake, sorry about this. thanks for correcting me.
I will update iRedMail upgrade tutorial (for upcoming iRedMail-0.9.1 release) to mention this sql change.

8

Re: Stop spam message subject from being automatically changed

Weirdly, the Amavisd.policy table already has all the other columns such as sa_userconf, sa_username etc. Just has the spam_modifies_subj as well

9

Re: Stop spam message subject from being automatically changed

UPDATE:

*) Remove code related to `spam_modifies_subj` in iRedAdmin-Pro and iRedMail (commit log).
*) Updated upgrade tutorial for upcoming iRedMail-0.9.1 to mention this sql change (document commit log)

10

Re: Stop spam message subject from being automatically changed

7t3chguy wrote:

Weirdly, the Amavisd.policy table already has all the other columns such as sa_userconf, sa_username etc. Just has the spam_modifies_subj as well

iRedMail imported the SQL template file created by iRedMail (samples/amavisd/*.sql), so it's my fault, not Amavisd. smile

11

Re: Stop spam message subject from being automatically changed

While you're at it, if you're wanting to use my View + New Select query method as discussed in the other topic, remove policy.id column and make policy.policy_name PK,NN,UQ as the id column will never be used and instead the policy_name will reflect the scope it matches, its the only way to do it dynamically

Edit: Removing it isn't important, there's just no point keeping it since it'll never be used