• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Move spam to the Spam folder isn't working

joru1407

New Pleskian
Hey guys,

I registered to this forum because I've a problem with the Plesk feature "Move spam to the Spam folder" for each mail address and I couldn't find a solution so far.

Plesk Version: 12.5.30 Update #15
Imap/POP3 Server: Dovecot


Description of my problem:

I enable the Spam filter for any mail address with the checkbox "Switch on spam filtering for this e-mail address" and select the option "Move spam to the Spam folder". Now, arriving spam mails are correctly recognized as spam messages (they arrive as info mail from plesk "Spam detection software, running on the system..."), but however, they're not moved to the Spam folder as I want.

In case of my personal addresses I could add some sieve filter connected with enabling "mark spam messages by adding the following text to message subjec", but I can't expect this from all of my customers :/

Is there anyone who knows a possible solution or a workaround for correctly moving spams to the Spam folder?

Thanks, Joshua
 
Hi abdy, thanks for your reply.

Yes, I'm onlny using IMAP protocol.

This night I also figured out something new about my problem. If a spam message arrives, i can find the following mail log entries:

Code:
spamd[15952]: spamd: processing message <embb9ef8d7-07b9-44f6-b5e9-88cf60b3f113@pc-joshua> for [email protected]:30
spamd[15952]: spamd: identified spam (999.7/7.0) for [email protected]:30 in 0.3 seconds, 7656 bytes.
spamd[15952]: spamd: result: Y 999 - ALL_TRUSTED,GTUBE,HTML_IMAGE_ONLY_28,HTML_MESSAGE,URIBL_BLOCKED scantime=0.3,size=7656,[email protected],uid=30,required_score=7.0,rhost=localhost,raddr=::1,rport=54102,mid=<embb9ef8d7-07b9-44f6-b5e9-88cf60b3f113@pc-joshua>,autolearn=no autolearn_force=no
dovecot: service=lda, [email protected], ip=[]. msgid=<embb9ef8d7-07b9-44f6-b5e9-88cf60b3f113@pc-joshua>: save failed to open mailbox INBOX.Spam: Character not allowed in mailbox name: '.'
dovecot: service=lda, [email protected], ip=[]. msgid=<embb9ef8d7-07b9-44f6-b5e9-88cf60b3f113@pc-joshua>: saved mail to INBOX

So as far as I can see, the message is processed as Spam and Plesk tries to move it to the INBOX.Spam folder.
In my case this can't work, because I adjusted my dovecot namespace when setting up the webserver (Because it runs better with most IMAP Clients in default configuration).

Code:
namespace inbox {
  separator = /
  prefix =
  inbox = yes

  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    auto = no
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
}

The big problem: I couldn't find any configuration file to adjust the "INBOX.Spam" Path yet :/
Hope you guys can help me :)
 
I am facing the same issues.

I have reasons due to a migration from another dovecot setup to use similar code as above:

Code:
namespace inbox {
  separator = .
  prefix =
  inbox = yes
}

Just like in the original post, I too have the error message that the mailbox folder INBOX.Spam is not found as this folder is now accessible without the original prefix of INBOX and should only be ".Spam" - I have grepped the entire disk and find no reference to "INBOX.Spam", nor have I found matching sieve scripts.

I would really appreciate feedback on where the mailbox folder is defined in which spam mail is stored in.

To avoid the question, only IMAP is in use.
 
I'm having a similar problem, all emails i sent from my server goes to spam folder only for Microsoft account @(Hotmail, msn, outlook, live).

I have like 2 weeks trying to find a solution but nothing help....
 
Same problem here :(
My solution right now is to disable moving spam to the spam folder in Plesk and use a Sieve filter instead...
 
Old problem still exists in 2021 ! ... here is a solution;
1. Add your dovecot configuration to use top level directory instead of INBOX.Spam etc:-
namespace inbox {
separator = /
prefix =
inbox = yes
type = private
mailbox Spam {
auto = create
special_use = \Junk
autoexpunge = 60d
}

mailbox Trash {
auto = create
special_use = \Trash
autoexpunge = 60d
}
}
 
Sorry ... problem with trying to write a reply ... and time limit reached to edit/delete my previous post .... here is the complete post as intended:

Old problem still exists in 2021 ! ... here is a solution;
1. Add your dovecot configuration to use top level directory instead of INBOX.Spam etc:
in my case I also changed Spam & Trash to auto delete older than 60 days;
namespace inbox {
separator = /
prefix =
inbox = yes
type = private

mailbox Spam {
auto = create
special_use = \Junk
autoexpunge = 60d
}

mailbox Trash {
auto = create
special_use = \Trash
autoexpunge = 60d
}
}

2. Below that code (or in a seperate conf file);
namespace compat {
separator = .
prefix = INBOX.
inbox = no
hidden = yes
list = no
alias_for =
}

What this does is create a hidden namespace which maps INBOX. to the existing folder structures.
Spamassassin/Dovecot can now save to INBOX.spam, and IMAP e-mail will find them in top level .Spam directory.

Works for me!
 
Back
Top