I want to be able to delete specific email message from all mailboxes of one domain, does Dovecot has this type of functionality OR are there any known good solution for this? It's Maildir
format and the domain is represented as /var/vmail/domain.tld/
.
The problem
many disposable, one-shot bulk emails, often with multi-megabyte attachments.
What have I tried
I have looked to doveadm Batch, Altmove, Expunge commands, none of which seems to do the (exactly this type of) job?
What I'd like to avoid if possible
The last resort: grep
recursively by either Message-ID
header or ESMTP id
part of one of the multiple Received
headers.
EDIT: Thanks for comments and answer so far, by reading them I realize that I failed to make a point: it is not a SPAM issue - those bulk emails are perfectly legitimate but after a while completely unnecessary and since they weigh multi MBs the storage problem needs to be prevented.