How to reject the received message through the plugin? | MDaemon Technologies, Ltd.

How to reject the received message through the plugin?


  • Hi,

    I have recently developed a plugin for filtering messages.

    In some cases, it is necessary to reject the received message. 
    How to reject a received message with an arbitrary response?

    Thanks

     
     
    Community Verified icon


  • When a plugin is being executed during the inbound SMTP session you can reject the message by simply deleting the .MSG file from disk, but leave the CTL file. If you want to return a custom error string when rejecting the message, delete the MSG file and then set the following in the CTL file:

     
    [Parameters]
    ErrorMessage=Rejected by policy.

Please login to reply this topic!