dsccommunity / WebAdministrationDsc

This module contains DSC resources for deploying and configuring web servers and related components.
MIT License
160 stars 148 forks source link

Create SMTP Server Resource #61

Open tysonjhayes opened 8 years ago

tysonjhayes commented 8 years ago

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']
nzspambot commented 8 years ago

@tysonjhayes is still a wanted resource? I could look at the feasibility for you

tysonjhayes commented 8 years ago

Yes please. I have an SMTP server that I haven't had time to wrangle under control that I would definitely like to do.

nzspambot commented 8 years ago

@tysonjhayes this is underway, maybe 1-2 weeks before a PR I'd reckon

I've found 32(!) settings which I can unravel

nzspambot commented 8 years ago

@tysonjhayes ok good news bad news

good news: about 95% done with this

bad news:

1) i'm struggling to find the "validate sets" for some of the param, do you have any internal docs which could help?

2) several params fail to set, unsure why at this stage

3) 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

tysonjhayes commented 8 years ago

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:

nzspambot commented 8 years ago

:joy: ok let me do a couple more updates to it and i'll get it up this weekend

nzspambot commented 8 years ago

Underway under https://github.com/PowerShell/xWebAdministration/pull/162

NickShapovalov commented 7 years ago

Hello Guys, Was it successful story?

johlju commented 6 years ago

I labeled PR #162 as abandoned so that someone else can continue the work.