# File explosion in spam folder on server

**URL:** <https://discourse.mailinabox.email/t/file-explosion-in-spam-folder-on-server/12185>\
**Category:** Help with Unusual Circumstances\
**Created:** [July 31, 2024, 9:34pm UTC](https://discourse.mailinabox.email/t/file-explosion-in-spam-folder-on-server/12185 "2024-07-31T21:34:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Synchro](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Synchro](https://discourse.mailinabox.email/u/Synchro)\
**Post date:** [July 31, 2024, 9:34pm UTC](https://discourse.mailinabox.email/t/file-explosion-in-spam-folder-on-server/12185/1 "2024-07-31T21:34:28Z")

</div>

I was having problems with sa-learn chewing tons of cpu, which I fixed by renicing it, but I had noticed Apple Mail constantly saying things like “moving 3 of 11,000 messages” when I had not asked it to do any such thing. My spam folder (that I see from Mail through IMAP) only has a couple of hundred messages in it, but if I look in `/home/user-data/mail/mailboxes/example.com/marcus/.Spam/cur/` on the server, there are 1.1 million messages. I can see the same numbers if I look at the “Account info” panel in Mail. I picked one at random, and grepped for its `message-id` (which I would expect to be unique) in the same folder, only to find that there are thousands of duplicates of this same message.

I don’t know what the components of the message filenames are, but they are like this:

```
/home/user-data/mail/mailboxes/example.com/marcus/.Spam/cur/1720817676.M740874P129203.mail.example.com,S=9020,W=9146:2,Saf

```

The messages mostly have the same `17208...` number, but the `M74...` number changes.

I deleted everything in this spam folder and it freed up 10G of disk space!

Now it’s a bit quieter, I did some more searching and found that across all users in all domains there are only 27,000 spam messages, so this was clearly an anomaly.

So, any idea what might be responsible for this file explosion? Anyone else seen large message counts in Apple Mail?

---

<div class="post-metadata">

**Author:** ![Keith\_Rettig](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/k/3bc359/32.png) [@Keith\_Rettig](https://discourse.mailinabox.email/u/Keith_Rettig)\
**Post date:** [July 31, 2024, 9:45pm UTC](https://discourse.mailinabox.email/t/file-explosion-in-spam-folder-on-server/12185/2 "2024-07-31T21:45:30Z")

</div>

I just got the same issue. 600,000+ messages just started being there.  
Is it possible that MiaB is not actually deleting messages? And now the client is recognizing them as there?
