Email marked as spam, but not placed in junk folder

Discussion in 'Plugins/Modules/Addons' started by progressed36, Feb 6, 2021.

  1. progressed36

    progressed36 Member

    Hi All,

    I migrated a mailserver to a new farm using the migration toolkit, but the spam email will not go into the junk folder even though the spam rule "Move first, before custom rules" is selected. I tried resyncing the spam rules and resyncing the mailboxes. Maybe it would trigger something, but no.

    The email does get marked as spam by rspamd:
    Code:
    X-Spam-Level: *******
    X-Spamd-Bar: +++++++
    X-Spam: Yes
    
    Anyone has a clue? what to try next?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be that you have to run Tools > resync on the mailboxes to get new .sieve files written as the old ones might contain just rules for amavis. In case you use a custom sieve master template file, take care to update your master template.
     
    progressed36 likes this.
  3. progressed36

    progressed36 Member

    Hi Till,

    I already did that. I will try again.
     
  4. progressed36

    progressed36 Member

    Unfortunatly that didnt do the trick. just recieved a spam message 6.92 / 6 straight into my mailbox.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the sieve file of that mailbox, does it contain this exact rule?

    Code:
    if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
      fileinto :create "Junk";
      # Stop here so that we do not reply on spams
      stop;
    }
     
  6. progressed36

    progressed36 Member

    There is no sieve file. sieve folder is empty, but I can assure you I resynced the mailboxes.
     
  7. progressed36

    progressed36 Member

    As an addition. I have one VPS client with its own mailserver that i manually transferred so the sieve file should have come with it. I synced it and that sieve file is also gone.
     
  8. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Do you have sieve selected as the mail filter in server config?

    If so, the next thing to check is the plugins in plugins-enabled (I don't remember the exact name of the mail filter plugin for sieve, just see what is in plugins-available).
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    As @Jesse Norell mentioned, then either mailfilter is not set to sieve in the GUI or the sieve plugin is not enabled in plugins-enable folder of the server part.
     
  10. progressed36

    progressed36 Member

    Its sieve that is selected in the GUI.

    The only change i have fromt he perfect install is that i used the nightly build instead of the stable version.

    plugins-available folder:
    Code:
    apache2_plugin.inc.php
    apps_vhost_plugin.inc.php
    aps_plugin.inc.php
    backup_plugin.inc.php
    bind_dlz_plugin.inc.php
    bind_plugin.inc.php
    cron_jailkit_plugin.inc.php
    cron_plugin.inc.php
    firewall_plugin.inc.php
    ftpuser_base_plugin.inc.php
    getmail_plugin.inc.php
    iptables_plugin.inc.php
    mail_plugin.inc.php
    mail_plugin_dkim.inc.php
    maildeliver_plugin.inc.php
    maildrop_plugin.inc.php
    mailman_plugin.inc.php
    mongo_clientdb_plugin.inc.php~
    mysql_clientdb_plugin.inc.php
    network_settings_plugin.inc.php
    nginx_plugin.inc.php
    nginx_reverseproxy_plugin.inc.php
    openvz_plugin.inc.php
    pma_symlink_plugin.inc.php
    postfix_filter_plugin.inc.php
    postfix_server_plugin.inc.php
    powerdns_plugin.inc.php
    rspamd_plugin.inc.php
    server_services_plugin.inc.php
    shelluser_base_plugin.inc.php
    shelluser_jailkit_plugin.inc.php
    software_update_plugin.inc.php
    squid_plugin.inc.php
    webmail_symlink_plugin.inc.php
    webserver_plugin.inc.php
    website_symlink_plugin.inc.php
    xmpp_plugin.inc.php
    z_php_fpm_incron_reload_plugin.inc.php
    Plugins enabled:
    Code:
    apache2_plugin.inc.php
    apps_vhost_plugin.inc.php
    aps_plugin.inc.php
    backup_plugin.inc.php
    cron_jailkit_plugin.inc.php
    cron_plugin.inc.php
    ftpuser_base_plugin.inc.php
    getmail_plugin.inc.php
    mail_plugin.inc.php
    mail_plugin_dkim.inc.php
    maildeliver_plugin.inc.php
    mailman_plugin.inc.php
    mysql_clientdb_plugin.inc.php
    network_settings_plugin.inc.php
    postfix_filter_plugin.inc.php
    postfix_server_plugin.inc.php
    rspamd_plugin.inc.php
    server_services_plugin.inc.php
    shelluser_base_plugin.inc.php
    shelluser_jailkit_plugin.inc.php
    software_update_plugin.inc.php
    webserver_plugin.inc.php
    z_php_fpm_incron_reload_plugin.inc.php
    I crosschecked the enabled with a server where it used to work, but everything checks out on what im using.
     
  11. progressed36

    progressed36 Member

    For the sake of test i updated a mailserver to stable version and resync. no sieve file created.
     
  12. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Try enabling server debugging, change something in a mail filter and run server.sh manually, what does that show going on?
     
  13. progressed36

    progressed36 Member

    Its solved. Apparently the mailfilters aren't reapplied when migrating. The mailfiter tab rspamd everything was set to 999 instead of the usual 5, 6 and 15. after saving the mailfilter all files got created again.
     
    Th0m likes this.

Share This Page