]> git.proxmox.com Git - pmg-api.git/commitdiff
do not create /cluster/<cid> unconditionally
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 18 Nov 2020 14:52:54 +0000 (15:52 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Nov 2020 16:01:43 +0000 (17:01 +0100)
while looking through the spooldir creation we noticed the mkdir call
on a relative path. This creates a '/cluster/<cid>/' directory on each system
which has a cluster.conf (<cid> 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 <d.csapak@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/MailQueue.pm

index e0f56b91ab9e5f814b0ed249d2d27396b2404b5b..435f16869ff4d4dd21044d94e2b78dfa3de7127f 100644 (file)
@@ -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);