SMTP-Inbound.VBS help needed

Discussion forum for Enterprise Edition.
Post Reply
dcol
Posts: 237
Joined: Fri May 26, 2017 11:25 pm

SMTP-Inbound.VBS help needed

Post by dcol »

I want to capture RCPT TO. 550 errors and terminate the connection when found.
I know that SMTP-Inbound.VBS can be used, but the documentation is not available to write this script.
Here is what I have come up with so far. Would this work?

Code: Select all

function ME_RCPT()

if %SENDERAUTH%=1 then
    ME_ResultData = "250 %SENDER% connection from %IPADDRESS% authenticated." & Chr(13) & Chr(10)
elseif Instr(1,"%RESPONSE%","550") > 0 then
ME_ResultData="550 User not found" & Chr(13) & Chr(10)
ME_Mail=ME_Failure
end if

  ME_ResultData = "250 OK" & Chr(13) & Chr(10)
  ME_RCPT = ME_Success

end function

Post Reply