How To Manage QMail Queue In Linux Plesk?

How-To-Manage-QMail-Queue-In-Linux-Plesk

How To Manage QMail Queue In Linux Plesk?

Plesk server uses qmail as a mail server. Following are some of the qmail commands for Plesk server.

1) To check the mail queue in plesk from command line, you can use the command :

    #

/var/qmail/bin/qmail-qstat

messages in queue: 10

messages in queue but not yet preprocessed: 0

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 ( You can download it from here )

    #

/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 )

The above steps can be used to track Spammers .

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 {} \;

If you have any difficulties, please send your emails at  :: arun@24×7servermanagement.net

—————-
Regards,
Arun P.
Level-3 Systems Administrator

http://24×7servermanagement.com/

Email: Arun@24×7servermanagement.net

Share this post


24x7servermanagement