1 --- a/src/transports/appendfile.c
2 +++ b/src/transports/appendfile.c
3 @@ -2580,13 +2580,24 @@
4 /* Why are these here? Put in because they are present in the non-maildir
5 directory case above. */
7 - if(Uchown(filename, uid, gid) || Uchmod(filename, mode))
9 - addr->basic_errno = errno;
10 - addr->message = string_sprintf("while setting perms on maildir %s",
14 + /* Ignore failed chown if check_owner is disabled. */
15 + if(Uchown(filename, uid, gid) && ob->check_owner)
17 + addr->basic_errno = errno;
18 + addr->message = string_sprintf("while setting owner on maildir %s",
20 + addr->transport_return = FAIL;
24 + if(Uchmod(filename, mode))
26 + addr->basic_errno = errno;
27 + addr->message = string_sprintf("while setting chmod on maildir %s",
29 + addr->transport_return = FAIL;
34 #endif /* SUPPORT_MAILDIR */