On Sat, Sep 17, 2022 at 11:11:51PM +0200, Yvan Masson wrote: > My question is: how cron daemon and mail command know that they should > contact openSMTPd, and how? Do they try by default on localhost:25 or > /run/smtpd.sock? I could not find any clue, nor in cron manpages nor in > mailutils online documentation.
mail(1) or mailx(1) or similar utilities run the /usr/sbin/sendmail program to inject a new message into the local MTA. /usr/sbin/sendmail was of course originally provided by the sendmail package. But later MTAs implement a /usr/sbin/sendmail compatible wrapper so that all the utilities that send mail don't have to change.