Dim ME_ResultData Const ME_Success = 1 Const ME_Failure = 0 ' ME_ResultData is the string that will be used as the response string ' ' Return ME_Success for the command to succeed ' Return ME_Failure for the command to fail ' ' See comments in each function for further details about returning success/failure ' ' Available substitutions. Wrap with %, eg. %SUBSTITUTION% ' ' IPADDRESS IP address of the connection ' POSTOFFICE Postoffice which ' SENDER Sender address in MailEnable format ([SMTP:address]) ' RECIPIENTS Recipient list ([SMTP:address];[SMTP:address];etc) ' RECIPIENT Current recipient address ' RESPONSE The response that willl currently be sent ' HELO The string the remote server sent in the EHLO/HELO command ' SENDERAUTH 0 or 1 depending on whether the sender has authenticated function ME_MAIL() if %SENDERAUTH%=1 then ME_ResultData = "250 %SENDER% connection from %IPADDRESS% authenticated." & Chr(13) & Chr(10) else ME_ResultData = "250 %SENDER% OK." & Chr(13) & Chr(10) end if ME_MAIL = ME_Success end function function ME_RCPT() 'Returning a failure will stop the recipient from being accepted by MailEnable 'If you return a success, MailEnable will still do all subsequent checks and 'can still reject the recipient. ME_ResultData is only used if this function 'returns ME_Failure ME_ResultData = "250 OK" & Chr(13) & Chr(10) ME_RCPT = ME_Success end function function ME_DATA() 'ME_ResultData is only used if this function returns ME_Failure ME_ResultData = "354 OK" & Chr(13) & Chr(10) ME_DATA = ME_Success end function function ME_GetResultData() ME_GetResultData=ME_ResultData end function