Postfix as "normal" daemon under 18.04?

Robert Heller heller at deepsoft.com
Tue Feb 9 19:21:53 UTC 2021


At Tue, 9 Feb 2021 18:03:23 +0000 "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> Content-Type: text/plain
> 
> On Tue, Feb 09, 2021 at 12:44:07PM -0500, Robert Heller wrote:
> > I installed postfix on a Ubuntu 18.04 server and copied a batch of config 
> > files from a CentOS 6 system.  But postfix under Ubuntu 18.04 is weird.  The 
> > main postfix service file (/lib/systemd/system/postfix.service) does not 
> > actually start the daemon (like it does with a CentOS 7 system), instead there 
> > is a /lib/systemd/system/postfix at .service file, that gets called to create 
> > instances.  What is going on here?  Is there some strange and exotic magic 
> > involved?
> 
> That's how systemd supports services with multiple instances.
> systemd.unit(5) (for instance) has some documentation of this.
> 
> postfix has been set up like this ever since systemd integration was
> first added to it in Debian.  Here are some notes that I've copied out
> from the changelog:

Hmmm... CentOS 7 does not seem to do it that way...

> 
>   * Add systemd integration (Closes: #715188, #755960)
>     Thanks to Cameron Norman and Shawn Landden for the initial work.
>     The final design looks like this:
>     - postfix.service is an empty service file which lets you manage
>       all instances together.
>     - each instance is controlled by a postfix at instance.service file
>     - postfix at instance services are brought into life by a new
>       systemd generator (postfix-instance-generator)
>     - the usage of "postmulti -p start/stop/reload" in postfix at .service
>       ensures that the service is not started if disabled at the
>       postmulti level
> 
> > Is it not possible to just run postfix as a regular deamon?  
> 
> It still ends up being a normal daemon, just potentially multiple
> instances of it in a way that's friendly to postmulti(1).  There isn't a
> supported way to disable the multiple-instance support (a system with a
> single instance just ends up with postfix at -.service), so I'd suggest
> rolling with it - stopping and starting postfix.service should still
> have the effect of stopping and starting all instances, since the
> template unit is set up with PartOf=postfix.service and so on.
> 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                                                                          




More information about the ubuntu-users mailing list