I'm considering submitting a patch that enhances
Qspmtpd::Transaction::body_fh() to (1) call body_spool() if the message
was not already spooled to disk; and (2) dup the filehandle before
returning it, so that if a plugin that calls body_fh, or an external
module that the plugin passes the fh to, happens to seek() to some weird
place or close() the fh, bad things won't happen to plugins that use the
fh later (body_fh, body_resetpos, body_getline).
My question is, are there times when a plugin might be expecting such
modifications to body_fh, justifying splitting the second functionality
into a separate function, say, body_fh_dup() or so? I'd lean toward
making the changes directly to body_fh() but wanted to see if there were
any objections to this.
-Jared
- Qpsmtpd::Transaction::body_fh Jared Johnson
-