1 (edited by Pedulla 2019-03-29 03:47:20)

Topic: Dovecot mkdir error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 MARIADB edition.
- Deployed with iRedMail the downloadable installer?
- Linux/BSD distribution name and version: ProxMox 5.3-9, so Deb 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? no pro
- New install imap log.
====
roundcube pops up: An error occurred!
Server Error: SELECT: Internal error occurred. Refer to server log for more information.

imap logs records this:
Mar 25 23:45:07 mx dovecot: imap(larry@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366

Mar 25 23:46:07 mx dovecot: imap-login: Login: user=<larry@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3470, secured, session=<HMD5rPmERLJ/AAAB>

Mar 25 23:46:07 mx dovecot: imap(larry@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)

So, yeah, I feel like I'm beating a dead horse, so to speak, because I've read several posts about the following. I've confirmed:
- storage location all lower case
- all owned by vmail:vmail
- 0700 from mail all the way down
- I'm not getting an apparmor error
- sudo -u vmail touch /mnt/mail/vmail1/net.com/p/o/s/postmaster/Maildir/test     - works fine.

What else can I check?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Dovecot mkdir error

Please show me output of commands below:

ls -dl /mnt
ls -dl /mnt/mail
ls -dl /mnt/mail/vmail1

I guess "/mnt" or "/mnt/mail" doesn't have correct permission, it should be 0755.

3 (edited by Pedulla 2019-03-28 11:17:08)

Re: Dovecot mkdir error

Thank you very much for getting back to me!

 me@mx:~$ ls -dl /mnt
drwxr-xr-x 3 vmail vmail 4096 Mar 25 18:39 /mnt

me@mx:~$ ls -dl /mnt/mail
drwxr-xr-x 8 vmail vmail 8 Mar 25 22:24 /mnt/mail

me@mx:~$ ls -dl /mnt/mail/vmail1
drwxr-xr-x 3 vmail vmail 3 Mar 25 19:02 /mnt/mail/vmail1

Should it be 0755 all the way down?

4

Re: Dovecot mkdir error

- /mnt and /mnt/mail should be root:root, 0755.
- /mnt/mail/vmail1 and all files/directories under this directory must be vmail:vmail, 0700.

5

Re: Dovecot mkdir error

Pedulla wrote:

Mar 25 23:45:07 mx dovecot: imap(larry@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366

I suggest also check all directories in this path: /mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir/

6 (edited by Pedulla 2019-03-29 04:01:35)

Re: Dovecot mkdir error

me@mx:~$ ll -d /mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36/Maildir
drwx------ 5 vmail vmail 12 Mar 25 22:46 /mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36/Maildir/
me@mx:~$ ll -d /mnt                                                               
drwxr-xr-x 3 root root 4096 Mar 25 18:39 /mnt/
me@mx:~$ ll -d /mnt/mail
drwxr-xr-x 8 root root 8 Mar 25 22:24 /mnt/mail/
me@mx:~$ ll -d /mnt/mail/vmail1/
drwx------ 3 vmail vmail 3 Mar 25 19:02 /mnt/mail/vmail1/

imap log unchanged

Mar 28 11:56:58 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366

So the directory already exists.  This would throw an error from the command line. The log says mkdir so that's confusing.  I've tried this different email users and getting the same result.

What am I missing?

7

Re: Dovecot mkdir error

If it matters, the mount is to an NFS share on FreeNAS.  But it's a single server system, no actual sharing.

8

Re: Dovecot mkdir error

Pedulla wrote:

me@mx:~$ ll -d /mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36/Maildir
drwx------ 5 vmail vmail 12 Mar 25 22:46 /mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36/Maildir/

You didn't get me. I mean, check ALL parent directories of this path.

/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36/Maildir
/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36
/mnt/mail/vmail1/net.com/l/a/r/
/mnt/mail/vmail1/net.com/l/a/
/mnt/mail/vmail1/net.com/l/
/mnt/mail/vmail1/net.com/

9

Re: Dovecot mkdir error

Using

tree -pugd /mnt

I get

/mnt
`-- [drwxr-xr-x root     root    ]  mail
    |-- [drwxr-xr-x vmail    vmail   ]  backup
    |   `-- [drwxr-xr-x vmail    vmail   ]  mysql
    |       `-- [drwxr-xr-x vmail    vmail   ]  2019
    |           `-- [drwxr-xr-x vmail    vmail   ]  03
    |               |-- [dr-------- root     vmail   ]  26
    |               |-- [dr-------- root     vmail   ]  27
    |               |-- [dr-------- root     vmail   ]  28
    |               `-- [dr-------- root     vmail   ]  29
    |-- [drwx------ vmail    vmail   ]  mlmmj
    |-- [drwx------ vmail    vmail   ]  mlmmj-archive
    |-- [drwx------ vmail    vmail   ]  public
    |-- [drwx------ vmail    vmail   ]  sieve
    `-- [drwx------ vmail    vmail   ]  vmail1
        `-- [drwx------ vmail    vmail   ]  net.com
            |-- [drwx------ vmail    vmail   ]  l
            |   `-- [drwx------ vmail    vmail   ]  a
            |       `-- [drwx------ vmail    vmail   ]  r
            |           `-- [drwx------ vmail    vmail   ]  larry-2019.03.26.03.53.36
            |               `-- [drwx------ vmail    vmail   ]  Maildir
            |                   |-- [drwx------ vmail    vmail   ]  cur
            |                   |-- [drwx------ vmail    vmail   ]  new
            |                   `-- [drwx------ vmail    vmail   ]  tmp
            |-- [drwx------ vmail    vmail   ]  p
            |   `-- [drwx------ vmail    vmail   ]  o
            |       `-- [drwx------ vmail    vmail   ]  s
            |           `-- [drwx------ vmail    vmail   ]  postmaster
            |               `-- [drwx------ vmail    vmail   ]  Maildir
            |                   |-- [drwx------ vmail    vmail   ]  cur
            |                   |-- [drwx------ vmail    vmail   ]  new
            |                   `-- [drwx------ vmail    vmail   ]  tmp
            `-- [drwx------ vmail    vmail   ]  s
                `-- [drwx------ vmail    vmail   ]  o
                    `-- [drwx------ vmail    vmail   ]  p
                        `-- [drwx------ vmail    vmail   ]  sophos-2019.03.26.04.08.23
                            `-- [drwx------ vmail    vmail   ]  Maildir
                                |-- [drwx------ vmail    vmail   ]  cur
                                |-- [drwx------ vmail    vmail   ]  new
                                `-- [drwx------ vmail    vmail   ]  tmp

39 directories

Looks right, correct?

10

Re: Dovecot mkdir error

Looks right, but what's the owner and permission of "/mnt" now?
And if you send an email to larry@net.com again, what's the new error message? we need the new error message.

11 (edited by Pedulla 2019-03-31 04:11:53)

Re: Dovecot mkdir error

me@mx:~$ ll -d /mnt
drwxr-xr-x 3 root root 4096 Mar 25 18:39 /mnt/

The log error pops up when I click the inbox for any user in Roundcube with every user in the system.  The screen message and the imap log I've posted here.

But going through the process of sending an email from one user on the system (specifically larry to sophos) to another results in this in the imap.log

Mar 30 12:59:16 mx dovecot: imap-login: Login: user=<larry@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29869, secured, session=<bmfmOFWFXuF/AAAB>
Mar 30 12:59:16 mx dovecot: imap(larry@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 12:59:16 mx dovecot: imap(larry@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 12:59:16 mx dovecot: imap-login: Login: user=<larry@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29871, secured, session=<xuXmOFWFZOF/AAAB>
Mar 30 12:59:16 mx dovecot: imap(larry@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 12:59:16 mx dovecot: imap(larry@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 12:59:30 mx dovecot: imap-login: Login: user=<larry@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29879, secured, session=<+za5OVWFlOF/AAAB>
Mar 30 12:59:30 mx dovecot: imap(larry@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 12:59:30 mx dovecot: imap(larry@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 12:59:30 mx dovecot: imap-login: Login: user=<larry@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29883, secured, session=<Jye9OVWFnuF/AAAB>
Mar 30 12:59:30 mx dovecot: imap-login: Login: user=<larry@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29884, secured, session=<2je9OVWFoOF/AAAB>
Mar 30 12:59:30 mx dovecot: imap(larry@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 12:59:30 mx dovecot: imap(larry@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 12:59:30 mx dovecot: imap(larry@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 12:59:30 mx dovecot: imap(larry@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/l/a/r/larry-2019.03.26.03.53.36//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366

And from sophos to larry:

Mar 30 13:06:18 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30033, secured, session=<r4QOUlWFdOZ/AAAB>
Mar 30 13:06:18 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:18 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:18 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30035, secured, session=<TgwPUlWFeuZ/AAAB>
Mar 30 13:06:18 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:18 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:19 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30037, secured, session=<04sSUlWFgOZ/AAAB>
Mar 30 13:06:19 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:19 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:19 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30039, secured, session=<HJ4SUlWFhuZ/AAAB>
Mar 30 13:06:19 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:19 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:23 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30042, secured, session=<z55VUlWFmOZ/AAAB>
Mar 30 13:06:23 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:23 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:23 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30044, secured, session=<+f9VUlWFnuZ/AAAB>
Mar 30 13:06:23 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:23 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:42 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30065, secured, session=<27Z8U1WFAud/AAAB>
Mar 30 13:06:42 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:42 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:43 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30067, secured, session=<vIWAU1WFCOd/AAAB>
Mar 30 13:06:43 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:43 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:06:43 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30069, secured, session=<+saAU1WFDud/AAAB>
Mar 30 13:06:43 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:06:43 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:07:43 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30091, secured, session=<9VgUV1WFuOd/AAAB>
Mar 30 13:07:43 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:07:43 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:08:43 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30112, secured, session=<DO2nWlWFZOh/AAAB>
Mar 30 13:08:43 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:08:43 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366
Mar 30 13:09:43 mx dovecot: imap-login: Login: user=<sophos@net.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30172, secured, session=<aog7XlWFDOl/AAAB>
Mar 30 13:09:43 mx dovecot: imap(sophos@net.com): Error: Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755)
Mar 30 13:09:43 mx dovecot: imap(sophos@net.com): Namespace '': mkdir(/mnt/mail/vmail1/net.com/s/o/p/sophos-2019.03.26.04.08.23//Maildir) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +w perm: /mnt/mail, dir owned by 0:0 mode=0755) in=0 out=366

12

Re: Dovecot mkdir error

Maybe could do below tests.

Backup file /etc/dovecot/dovecot.conf first, then:
1. update 'mail_debug = yes'
2. add two lines to the end of this file.
mmap_disable = yes
mail_fsync = always
3. restart the dovecot service
systemctl restart dovecot

Then check the error message again.

Another way is to rollback the above change and umount the NFS filesystem temporarily then do the same test so we can know if this issue is related with the NFS mount or not.
At least, we could fix the issue first then mount the NFS filesystem again.

13 (edited by Pedulla 2019-04-02 23:19:45)

Re: Dovecot mkdir error

Took a bit to get through all this.
The switches did not help.
Dumping the NFS mount and just using the local drive with the appropriate rights, I'm able to send and receive to my users on the system.

So I guess my question is, Is getting this to work on a network share within the scope of support I can get here?
I don't need multiple servers getting to the share, it's just where my mass storage is.

I didn't see any specific documentation in the iRed docs for getting the mail store on NFS.  Can anyone point me to some docs/tuts that show how to use an NFS share for the mail store with iRedMail?

14

Re: Dovecot mkdir error

@neilzhang - you actually nailed it, thank you.

Reference for the solution https://wiki2.dovecot.org/NFS

mmap_disable = yes
mail_fsync = always

I switched my FreeNAS to use NFS4 as opposed to 3 but configured it to use the v3 permissions.  (check boxes in the nfs service in freenas)