Chris Lewis wrote:
The version I've derived from Steve's works during hook_rcpt.
Yes, but assigning to $_[0] is a horrible way to do it. We should have a supported and cleaner way to modify the email address at RCPT TO time...
Ah, we do have a supported way... a hook called rcpt_pre which returns OK, $new_address (with angle brackets).
Given the way my qpsmtpd works, hook_data is way way too late. Too much has already been decided by that point.
I don't mean data_post - I mean right on the DATA command, which happens immediately after the RCPT TOs in a normal SMTP transaction... But then see above for the right solution.
Matt.