-
-
Save neohitokiri/b60e77a6d845a0ac9a3d0237963c34e8 to your computer and use it in GitHub Desktop.
qmail commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How To Manage QMail Queue In Linux Plesk | |
Ref URL | |
---------------- | |
http://geeksterminal.com/qmail-commands-logs-plesk-server/580/ | |
https://www.24x7servermanagement.com/blog/how-to-manage-qmail-queue-in-linux-plesk/ | |
---------------- | |
1) To check the mail queue in plesk from command line, you can use the command : | |
/var/qmail/bin/qmail-qstat | |
2) You can examine the queue with qmail-qread. | |
# /var/qmail/bin/qmail-qread | |
3) From the qread command you get the message’s id . In the above example , one of the id is 524514 . Now you can find the file holding the email in/var/qmail/queue with “find “command. | |
# find /var/qmail/queue -iname 524514 | |
/var/qmail/queue/remote/22/524514 | |
/var/qmail/queue/mess/22/524514 | |
/var/qmail/queue/info/22/524514 | |
4) From the mail header you get the IP address | |
vi /var/qmail/queue/mess/22/524514 | |
5) If you wish to remove the emails with some patterns , you can use qmail-remove | |
qmail-remove installation: http://www.datanethosting.com/kb/plesk-linux/how-to-install-qmail-remove-on-linux-plesk | |
/etc/init.d/qmail stop | |
(Stop qmail before removing) | |
# /var/qmail/bin/qmail-remove -r -p “Time Passing” ---- (considering that “Time Passing” was the subject of the email ) | |
6) Do you wish to completely remove all the mails from queue? Just run the below commands. | |
find /var/qmail/queue/mess -type f -exec rm {} \; | |
find /var/qmail/queue/info -type f -exec rm {} \; | |
find /var/qmail/queue/local -type f -exec rm {} \; | |
find /var/qmail/queue/intd -type f -exec rm {} \; | |
find /var/qmail/queue/todo -type f -exec rm {} \; | |
find /var/qmail/queue/remote -type f -exec rm {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment