how to delete emails with attachments?

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,628
363
cPanel Access Level
Root Administrator
Hey there! I'm not seeing a way to do this right now. The current search uses DoveADM commands available here:


and I'm not finding anything about searching by messages with attachments.

If you'd like to submit a feature request using the link in my signature I can make sure our developers review that!
 

callumradband

Registered
Jun 22, 2022
2
0
1
burgess hill
cPanel Access Level
Reseller Owner
This is my first time doing anything like this im not to sure how to do it. is there a tutorial on this i just see a custom query section when looking at manage disk usage but i dont have a clue what to type into there is there a way i can delete everything over 10mb and before a certain date
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,628
363
cPanel Access Level
Root Administrator
If none of the pre-filled options work for you, the only option is to learn the doveadm custom query structure. I don't have any examples of that ready off the top of my head since this is a fairly recent feature we've added, but all the documentation is here: Email Disk Usage | cPanel & WHM Documentation which then forwards you to that link I sent earlier.

If I'm reading that correctly, you would use "doveadm search LARGER 30M" to get everything that is larger than 30M, but that documentation is nicely laid out with all the available options.