1

Topic: [FAQ] How to move mails which marked as SPAM into Junk folder.

This tutorial is used to explain how to move mails which marked as SPAM into Junk folder in iRedMail. If they don't work for you, please post a new topic in iRedMail General Technical Support forum.
=====================

iRedMail uses Amavisd-new + SpamAssassin to detect spams, and it also:

  • Add '**** SPAM ****' in mail subject by default

  • Add 'X-Spam-Status' in mail HEAD.

If you want to move spam mails into Junk folder, here are steps:

  • Make sure your domain name is listed in /etc/amavisd.conf (RHEL/CentOS) or /etc/amavis/conf.d/50-user (Debian/Ubuntu). e.g.

@local_domains_maps = ['demo.iredmail.org', 'a.cn'];
  • Find location of global sieve rule file in /etc/dovecot.conf (RHEL/CentOS) or /etc/dovecot/dovecot.conf (Debian/Ubuntu): sieve_global_path, default is /var/vmail/sieve/dovecot.sieve.

plugin {
    # ... SKIP OTHER SETTINGS HERE ...
    sieve_global_path = /var/vmail/sieve/dovecot.sieve
}
  • iRedMail copies a sample file in the same directory by default, filename is /var/vmail/sieve/dovecot.sieve.sample. Rename it to the correct filename. If you can't find the sample file, you can also download it here.

  • Restart dovecot service, and it should work for you now. If it doesn't work for you, please try to debug dovecot and find the root case from log files.