-1

got a little problem im not entirely sure how to solve. (am not that experienced with Windows servers)

We currently use good old Apache (+ PHP) for HTTP hosting but we also needed an SMTP server and the obvious choice was the IIS SMTP server, now id like to have the SMTP server running as a service to have it start on system startup.
Problem is that as far as i can tell both IIS SMTP and IIS HTTP run under the same service (WWW-Publishing).

But of course i dont actually want to use IIS HTTP and rather use Apache, so i disabled the service for now and started the SMTP server manually...

How would i set up a service to only start the SMTP server?
Maybe some more experienced Windows Devs / Admins can help me out?

Thanks ^^

RedCube
  • 25
  • 4

1 Answers1

-1

Alright I found a solution!
Randomly got an Idea right after i posted the question, but oh well thats rubber ducking for you.

The IIS SMTP Server can be easely controlled by using Powershell.

([ADSI]'IIS://LOCALHOST/SMTPSVC/1').Start()
([ADSI]'IIS://LOCALHOST/SMTPSVC/1').Stop()

https://stackoverflow.com/a/37432396/3321505

RedCube
  • 25
  • 4
  • No matter what solution you found, keep in mind that SMTP on IIS is dead https://www.reddit.com/r/sysadmin/comments/pl2d6e/the_smtp_stack_and_management_tools_have_been/ – Lex Li Dec 09 '21 at 23:19