On 29/07/2021 00:17, Vincent Lefevre wrote:
> On 2021-07-28 16:49:20 -0400, Wietse Venema wrote:
>> Thanks. I agree, Postfix should start up after the network is fully
>> initialized. That includes all the network interfaces, and all the
>> network infrastructure services.
> 
> And the disks are mounted. On my Debian server, I had to add a
> /etc/systemd/system/postfix@.service.d/data-disk.conf file with
> 
> [Service]
> ExecStartPre=/bin/sh -c 'while [ ! -d /srv/d_joooj/home ]; do sleep 5; done'
> TimeoutStartSec=300
> 
> Otherwise mail was rejected after some reboots.
> 
> I don't know whether this is the right solution, but at least, this
> solved my problem.
> 

What you probably want is

RequiresMountsFor=/srv/d_joooj/home

https://www.freedesktop.org/software/systemd/man/systemd.unit.html#RequiresMountsFor=

if your service requires files in a volume that for some reason is not
mounted as part of local-fs.target.

Cheers,
Daniele

Reply via email to