hi all, use systemd start postfix faild, here is detail:
my os is ubuntu-gnome 16.04.03, first I use apt install postfix and other
software, for some reason, I reinstalled it by complied source code, version
was postfix-3.2.2, installed successfully, but when use systemctl start
postfix, it failed
postfix.service - LSB: Postfix Mail Transport Agent
Loaded: loaded (/etc/init.d/postfix; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since 三 2017-09-13 09:13:09 CST; 8s
Process: 6642 ExecStart=/etc/init.d/postfix start (code=exited,
9月 13 09:13:07 xiedeacc.com systemd: Starting LSB: Postfix Mail Transport
9月 13 09:13:07 xiedeacc.com postfix: * Starting Postfix Mail
Transport Agent postfix
9月 13 09:13:08 xiedeacc.com postfix/postfix-script: fatal: usage:
postfix start (or stop, reload, abort, flush, check, status,
9月 13 09:13:09 xiedeacc.com postfix: ...fail!
9月 13 09:13:09 xiedeacc.com systemd: postfix.service: Control process
exited, code=exited status=1
9月 13 09:13:09 xiedeacc.com systemd: Failed to start LSB: Postfix Mail
9月 13 09:13:09 xiedeacc.com systemd: postfix.service: Unit entered failed
9月 13 09:13:09 xiedeacc.com systemd: postfix.service: Failed with result
That particular command must be an Ubuntu or Debian extension for
systemd. If you build your Postfix package, you need to provide
your own systemd configuration that matches that package. The
upstream Postfix has no specific systemd support, that's up to the
O/S distribution package maintainers.
>I know was postmulti arguments problem, but I want to know is: is this
>postfix version difference or ubuntu make some change, or
>/etc/init.d/postfix has some special?
The Debian / Ubuntu start script probably expects some distribution specific configuration to be in place.
Your best bet is to remove the existing init script for postfix and create a systemd unit for your needs.
On Tue, Sep 12, 2017 at 09:57:17PM -0700, xiedeacc wrote:
> you're right, I'm learning to write a systemd style script, but not familiar
> with postmulti
Start scripts don't need to know anything about postmulti. The
whole point of the design is that "postfix start" starts all
the relevant Postfix instances.
Fancy peeking under the hood is only needed if the init system
wants to keep track of all the Postfix instances after they're
started. This is rarely needed, Postfix does not have a habit of
crashing or exiting silently, ... Proper monitoring detects any
downtime without any need for init integration. Indeed if Postfix
was crashing, it is not clear that you'd want the init system
to take any automated action.
Just go with a SysV init.d style script if still possible with