From: Stoiko Ivanov Date: Wed, 18 Nov 2020 14:52:54 +0000 (+0100) Subject: do not create /cluster/ unconditionally X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b42a923daec2869295c0fadc8826edfe4e472442;p=pmg-api.git do not create /cluster/ unconditionally while looking through the spooldir creation we noticed the mkdir call on a relative path. This creates a '/cluster//' directory on each system which has a cluster.conf ( being the node's clusterid). This is not used since the spooldirs are in '/var/spool/pmg/cluster/' Simply drop the mkdir call, since the spooldirs get created upon cluster creation (PMG::API2::Cluster::create) and joining to an existing cluster. Reported-by: Dominik Csapak Signed-off-by: Stoiko Ivanov --- diff --git a/src/PMG/MailQueue.pm b/src/PMG/MailQueue.pm index e0f56b9..435f168 100644 --- a/src/PMG/MailQueue.pm +++ b/src/PMG/MailQueue.pm @@ -285,7 +285,6 @@ sub quarantine_mail { eval { if ($lcid) { my $subdir = "cluster/$lcid/$subpath"; - mkpath $subdir; ($fh, $uid, $path) = new_fileid ($spooldir, $subdir); } else { ($fh, $uid, $path) = new_fileid ($spooldir, $subpath);