Hi there -- I have modified the stock qpsmtpd spamassassin plugin to iterate over the list of recipients and call spamc per-recipient, so that per-recipient spam filters & rewrite preferences can be applied, and so spamc can be responsible for adding the X-Spam-* headers and creating the spam-attachment.
Unfortunately, I am unable to rewrite the message body. Calling $transaction->body_write() appends to the message by default, and calling $transaction->body_resetpos() prior to body_write() doesn't prevent body_write() from seeking EOF. What is the correct way to rewrite the entire message body? I imagine there are consequences if I muck with the file on-disk behind qpsmtpd's back. It looks like I can set _body_file_writing and bypass the seek-EOF, but I really don't want to have to know anything about the internals of the Qpsmtp::Transaction object... Thanks, James
