On Jul 30, Simon McVittie <[email protected]> wrote:
No, if you exec /usr/sbin/sendmail, the MTA infrastructure has the option to log facts about that sendmail process, such as your uid (and in theory other facts like process ID, whether you're in a container or cgroup, AppArmor profile and so on), in mail.log or the message headers or whatever place its implementor thinks is most appropriate.
This is true[1], but I do not think that it is the main point.The big benefit of /usr/sbin/sendmail over connecting to a daemon is that mail will not be lost when the daemon is not available. Or at least I remember that this was part of the rationale for Postfix being designed this way 30 years ago: mail can always be queued to /var/spool/postfix/maildrop/. And of course being able to do this from an unprivileged process requires to either use a sgid helper (the default) or a 1777 directory (not the default, because it allows a local DoS).
[1] but also: UNIX domain sockets and SO_PEERCRED. -- ciao, Marco
signature.asc
Description: PGP signature

