1

Topic: SPAM still not deletet(Filter by Roundcube)

We are using the folow
iRedAdmin-Pro-SQL  2.1.3 (Aktuelle Version 1.9.2)
Iredmail 0.9.0
Ubuntu 14.04 LTS

my target is get spam instant killed, so i made a filter over roundcube, my content of the file managesieve.sieve is the folow, but i still get mails with spam header in my junkbox

require ["body","fileinto","vacation"];
# rule:[Vacation]
if false # true
{
    vacation :days 1 "I'm on vacation.";
}
# rule:[spam]
if body :text :contains "X-Spam-Flag: YES"
{
    discard;
    stop;
}

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: SPAM still not deletet(Filter by Roundcube)

stefanr wrote:

if body :text :contains "X-Spam-Flag: YES"

X-Spam-Flag is a mail header, not "body".
You can try this:

require ["fileinto"];

# rule:[Move Spam to Junk Folder]
if header :is "X-Spam-Flag" "YES"
{
    fileinto "Junk";
}

3

Re: SPAM still not deletet(Filter by Roundcube)

Hehy, well but i want delete the maill so i shall use my folow code have still spam in my folder, or is it a problem by main dovecot filter who move the file into junk first?

# rule:[spam]
if header :is "X-Spam-Flag" "YES"
{
    discard;
    stop;
}

4

Re: SPAM still not deletet(Filter by Roundcube)

If it doesn't work for you, i suggest turn on debug mode in Dovecot to understand the mail flow.
Reference:
http://www.iredmail.org/docs/debug.dovecot.html