From b6283709c3813c6b1e357a073880b2a9ceb2e703 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 9 Dec 2021 23:04:36 -0700 Subject: add POSTFIX:DAEMON-SOCKET-DIRECTORY Signed-off-by: Sean Whitton --- src/property/postfix.lisp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/property/postfix.lisp') diff --git a/src/property/postfix.lisp b/src/property/postfix.lisp index a33bbbd..82a2ae2 100644 --- a/src/property/postfix.lisp +++ b/src/property/postfix.lisp @@ -55,3 +55,16 @@ defaults to the first argument to PROPAPP." (apply f args)) (file:does-not-exist (strcat (unix-namestring file) ".db"))) :args (cdr propapp))) + +(defproplist daemon-socket-directory :posix + (daemon-user &optional (daemon-group daemon-user) (name daemon-user) + &aux (dir (ensure-directory-pathname + (merge-pathnames name #P"/var/spool/postfix/")))) + "Create directory NAME in /var/spool/postfix in which a daemon can create a +Unix domain socket for communication with Postfix. Commonly used for milters +like OpenDKIM, OpenDMARC, etc.." + (:desc #?"Postfix daemon socket directory created for ${daemon-user}") + (installed) + (file:directory-exists dir) + (file:has-ownership dir :user daemon-user :group daemon-group) + (file:has-mode dir #o750) (user:has-groups "postfix" daemon-group)) -- cgit v1.2.3