[GH-ISSUE #339] incompatibility with amavisd-new #323

Closed
opened 2026-02-27 11:11:11 +03:00 by kerem · 5 comments
Owner

Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/339

Originally assigned to: @tonioo on GitHub.

Originally created by Hervé Cauwelier on 2012-10-21T14:54:35Z

Hi, while installing amavisd-new 2.8 for Modoba, I ran into this problem when applying migration "amavis:0002_create_records":

django.db.utils.DatabaseError: ERREUR: la colonne « spam_modifies_subj » de la relation « policy » n'existe pas
LINE 1: ...recip", "spam_kill_level", "clean_quarantine_to", "spam_modi...

The problem is that this column was dropped in version 2.8, quoting README.sql-pg.txt:

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 DROP COLUMN spam_modifies_subj;

I din't find it in the Policy model but I had to edit the migration and remove references to "spam_modifies_subj" in the query and in the frozen models definition.

Then it succeeded.

Originally created by @tonioo on GitHub (Dec 4, 2013). Original GitHub issue: https://github.com/modoboa/modoboa/issues/339 Originally assigned to: @tonioo on GitHub. **Originally created by Hervé Cauwelier on 2012-10-21T14:54:35Z** Hi, while installing amavisd-new 2.8 for Modoba, I ran into this problem when applying migration "amavis:0002_create_records": django.db.utils.DatabaseError: ERREUR: la colonne « spam_modifies_subj » de la relation « policy » n'existe pas LINE 1: ...recip", "spam_kill_level", "clean_quarantine_to", "spam_modi... The problem is that this column was dropped in version 2.8, quoting README.sql-pg.txt: 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 DROP COLUMN spam_modifies_subj; I din't find it in the Policy model but I had to edit the migration and remove references to "spam_modifies_subj" in the query and in the frozen models definition. Then it succeeded.
kerem 2026-02-27 11:11:11 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Hervé Cauwelier on 2012-10-21T14:56:47Z

Please read:

The problem is that this column was dropped in version 2.7, quoting README.sql-pg.txt:

obviously.

<!-- gh-comment-id:29815958 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Hervé Cauwelier on 2012-10-21T14:56:47Z** Please read: <pre> The problem is that this column was dropped in version 2.7, quoting README.sql-pg.txt: </pre> obviously.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2012-10-21T15:03:46Z

Hi Hervé,

this issue has been partially fixed by #296. It seems I forgot to modify the migration script... :p

Thanks for your feedback.

<!-- gh-comment-id:29815960 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2012-10-21T15:03:46Z** Hi Hervé, this issue has been partially fixed by #296. It seems I forgot to modify the migration script... :p Thanks for your feedback.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2012-10-26T20:26:26Z

Hi Hervé,

could you check if the modification I've made works for you ?

Thanks in advance.

<!-- gh-comment-id:29815962 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2012-10-26T20:26:26Z** Hi Hervé, could you check if the modification I've made works for you ? Thanks in advance.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Hervé Cauwelier on 2012-10-28T15:58:42Z

Hi,

Looks good but why did you add that "spam_subject_tag2" field instead? It already defaults to None in the model.

<!-- gh-comment-id:29815965 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Hervé Cauwelier on 2012-10-28T15:58:42Z** Hi, Looks good but why did you add that "spam_subject_tag2" field instead? It already defaults to None in the model.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2012-10-28T16:44:38Z

Just as a reminder, something to say : I use this field for per-domains policies.

<!-- gh-comment-id:29815966 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2012-10-28T16:44:38Z** Just as a reminder, something to say : I use this field for per-domains policies.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#323
No description provided.