Re: Interaction of reformail -D with EX_TEMP FAIL

Sam Varshavchik <[email protected]> Tue, 10 Mar 2026 20:13:32 -0400
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--===============7856843560470531694==
Content-Type: multipart/signed;
    boundary="=_ripper.email-scan.com-1645572-1773188012-0001";
    micalg=pgp-sha1; protocol="application/pgp-signature"
Content-Transfer-Encoding: 8bit

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_ripper.email-scan.com-1645572-1773188012-0001
Content-Type: text/plain; format=flowed; delsp=yes; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Julian Gilbey writes:

> 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)

Clue #1. This is maildrop checking to see if /var/mail/jdg is a maildir.  
It's not, it does not exist.

> 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

Clue #2: Ok, this file exist, it's a regular file. /var/mail/jdg is not a  
maildir. It's a plain file. Conclusion: it's an mbox file.

> 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)

And, maildrop cannot create a lock file. I take it, it was not your intent  
to request maildrop to deliver your mail to /var/mail/jdg.

There was nothing in your .mailfilter that you showed that referenced this  
mbox file.

I think what you overlooked what happens when the no "to" command gets  
executed, from .mailfilter, and maildrop finishes executing .mailfilter:  
maildrop attempts to execute the default mail delivery instruction, which is  
to deliver mail to the default mailbox, which is /var/mail/$USER in your  
case.

So the sequence of events was:

1) A new message is received, your .mailfilter will go through the motions  
and execute the to command, completing the mail delivery

2) A duplicate arrives, so the if statement skips the to statement, and a  
default delivery attempt is made. Hillarity ensues.

Solution: add an explicit

exit

statement at the end of your .mailfilter


--=_ripper.email-scan.com-1645572-1773188012-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRupkKLJP96aW75pIOKYPgoojZS4gUCabCzrAAKCRCKYPgoojZS
4tOrAQDv4y4RVLHXse0+0thYkM7YHCBNYr/XbM7ouLGgtOVAoQD+OEsIDnCOD50x
uo/wXZqOqA6mfDCN7I4Xm7lF2phmRgU=
=0P0N
-----END PGP SIGNATURE-----

--=_ripper.email-scan.com-1645572-1773188012-0001--


--===============7856843560470531694==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7856843560470531694==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

--===============7856843560470531694==--