Postfix Que

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!
sixdegreeAsked:
Who is Participating?
 
Cyclops3590Connect With a Mentor Commented:
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
mailq
>flush the queue of all emails (basically through all emails back into active queue)
postqueue -f
>delete a specific email
postsuper -d <msg id>
0
 
xDamoxCommented:
Hi,

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

http://www.die.net/doc/linux/man/man1/mailq.postfix.1.html
0
 
xDamoxCommented:
also try running:

mailq

command
0
 
sixdegreeAuthor Commented:
doing the command of 'mailq' lists out each and every email in there.  I'm looking for a total.
0
 
Cyclops3590Commented:
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
0
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.

All Courses

From novice to tech pro — start learning today.