Re: systemd related issues

Nikolaos Milas <[email protected]>
Newsgroups gmane.mail.virus.amavis.user
Organization National Observatory of Athens
Message-ID <[email protected]>
On 8/2/2021 12:15 μ.μ., Nikolaos Milas wrote:

> How can we configure systemd to start postfix AFTER clamd@amavisd 
> (triggered by amavisd) has started?
> ...
> ...how could we configure systemd so that clamd@amavisd is also 
> stopped when amavisd is requested to stop?

Trying to answer my own question, I found:

https://serverfault.com/questions/482730/systemd-dependencies-and-boot-order

which I think provides all needed information on how to do it.

In this case, postfix.service file (/etc/systemd/postfix.service as a 
copy of /usr/lib/systemd/system/postfix.service) should include:

    Requires=amavisd.service

to make postfix start after amavisd.

Similarly, [email protected] (/etc/systemd/[email protected] as a copy of 
/usr/lib/systemd/system/[email protected]) could inlcude:

    BindsTo=amavisd.service

to force clamd@amavisd to stop when amavisd is stopped.

Finally, as my systemd know-how is insufficient, could someone please 
clarify things on the need to have clamd@amavisd service enabled or not?

Specifically, is it sufficient (for correct startup and operation of 
clamd@amavisd service) that amavisd.service includes:

    [email protected]

(already configured by default in the respective CentOS package) even if 
the service is not explicitly configured as enabled or we explicitly 
ALSO NEED to have it enabled:

    systemctl enable clamd@amavisd

and if so, why?

Thanks,
Nick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.