Ben Morrow writes:
In any case, it's likely that the delivery process looks in the user's
home directory even if delivery is to a separate mail spool, unless
you've taken steps to prevent this.
I can confirm this. I think the reason is that dovecot changes to the
user's home directory so that it has a place to dump core. This causes
problem for my setup since I user per-user NFS mounts, so a delivery to an
internal mailing list caused hundreds of NFS automounts.
I patched this behaviour out, but there is probably a more elegant solution
(unset MAIL_STORAGE_SERVICE_FLAG_ENABLE_CORE_DUMPS? How?).
Joseph Tam
--- ./src/lib-storage/mail-storage-service.c~ Sat May 19 08:42:12 2012
+++ ./src/lib-storage/mail-storage-service.c Mon Jun 25 22:00:57 2012
@@ -615,21 +615,21 @@
- if ((user->flags & MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP) != 0 &&
- (user->flags & MAIL_STORAGE_SERVICE_FLAG_ENABLE_CORE_DUMPS) == 0) {
- /* we don't want to write core files to any users' home
- directories since they could contain information about other
- users' mails as well. so do no chdiring to home. */
- } else if (*home != '\0' &&
- (user->flags & MAIL_STORAGE_SERVICE_FLAG_NO_CHDIR) == 0) {
- /* If possible chdir to home directory, so that core file
- could be written in case we crash. */
- if (chdir(home) < 0) {
- if (errno == EACCES) {
- i_error("%s", eacces_error_get("chdir",
- t_strconcat(home, "/", NULL)));
- } if (errno != ENOENT)
- i_error("chdir(%s) failed: %m", home);
- else if (mail_set->mail_debug)
- i_debug("Home dir not found: %s", home);
- }
- }
+// if ((user->flags & MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP) != 0 &&
+// (user->flags & MAIL_STORAGE_SERVICE_FLAG_ENABLE_CORE_DUMPS) == 0) {
+// /* we don't want to write core files to any users' home
+// directories since they could contain information about other
+// users' mails as well. so do no chdiring to home. */
+// } else if (*home != '\0' &&
+// (user->flags & MAIL_STORAGE_SERVICE_FLAG_NO_CHDIR) == 0) {
+// /* If possible chdir to home directory, so that core file
+// could be written in case we crash. */
+// if (chdir(home) < 0) {
+// if (errno == EACCES) {
+// i_error("%s", eacces_error_get("chdir",
+// t_strconcat(home, "/", NULL)));
+// } if (errno != ENOENT)
+// i_error("chdir(%s) failed: %m", home);
+// else if (mail_set->mail_debug)
+// i_debug("Home dir not found: %s", home);
+// }
+// }