On Sun, Jan 30, 2022 at 03:33:16PM +0100, Christoph Pleger wrote: > > You're mistaken. On input, Postfix provides no LMTP server, and no > > support for receiving messages from external programs via unix-domain > > sockets. > > I have the following line in master.cf: > > usmtp unix n - - - - smtpd
I forgot about that. In this case smtpd(8) pretends it got a connection from "localhost" and proceeds accordingly. Runnin smtpd(8) in this way may not be officially supported. A program with sufficient privileges to access /var/spool/postfix/public (restricted to the $mail_owner user and/or $setgid_group group) can inject messages via that UNIX-domain socket, and you can even specify some other directory via e.g. ../ext/usmtp unix ... after: mkdir -m 0755 /var/spool/postfix/ext/ But if you're specifically looking to limit access to privileged (or internal to Postfix) clients, then "public" may be a reasonable choice. -- Viktor.