Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 860
  • Last Modified:

Read mail in queue?

I have 20 mails in queue.. they have been there like forever..

I have a standard plesk qmail installation.

I would like to read the mails that are in queue an then remove/flush them.

Thanks..
0
wiceman
Asked:
wiceman
  • 2
  • 2
1 Solution
 
jlevieCommented:
On the guess that you are using Sendmail as the MTA...

Messages that are en-queue are composed of two files. One starts with qf and contains the envelope data for the message (Sender, recipients, etc). The other starts with df and contains the body of the message. The common link for the two parts of a message is the queue ID, that string that follows the qf/df. Both of these files are ordinary text files and can be read with more, cat, or any text editor. You'll have to do the interpolation of data in the qf and df files relating to sender, recipient, and content.

FYI: It isn't uncommon to find partial messages (only a qf or a df file or other remnants) in /var/spool/mqueue. Those represent failed mail transactions and anything older than the queue interval (normally 4 days) can be safely deleted.
0
 
wicemanAuthor Commented:
Hi..

Im using qmail.. is it the same way to do it?

Thanks
0
 
jlevieCommented:
I can't say, since I always use Sendmail. On a Sendmail system you  might see something like:

wilowisp# ls /var/spool/mqueue
dfi8HHebcs021118  dfi8HJuIn8025793  qfi8HHebcs021118  qfi8HJuIn8025793
dfi8HHebcs021119  dfi8HK19dk018536  qfi8HHebcs021119  qfi8HK19dk018536

If your /var/spool/mqueue looks similar the files sould be similar in content.
0
 
wicemanAuthor Commented:
I found out.. The mails are in /var/qmail/queue/mess/

0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now