SMTP filter context objects can be queried for values or have their values set with calls to SMTPFilterQueryContextData and SMTPFilterSetContextData respectively. The values are contained within a variant type called FilterContextDataVariant. Possible value types to set/get are:
Flag | Description | Type | Access |
---|---|---|---|
SMTP_DATA_SESSION_OBJ | The session | Opaque pointer | Read |
SMTP_DATA_USER_OBJ | The user associated with this context | UDBHandle | Read |
SMTP_DATA_ENVELOPE_OBJ | The envelope associated with the session | Opaque pointer | Read |
SMTP_DATA_MESSAGE_OBJ | The message | Opaque pointer | Read |
SMTP_DATA_SESSION_INTERCEPTED | Is the session intercepted | bool | Read |
SMTP_DATA_SESSION_SECURE | Is the session secure | bool | Read |
SMTP_DATA_SESSION_CLIENTIP | Client IPV4 address | Unicode string | Read |
SMTP_DATA_SESSION_LOCALIP | Local IPV4 address | Unicode string | Read |
SMTP_DATA_SESSION_MTAID | Name presented with HELO/EHLO | Unicode string | Read |
SMTP_DATA_SESSION_TRUSTED | Is the client trusted | bool | Read/Write |
SMTP_DATA_SESSION_STATE | Current transaction state | int | Read/Write |
SMTP_DATA_COMMAND | Request method | Unicode string | Read |
SMTP_DATA_COMMANDLINE | Whole protocol command line | Unicode string | Read |
SMTP_DATA_RETURNPATH | Return path | Unicode string | Read |
SMTP_DATA_RECIPIENT | Recipient | Unicode string | Read |
SMTP_DATA_MESSAGE_ID | Message id | Unicode string | Read |
SMTP_DATA_MESSAGE_FILENAME | Message filename | Unicode string | Read |
SMTP_DATA_RESPONSE_STATUS | Status code of the response | int | Read/Write |
SMTP_DATA_RESPONSE_STATUSTEXT | Status text | Unicode string | Read/Write |
SMTP_DATA_ROUTING_TAG | A tag storeable with response status | Unicode string | Read/Write |
If you are getting/setting SMTP_DATA_SESSION_STATE then the possible values for the state are:
State | Description |
---|---|
SMTP_STATE_INIT | Client has just connected. No command has been sent yet |
SMTP_STATE_HELO | Client just sent HELO or we've just processed a message |
SMTP_STATE_EHLO | Client just sent EHLO or we've just reset AUTH |
SMTP_STATE_AUTH | Client just sent AUTH. We are now in AUTH processing loop |
SMTP_STATE_PostAUTH | Auth completed successfully |
SMTP_STATE_MAIL | Just accepted MAIL command |
SMTP_STATE_RCPT | Just accepted RCPT command |
SMTP_STATE_DATA | Just accepted DATA command |
SMTP_STATE_DATAComplete | Message complete |
SMTP_STATE_EXIT | Just accepted QUIT command |