Create SMTP Server Resource
Having just stood up an SMTP Relay server in IIS it would have been super handy to have. If anyone wants to cobble something together I'd be greatful.
Ideally it would allow you to configure every property available to configure.
A full list would be found by running:
$mySite = [ADSI]"IIS://localhost/smtpsvc/1"
$mysite.Properties | gm
Some psudocode to get someone started would be:
Set Code:
$mySite = [ADSI]"IIS://Localhost/smtpsvc/1"
$mySite.Put("LogType", 1)
$mySite.Put("LogFileDirectory", "C:\inetpub\logs")
$mySite.Put("LogFileTruncateSize" , "19922944")
$mySite.Put("LogFilePeriod", "1")
$mySite.Put("LogExtFileFlags", "4194303")
$mySite.SetInfo()
Get Code
$mySite = [ADSI]"IIS://Localhost/smtpsvc/1"
$mySite.Properties['LogFileDirectory']
@tysonjhayes is still a wanted resource? I could look at the feasibility for you
Yes please. I have an SMTP server that I haven't had time to wrangle under control that I would definitely like to do.
@tysonjhayes this is underway, maybe 1-2 weeks before a PR I'd reckon
I've found 32(!) settings which I can unravel
@tysonjhayes ok good news bad news
good news: about 95% done with this
bad news:
-
i'm struggling to find the "validate sets" for some of the param, do you have any internal docs which could help?
-
several params fail to set, unsure why at this stage
-
the logging is interesting there seems on the face of it no way to enable logging which renders the logging options moot
so in an effort to close this off could you advise what settings you think would be ideal to target first? I found 32 which are all done with unit and int tests but are missing validation
thanks
Not really sure which ones we would need first, I opened this as I needed to stand up an SMTP server and wanted to put it under DSC if possible.
I'm sure whatever you have would be fine, if you want to get the PR up we can start running it on our own machines and start picking it apart, good part of working in the open IMO. :grin:
:joy: ok let me do a couple more updates to it and i'll get it up this weekend
Underway under https://github.com/PowerShell/xWebAdministration/pull/162
Hello Guys, Was it successful story?
I labeled PR #162 as abandoned so that someone else can continue the work.