aboutsummaryrefslogtreecommitdiff
path: root/src/property
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-12-09 23:04:36 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-12-09 23:04:36 -0700
commitb6283709c3813c6b1e357a073880b2a9ceb2e703 (patch)
treea027323d547b13458f66583f96708db306297018 /src/property
parentd9fc9b544664867e89fab80862227be6b69a5a7c (diff)
downloadconsfigurator-b6283709c3813c6b1e357a073880b2a9ceb2e703.tar.gz
add POSTFIX:DAEMON-SOCKET-DIRECTORY
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property')
-rw-r--r--src/property/postfix.lisp13
1 files changed, 13 insertions, 0 deletions
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))