Today I got a case where I was asked for a script to configure SMTP programmatically in IIS 7. To be precise requirement was to check [corresponding setting on IIS 7] for the “All except the list below” check box and add the IP’s to the Deny List programmatically .
Some of the interesting facts regarding SMTP on IIS 7:
Click Next ==> Install for installation to succeed. Now opening IIS 7 manager UI you won’t be able to find anything related to SMTP server apart from SMTP email setting. Strange isn’t it.
Well you have to go to start ==> run ==> inetmgr6 [This would open up old IIS6 snapin)
My colleague Vijaysk has already written script for it . Download it from here
I have added 127.0.0.1,255.255.255.255 into ip.txt [ which need to be put into Deny List]
Checking in the IIS6 [inetmgr6] console on window 2008 :
Great !