Re: Interaction of reformail -D with EX_TEMPFAIL
Julian Gilbey <[email protected]> Tue, 10 Mar 2026 22:38:55 +0000
| Newsgroups | gmane.mail.maildrop |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 10, 2026 at 07:56:49AM -0400, Sam Varshavchik wrote:
> Julian Gilbey writes:
> [...]
> > Is there any straightforward way of handling this strange situation
> > with maildrop, that is, to ensure that an EX_TEMPFAIL doesn't leave a
> > trace in the seen-msgids file?
>
> When solving an XY problem, the correct approach is to solve the X, that is
> determine why mail delivery fails with an EX_TEMPFAIL, instead of solving
> the Y, figuring out a way to try again.
>
> Presuming that you don't see anything in syslog or maillog, as a measure of
> last resort, one could invoke maildrop under strace:
>
> | strace -s 256 -o /var/tmp/maildrop.strace.$$ maildrop
> [...]
Thanks Sam!
Ah, you are so wise!
I'm not sure where the error messages (to stdout) are meant to be
logged by exim, but they seem to vanish into the ether... But here's
what strace has to say (and it gave an error on the very first test
message I tried; this may or may not be the cause of the other errors
I've observed):
newfstatat(AT_FDCWD, "/var/mail/jdg/tmp", 0x7ffc77e06440, 0) = -1 ENOTDIR (Not a
directory)
rt_sigprocmask(SIG_BLOCK, [HUP INT ALRM TERM], NULL, 8) = 0
newfstatat(AT_FDCWD, "/var/mail/jdg", {st_mode=S_IFREG|0660, st_size=952678688, ...}, 0) = 0
uname({sysname="Linux", nodename="erdos", ...}) = 0
getpid() = 1731543
openat(AT_FDCWD, "/var/mail/1731543.0.erdos", O_WRONLY|O_CREAT, 0644) = -1 EACCES (Permission denied)
futex(0x7fd42f456230, FUTEX_WAKE_PRIVATE, 2147483647) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP INT ALRM TERM], NULL, 8) = 0
write(2, "/usr/bin/maildrop", 17) = 17
write(2, ": ", 2) = 2
write(2, "Unable to create a dot-lock at /var/mail/1731543.0.erdos.\n", 58) = 58
write(2, "\n", 1) = 1
[...]
exit_group(75) = ?
+++ exited with 75 +++
I don't know why it's trying to create a dot-lock file in /var/mail;
it doesn't have permission to do so. Why is it not using flock()
instead?
Best wishes,
Julian