Missing field in Postgres policy tables (2.7.2, 2.8.0)
Mark Martinec
Mark.Martinec+amavis at ijs.si
Mon Jul 30 23:15:27 CEST 2012
Patrick,
> I believe I found a field missing in Postgres' policy table.
> Attached are two patches that will add the field; it's there in MySQL
> though.
> +++ README.sql-pg.fixed 2012-07-27 22:26:17.738398648 +0200
> + spam_modifies_subj char(1) default NULL, -- Y/N
The spam_modifies_subj setting and a corresponding SQL field
was retired in 2.7.0:
amavisd-new-2.7.0 release notes
- retired settings $sa_spam_modifies_subj and @spam_modifies_subj_maps.
Disabling insertion of spam tag into a Subject header field can be achieved
by turning off the corresponding entries in %subject_tag_maps_by_ccat:
undef $subject_tag_maps_by_ccat{CC_SPAM()};
undef $subject_tag_maps_by_ccat{CC_SPAMMY.',1'};
undef $subject_tag_maps_by_ccat{CC_SPAMMY()};
undef $subject_tag_maps_by_ccat{CC_CLEAN.',1'};
or by emptying corresponding lists of lookup tables, e.g.:
@spam_subject_tag_maps = ();
@spam_subject_tag2_maps = ();
@spam_subject_tag3_maps = ();
or individually (by-recipient) by specifying suitable lookup tables in
@spam_subject_tag_maps / @spam_subject_tag2_maps / @spam_subject_tag3_maps,
either statically, or through SQL or LDAP lookups;
Both settings are still declared for compatibility with old config files,
but their value is ignored. An attempt to set the value of a variable
$sa_spam_modifies_subj to a non-default value produces a warning.
README.sql-pg :
Table 'policy' received a couple of new optional fields with 2.7.0, and
dropped one field. As all fields in this table are optional and any extra
field is just ignored by amavisd, it is not necessary to update this table
unless one really needs these new fields. The following should adjust
a pre-2.7.0 schema:
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;
But I see I still need to update README.sql-mysql and an INSERT example
in README.sql.
Mark
More information about the amavis-users
mailing list