Section &<<SECID136>>& contains further information.
+.new
+This option should not be used when other message-handling software
+may duplicate messages by making hardlinks to the files. When that is done Exim
+will count the message size once for each filename, in contrast with the actual
+disk usage. When the option is not set, calculating total usage requires
+a system-call per file to get the size; the number of links is then available also
+as is used to adjust the effective size.
+.wen
+
.option quota_warn_message appendfile string&!! "see below"
See below for the use of this option. If it is not set when
JH/35 Bug 2409: filter out-of-spec chars from callout response before using
them in our smtp response.
-JH/35 Have the general router option retry_use_local_part default to true when
+JH/36 Have the general router option retry_use_local_part default to true when
any of the restrictive preconditions are set (to anything). Previously it
was only for check_local user. The change removes one item of manual
configuration which is required for proper retries when a remote router
handles a subset of addresses for a domain.
+JH/37 Appendfile: when evaluating quota use (non-quota_size_regex) take the file
+ link count into consideration.
+
Exim version 4.92
-----------------
struct dirent *ent;
struct stat statbuf;
-dir = opendir(CS dirname);
-if (dir == NULL) return 0;
+if (!(dir = opendir(CS dirname))) return 0;
-while ((ent = readdir(dir)) != NULL)
+while ((ent = readdir(dir)))
{
uschar * path, * name = US ent->d_name;
DEBUG(D_transport)
debug_printf("check_dir_size: stat error %d for %s: %s\n", errno, path,
strerror(errno));
- continue;
}
-
- if ((statbuf.st_mode & S_IFMT) == S_IFREG)
- sum += statbuf.st_size;
- else if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
- sum += check_dir_size(path, &count, regex);
+ else
+ if ((statbuf.st_mode & S_IFMT) == S_IFREG)
+ sum += statbuf.st_size / statbuf.st_nlink;
+ else if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
+ sum += check_dir_size(path, &count, regex);
}
closedir(dir);