Here are some examples of the assembly capabilities :

check_host

    SPFChecker SPF = new SPFChecker(IPAddress.Parse("127.0.0.1"), "me@openspf.org");
    SPFResult Result = SPF.Check_Host();

    Console.WriteLine(Result);
output :

Fail 

check_host with logging


    SPFChecker SPF = new SPFChecker(IPAddress.Parse("127.0.0.1"), "me@openspf.org");
    SPF.EnableLogging = true;
    SPFResult Result = SPF.Check_Host();

    Console.WriteLine(SPF.CheckLog);
output :

IP to check : 127.0.0.1
Domain to contact : openspf.org
0 SPF (99) RR Record found
1 TEXT (16) RR Record found
record found : v=spf1 ip4:76.79.20.184/29 a mx a:mailout00.controlledmail.com. -all
prossessing : +IP4:76.79.20.184/29
mechanism does not match
prossessing : +A
mechanism does not match
prossessing : +MX
mechanism does not match
prossessing : +A:mailout00.controlledmail.com.
Expanded to : mailout00.controlledmail.com
mechanism does not match
prossessing : -All
mechanism match (qualifier : Fail)

use an alternate dns server for queries


You can set the SPFChecker.DnsProxy static field by using one of the DnsProxy class constructor overload.
SPFChecker.DnsProxy  = new DNSProxy("my_dns_server_ip");

use your own dns implementation


Set SPFChecker.DnsProxy to use your own implementation of the IDnsProxy interface.
SPFChecker.DnsProxy  = new MyDnsSystemThatImplementIDnsProxy();

Last edited May 15, 2013 at 10:16 PM by eddy_minet, version 4

Comments

eddy_minet May 15, 2013 at 10:16 PM 
Sure ! ;-)

lukesampson Jul 6, 2010 at 1:42 AM 
Should the example for check_host with logging use "me@openspf.org" instead of "me.openspf.org"?