Download raw body.
On 2024/08/22 09:45:31 +0200, Sven M. Hallberg <pesco@khjk.org> wrote: > Another problem with vacation, at least in combination with smtpd(8) is > that it will exit(0) when it determines that it wants to do nothing with > the particular message. This happens, typically, after inspecting the > headers and finding that this message is not directly addressed (via To: > or Cc:) to the user. So it exits without consuming the rest of the > message. > > OpenSMTPd will interpret this as "mda terminated prematurely", treat the > message as not delivered, keep it in the queue, and report warnings > and eventual failure to its unsuspecting originator. > > Should smtpd be okay with an early exit(0) or should vacation always > fully consume its input? Patch for the latter case below; applies on top > of my previous one. I'd like to double-check with gilles@ that our current requirement for mda script to consume all the input is on purpose. Skimming through postfix documentation I don't see mentions of this, but sendmail' vacation has a eatmsg() function that is equivalent to your done(). Otherwise, your diff looks fine to me, maybe just with fread() instead of a fgets(), but that's a nitpick.