Deactivate e-mail doman policy dont work

Summary

If you set a spam policy you cant deactivate it anymore.

Steps to reproduce

  1. Edit a email domain
  2. Set a spam filter
  3. Try to deactivate the spam filter again

Proposed fix

/usr/local/ispconfig/interface/web/mail/mail_domain_edit.php

Line 443:

$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $domain);

Change to:

$tmp_user = $app->db->queryOneRecord("SELECT id, policy_id FROM spamfilter_users WHERE email = ?", '@' . $domain);

Reason

In Line 446 you try to get the attribut $tmp_user['policy_id'] but is not selected in the mysql query.