Platform SDK: SMTP Server Events

IDnsResolverRecordSink::OnSyncGetResolverRecord

[This is preliminary documentation and subject to change.]

Called by an SMTP event dispatcher when DNS resolution records are required to route a message to a relay destination.

HRESULT OnSyncGetResolverRecord(
   [in] LPSTR                 pszHostName, 
   [in] LPSTR                 pszInstanceFQDN, 
   [in] DWORD                 dwVirtualServerId, 
   [out] IDnsResolverRecord **ppDnsResolverRecord
);
pszHostName
The hostname for the identified next hop. For example, "mail."
pszInstanceFQDN
The fully-qualified domain name in which the host resized. For example, "microsoft.com".
dwVirtualServerId
The SMTP virtual server idenfier. For example, 1.
ppDnsResolverRecord
On successful return, a IDnsResolverRecord reference to the Dns resolver sink. The router will subsequently use this interface to request records from the resolver sink.

Return Values

Value Description
S_OK Success.

Remarks

To implement a sink that services requests for DNS resolution records from the SMTP service, you implement a COM class that exposes the IDnsResolverRecordSink interface. You then register a sink binding to receive notifications of the DnsResolverRecordSink event. The corresponding COM category identifier for this event is CATID_SMTP_DNSRESOLVERRECORDSINK. The string version of this GUID is "{bd0b4366-8e03-11d2-94f6-00c04f79f1d6}".

Your sink returns its IDnsResolverRecord interface reference to the connection manager that in turn uses this interface to request resolution of DNS names into IP addresses from the sink.