Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a quick question. I have two instances of Postfix running on an Ubuntu server and I want to write some scripts to email our server admin Postfix statistics (queue count, sent, etc). How would I get that information on the second instance?

When I run the following command:

postqueue -p

Is that the information of the first instance, second or both? If its not information on the second instance, how would I get that information?

Thanks for your help!

share|improve this question
up vote 5 down vote accepted

By default, postqueue will give you information regarding your "primary" Postfix instance (where "primary" means "the instance using configuration files in the default location", which is generally /etc/postfix).

According to the man page, you can use the -c option to point postqueue at the configuration directory for your second instance.

Note that most of the postfix command line tools have a -c option.

share|improve this answer

Please take a look at the well-known pflogsumm script; it generates very complete statistics for each instance.

share|improve this answer

For postfix version 2.6 and later, you can use postmulti shipped by postfix. Excerpt from man 1 postmulti:

The postmulti(1) command allows a Postfix administrator to manage multiple Postfix instances on a single host.

postmulti(1) implements two fundamental modes of operation. In iterator mode, it executes the same command for multiple Postfix instances. In life-cycle management mode, it adds or deletes one instance, or changes the multi-instance status of one instance.

Thus for invoking postqueue of specific instance you can use postmulti -x, for example:

postmulti -i postfix-secondinstance -x postqueue -p
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.