Closed ravivgolov closed 5 months ago
In mail.files you can find all the metadata including the sender, and match the id to the messages in zone-queue.
I'm not sure what happens if you only remove the mail.chunks and mail.files without also removing the message from the queue. I think they may fail to send perpetually and automatically get garbage collected after 30 days? Not sure.
I would probably have removed the messages from zone-queue instead, as orphaned files/chunks are removed automatically.
I have only removed mail chunks that seemed to have been taken out of the queue.
It seems like removing the mail chunks is sufficient. Phew.
zone-mta> db["zone-queue"].countDocuments({}); 18 zone-mta>
Ah, seems there is some cleanup in place then if zonemta encounters a queued message without an associated file in gridfs. Nice!
Thank God that exists, I need to develop a remove queue function in Zonemta admin that performs deletion by filter. How do you all handle sudden spam bombs?
Rate limits and reputation management in rspamd would be a good start...
You can also have automatic alerting etc. Standard stuff
Hello
I need to urgently remove around 10,000 emails from a specific sender domain from the queue. I'm currently connected to Mongosh and have switched to the zone-mta db. However, I'm only able to see the recipient, and not the sender. How can I filter and remove the emails from the specific sender domain?
I simply removed from the mail.chunks - will that also remove it from the zone-queue db? Is that enough?