How to remove all [System] mails from mailqueue?
How to remove all queued exim mails where sender is [System] ?
or all queued emails which body contains certain phrasse?
i have WHM root access
(via command line preferably)
---
This command removed somethins and is claimed to "removing failed delivery messages to (likely) non-existent senders: "
[QUOTE]exiqgrep -i -f '<>' | xargs exim -Mrm
-
Hello :) The following third-party document should be of help to you: Exim CheatSheet Thank you. 0 -
thx, but i did not found command that would do this on above mentioned url. 0 -
[quote="postcd, post: 1706772">How to remove all queued exim mails where sender is [System] ? or all queued emails which body contains certain phrasse?
The URL I referenced shows: [QUOTE]To delete all queued messages containing a certain string in the body: root@localhost# grep -lr 'a certain string' /var/spool/exim/input/ | \ sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
Thank you.0 -
watch the text bellow that command: "If you are deleting these files directly, YOU ARE DOING IT WRONG! Use the appropriate exim command to properly deal with the queue." im unsure what does it mean, but i dont know how to use above command to delete the messages containing before mentioned phrasse 0 -
It's stating that it's better to use a command such as "exim -Mrm" (As in the example) than to use "rm" to directly remove messages from the directory. Thank you. 0 -
what is the command to remove [System] sender emails? 0 -
One command to use would be: exiqgrep -i -f '' | xargs exim -Mrm
However, you should replace "System" with the actual "FROM" address if you notice it's different. Please keep in mind that users will not always simply provide you with the exact commands to use. Often times, you will get referred to documents or third-party websites where you must formulate those commands on your own. Thank you.0 -
Yours mentioned command says: "exim: no message ids given after -Mrm option" but i dont know these ids, i want to delete all that match the mentioned [System] phrasse. From WHM queue manager i can filter based on Sender/Recipient, but when i enter System or [System] it dont shows anything even there is alot of them in queue. 0 -
Right, review a message header, and look to see where the "FROM" address stems from. You can replace "system" with that "FROM" address in the command I provided. Thank you. 0 -
my queue is now empty so i cant get message header as you suggest.. i think i can get it like: exim -bp then i know messageID, so i do: exim -Mvh messageID but FROM addresses are random ones, its generated by spam script. so are you sure your advice will be working there? I have not found on how to delete example all emails containing certain phrasse in body, or i found example account name forumhea was abused so i found in spam mail [QUOTE]Mail Control Data: mailnull 47 12 1409064138 0 -helo_name subdomain.mydomain.net -host_address 127.0.0.1.52580 -host_name localhost -interface_address 127.0.0.1.25 -received_protocol smtp
so you see "-helo_name subdomain.mydomain.net" (i replaced so its hidden what is real domain name), which identiffied abuse account which is sending spam emails.. so not sure if i can list/delete mails based on this value "-helo_name XYXY"? there are some handy exim commands0 -
You can always play around with the "exiqgrep" command to see the results without deleting the messages. EX: exiqgrep -i -f ''
This leaves out the removal part of the command, so you can test out different strings and see which one works best for you before actually adding in the removal aspect. Thank you.0
Please sign in to leave a comment.
Comments
11 comments