EAS uses SVRFILTERCONTEXT structure to pass information to SvrFilterProc function and get return value from this parameter.
typedef struct _tagSvrFilterContext{ LPVOID /*[in] */pCtxt; LPSVRSUPPORTFUNCTIONS /*[in] */pSvrFuncs; SvrFilterActions /*[out]*/action; LPVOID /*[out]*/pArg; }SVRFILTERCONTEXT, *LPSVRFILTERCONTEXT; typedef struct _tagConnectionFilterContext{ INT nLocalPort; LPCSTR pszRemoteIP; INT nRemotePort; }CONNECTIONFILTERCONTEXT, *LPCONNECTIONFILTERCONTEXT; typedef struct _tagEmailFilterContext{ LPCSTR pszDomain; LPCSTR pszUser; IServerRoot* pSvr; IMail* pMail; }EMAILFILTERCONTEXT, *LPEMAILFILTERCONTEXT;
Members
pCtxt[in]
In SVR_FILTER_INBOUND, SVR_FILTER_OUTBOUND or SVR_FILTER_INBOX event, pCtxt is a pointer of EMAILFILTERCONTEXT structure; In SVR_FILTER_CONNECTION event, pCtxt is a pointer of CONNECTIONFILTERCONTEXT structure.
pSvrFuncs[in]
A pointer of useful functions provided by EAS. To learn more , please refer to Server Support Functions
action[out]
Your filter can assign the following value to this parameter to control how EAS process the transaction after SvrFilterProc returns:
enNonAction | Server does nothing for this message or connection, but continues the transaction in normal order. |
enDelMessage | The message will be deleted by server if this value is specified in SVR_FILTER_INBOUND, SVR_FILTER_OUTBOUND or SVR_FILTER_INBOX events. |
enBounceMessage | The message will be bounced by server if this value is specified in SVR_FILTER_INBOUND or SVR_FILTER_OUTBOUND. |
enForwardMessage | The message will be forwarded to the email address specified in pArg parameter by server if this value is specified in SVR_FILTER_INBOUND, SVR_FILTER_OUTBOUND or SVR_FILTER_INBOX events. pArg parameter must be allocated by LocalAlloc function. |
enCCMessage | A copy of the message will be sent to the email address specified in pArg parameter by server if this value is specified in SVR_FILTER_INBOUND or SVR_FILTER_OUTBOUND events. pArg parameter must be allocated by LocalAlloc function. |
enMoveMessage | The message will be moved to the mailbox specified in pArg parameter by server if this value is specified in SVR_FILTER_INBOX event. pArg parameter must be allocated by LocalAlloc function. |
enNoJunk | The message will never be marked as junk-email by Anti-Spam filter, this action is only available in SVR_FILTER_INBOX event. |
enPersonalApprove | The message will be forwared to the email address specified in pArg parameter for approval, pArg parameter must be allocated by LocalAlloc function. this action is only available in SVR_FILTER_INBOUND/SVR_FILTER_OUTBOUND/SVR_FILTER_GLOBAL event. |
enRefuseConnection | TCP/IP connection request will be rejected by server if this value is specified in SVR_FILTER_CONNECTION event. |
pArg[out]
Refer to action parameter
See Also
GetFilterVersion function
SvrFilterProc function