May 21, 2012
tom

How to get Postfix statistics of second instance?

Question

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!

Asked by thiesdiggity

Answer

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.

Answered by larsks

Related posts:

  1. Canonical configuration for multiple-instance Postfix?
  2. get statistics about postfix
  3. Choose relayhost based on the postfix smtpd instance
  4. How read mail from /var/spool/postfix/deferred?
  5. Postfix isn’t running but won’t start because “the Postfix mail system is already running”

Leave a comment