How to flush mail
queue in sendmail under linux?
If you want to do a one-off queue run:
[root@test ~]#sendmail -q
It will process each message in the queue and forcefully send
the queued mails (add the -v option for logging).
For checking sendmail logs
[root@test ~]#tail -f /var/log/maillog
[root@test ~]#mailq
/var/spool/mqueue is empty
Total requests: 0
–
[root@test ~]#mailq
/var/spool/mqueue is empty
Total requests: 0
–
[root@test ~]#vi /var/spool/mqueue
— mail queue
How to flush sendmail
queue under linux sendmail mailq command in linux how to flush mail queue in
sendmail under linux
If you are worried about sendmail pending mail flush do the
following two things.
1) manually method –> delete /var/spool/mail/*.* files
in this dir –> delete /var/mqueue/*.* files
then check if all mail gone using mailq command.
all mail will be deleted.
2) using command:- use simple command
[root@test ~]#sendmail -v -q
use root prompt. it will flush all pending mails. Rest to
confirm u can run mailq command if all are really gone !!….
3) if u want particular domain or user or recipient mail to
delete use this command
[root@test ~]#sendmail -qS -v test.com
it will delete all mail from
*@test.com
[root@test ~]#sendmail -qR -v hotmail.com
It will delete all mail
from recipient of hotmail.com.
ReplyDeleteThank you for sharing this Information.
I also found Various useful links related to Devops, Docker & Kubernetes
Kubernetes Kubectl Commands CheatSheet
Introduction to Kubernetes Networking
Basic Concept of Kubernetes
Kubernetes Interview Question and Answers
Kubernetes Sheetsheat
Docker Basic Tutorial
Linux Sar Command Tutorial
Linux Interview Questions and Answers
Docker Interview Question and Answers
OpenStack Interview Questions and Answers