You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Jerry Malcolm <te...@malcolms.com> on 2025/12/20 21:49:50 UTC
Cleaning up mail store
Hi,
My james db has gotten totally out of control in size. I'm trying to
figure out where the messages are that I can safely delete. I looked at
the JAMES_MAILBOX table, and it has 28000+ mailboxes, most of them Spam
or Sent mailbox MAILBOX_NAMEs with spammer-like USER_NAMEs
('weed-killer-cancer-pbm1=malcolms.com@widkill.monster'. I have no clue
how or when they got created. But I'm not going down that path at the
moment. Is there any way in the database (direct sql) that I can safely
delete these mailboxes and all of the associated messages/rows in other
tables?
If that won't work, maybe there's a better option B. I haven't really
investigated it yet, but I know it's coming... I'm currently on JAMES
3.x and I'm planning to move up soon. But if I remember correctly, that
requires a significant db schema rework to move to the latest version,
correct? If so, are there any utilities to assist? Specifically, could
I create a completely new database and export/import/migrate only the
accounts/mailboxes/messages from legit accounts and just leave all of
the trash behind? Suggestions?
Thx,
Jerry
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Cleaning up mail store
Posted by Jean Helou <je...@gmail.com>.
Hi Jerry,
Have you checked the list of users (not only mailboxes) ?
It sounds like your server has been compromised somehow, either the box
itself or somehow the webadmin api or JMX port are exposed to the attackers
or you have a misbehaving user who has access.
You first need to understand how the attacker gained access to your server
and fix that before you can remedy anything, otherwise they will just do it
again.
With regards to your other question about migration I can't tell without
knowing which version of james you are running.
cheers
jean
On Sat, Dec 20, 2025 at 10:50 PM Jerry Malcolm <te...@malcolms.com>
wrote:
> Hi,
>
> My james db has gotten totally out of control in size. I'm trying to
> figure out where the messages are that I can safely delete. I looked at
> the JAMES_MAILBOX table, and it has 28000+ mailboxes, most of them Spam
> or Sent mailbox MAILBOX_NAMEs with spammer-like USER_NAMEs
> ('weed-killer-cancer-pbm1=malcolms.com@widkill.monster'. I have no clue
> how or when they got created. But I'm not going down that path at the
> moment. Is there any way in the database (direct sql) that I can safely
> delete these mailboxes and all of the associated messages/rows in other
> tables?
>
> If that won't work, maybe there's a better option B. I haven't really
> investigated it yet, but I know it's coming... I'm currently on JAMES
> 3.x and I'm planning to move up soon. But if I remember correctly, that
> requires a significant db schema rework to move to the latest version,
> correct? If so, are there any utilities to assist? Specifically, could
> I create a completely new database and export/import/migrate only the
> accounts/mailboxes/messages from legit accounts and just leave all of
> the trash behind? Suggestions?
>
> Thx,
>
> Jerry
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>