[imp] IMP E-Mail Send Hook (postprocess, recipient address validation)

Harakiri harakiri_23 at yahoo.com
Thu Mar 26 11:38:58 UTC 2009


Hi,

im using the pear smtp package to sent all mails from imp webmailer to an internal postfix filter. The problem is the pear smtp package has no support for error handling (while sendmail binary has, and imp code seems to handle this correctly, but sendmail doesnt allow to send to other ports then 25).

Briefly speaking, the filter will not allow specific recipient e-mail domains and denies sending the message - the pear smtp package  has no support for standard "recipient not allowed" error codes like 451 - the newest version at least return there is an error but not which one. So IMP can only write to the end user "there was an error sending your message" but it cannot show "recipient XYZ is not allowed".

Therefor i thought of a send hook - i didnt found one in the sources - does there exist one?

Alternativly - im about to hack the Compose.php

 function sendMessage($email, &$headers, &$message, $charset)

to hook in my own validation for recipients address if nobody has a cleaner solution.

Thanks


      


More information about the imp mailing list