views:

11

answers:

0

I would like to be able to check, programmatically in c++, as simply as possible whether a given ip address has access on an SMTP connector.

In MS exchange management console you can check this from the "receive mail from remote servers that have these IP addresses:" section of the SMTP connector properties->Network.

So far the best I could do was do an LDAP query for the property msExchSmtpReceiveRemoteIPRanges which has all the information I need but makes this task more complicated than I expected. Since this property returns an array of strings that can either be singular IPv4 addresses, IPv4 ranges, class notation ip ranges x.x.x.x/y and ipv6 addresses also.

If i take the above route i will need to parse each possible string into something which I can check my IP address against. What I would prefer to do is just query exchange with my ip and have exchange tell me if i have access (if possible/feasible).

Does anyone know if there is such a function /api available to check directly if ip address X has permission on the default/other SMTP connector?

Thanks