"The IMAP command "APPEND" (to Spam) failed..."

I constantly get an error message (using Apple Mail with Spamsieve on a Mac, all most recent versions of software) as follows:

The message “whatever” could not be moved to the mailbox “Spam”

The IMAP command “APPEND” (to Spam) failed with server error: APPEND Contains Deleted flag.

Most spam is handled correctly and gets moved to the Spam mailbox, but 4-5 messages a day throw this error. I then have to manually delete them from my inbox.

If someone could tell me what this means and now to fix it so that my spam gets filtered to spam I’d appreciate it!

It sounds like there’s an incompatibility between Apple Mail and your mail server that is preventing it from moving messages from one server mailbox to another. Which version of macOS do you have?

You should be able to avoid the problem by using a Spam mailbox under On My Mac, as described in the SpamSieve setup instructions.

Thanks, system is Catalina 10.15.5

Yes, my setup uses a Spam mailbox in “On My Mac” as described in the instructions. As far as I know the issue is only with my Yahoo mail account, Gmail accounts work fine.

One more reason to ditch it I guess, but it’s my contact info for 20 years of stuff, a lot of work to change.

Edit-- I take that back. It just happened to an email that came in to an account run through G Suite.

Do you have any extra scripts/rules besides the regular SpamSieve rule? For example, are you using the Server Junk Mailbox or Remote Training script?

Looking under preferences–>Rules I see two, Spamsieve and “Add invitations automatically”

The latter was nonsensical; seemingly take all messages and do nothing with them. I’ve deleted it.

I’m unaware of any scripts, I’ve certainly never created one.

Thanks for taking an interest in this! It’s bugged me for a long time. Not hard to work around, but an irritation. Between this and “Mail thinks this is junk” filtering of good messages when junk filtering is completely turned off in mail I do some hair pulling.

This is strange because you said you’re using a Spam mailbox under “On My Mac,” but the error message seems to indicate an error moving messages to a Spam mailbox on the IMAP server. To be extra clear about what’s doing what, I would suggest creating a mailbox under “On My Mac” called SpamSieve and change the SpamSieve rule in Mail’s preferences to use that mailbox. Then see whether the error message that you receive changes.

I have good, if somewhat frustrating news. I tried what you suggested and also tried to follow the logic of how messages were being moved (I’d also created a “Smart mailbox” to capture anything that went into any of the half dozen spam and junk folders that I have ). Something I did seems to have cured the error, but I don’t know what. It’s been several days and the error has not recurred, everything is going where it should. One way or another your advice appears to have worked, Thanks! Wish I could better document what was happening and how I fixed it. (Hope I haven’t cursed myself now!)

1 Like

Hi, I’ve been recently having the same issue. For years I have been using a spam folder in iCloud, so that I have all my email (even spam) on all my devices. Moving the spam folder to “On My Mac” would not be an optimal set up for me. Beside, creating that local folder, any other troubleshooting advice?

You could:

Thank you. I’ll give the first 2 a try and report back.

So I created a new mail box on the cloud and the problem has not surfaced in a number of days

1 Like