diff --git a/modoboa_installer/scripts/postfix.py b/modoboa_installer/scripts/postfix.py index c9d964f2..42f96a56 100644 --- a/modoboa_installer/scripts/postfix.py +++ b/modoboa_installer/scripts/postfix.py @@ -77,7 +77,7 @@ def post_run(self): chroot_dir = "/var/spool/postfix/etc" chroot_files = ["services", "resolv.conf"] if not os.path.exists(chroot_dir): - os.mkdir(chroot_dir) + utils.mkdir(chroot_dir) for f in chroot_files: path = os.path.join(chroot_dir, f) if not os.path.exists(path): diff --git a/modoboa_installer/utils.py b/modoboa_installer/utils.py index 0550f5e1..ac2548e9 100644 --- a/modoboa_installer/utils.py +++ b/modoboa_installer/utils.py @@ -76,7 +76,7 @@ def dist_name(): def mkdir(path, mode, uid, gid): """Create a directory.""" if not os.path.exists(path): - os.mkdir(path, mode) + os.makedirs(path, mode) else: os.chmod(path, mode) os.chown(path, uid, gid)