On Fri, Feb 25, 2011 at 12:58:22AM +0100, Christian Roessner wrote:

> I am currently preparing an upstart script for Ubuntu. I tried several
> ways do use /usr/sbin/postfix, but I never would get the master PID. So
> I looked at the postfix.c code.

There is a no single "master pid". A fully-general Postfix MTA may run
multiple master instances.

Postfix startup is not just a fork/exec of master(8), queue files that
got renamed (perhaps restored) have to be recovered via "postsuper -s".
Required "missing" directories have to be created. Basic security checks
performed, all this for multiple instances.

Don't run Postfix on laptops, something much simpler that drains a disk
queue to a fixed SMTP smart-host is likely best for consumer machines.

Do run Postfix on servers, but be prepared to not break advanced
configurations, and let Postfix do its own startup and shutdown.

Attempts to monitor the status of a complex multi-component Postfix MTA---as
though it were a monolithic system that is either entirely up or entirely
down---based on observations of a single process are likely to fail.
It would be better to not monitor at all than to do it badly.

I monitor Postfix by sending messages and observing their arrival
or non-arrival at a monitoring sink. Automated re-start is not that
interesting, the master service never crashes (not once in the last 10
years of running multiple hosts doing 2,000,000 messages a day). Automated
re-start of the Postfix master(8) service is a non-problem.

-- 
        Viktor.

Reply via email to