Postfix Que

Posted on 2006-06-14
Medium Priority
Last Modified: 2013-12-16
I'm not a linux Guru, but what are the steps of finding out how many items are in the active que in PostFix?

I can SSH just fine - I know that part :), but I need to know what to type at the command line.

Urgent - 500 Points!
Question by:sixdegree
  • 2
  • 2
LVL 16

Expert Comment

ID: 16904633

You could use the mailq.postfix the man page can be viewed at:

LVL 16

Expert Comment

ID: 16904652
also try running:



Author Comment

ID: 16906501
doing the command of 'mailq' lists out each and every email in there.  I'm looking for a total.
LVL 25

Accepted Solution

Cyclops3590 earned 2000 total points
ID: 16906536
mailq will actually tell you what is in the entire queue (however the active ones do have an asterisk by the ID number). if you cd to the /var/spool/postfix/active/ directory (might be different place on your box, just find postfix home, then cd to active dir).  then ls the contents, which will give you the ids of the of the msgs actively being processed by postfix. you can use
postcat <msg id>
to view the contents of the msg

fyi, a couple of nice commands to know
>view queue contents
postfix -p
>flush the queue of all emails (basically through all emails back into active queue)
postqueue -f
>delete a specific email
postsuper -d <msg id>
LVL 25

Expert Comment

ID: 16906770
if all you want is a number of msgs in active queue, technically you can use mailq, just with a couple other commands too

mailq | grep \* | wc -l

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question