Monday, July 27, 2015

Windows server 2012 moving the SMTP mailroot folders

By default, the SMTP mailroot folders (badmail, Drop, Pickup and Queue) will be stored on the C drive - C:\inetpub\mailroot to be precise. For the purpose of backups or some other reason, you may have moved inetpub to another drive (D drive for example). To have the local SMTP sever pickup the relocated mailroot folder you will need to follow these steps:
  • Install IIS 6 scripting tools
    • Launch the server manager
    • Click Add roles and features
    • Select Role-based or feature-based installation and select the the current server
    • Expand Web Server (IIS) > Management Tools > IIS 6 Managament Compatability and then check IIS 6 Scripting tools 
    • Click next > Add Features and complete the installation
    • There should now be an AdminScripts folder in the C:\inetpub directory, this will contain adsutil.vbs which is used to update the mailroot folders.
  • Stop the SMTP server (this is done from the IIS 6 Manager)
  • Open up the command prompt in administrator mode and run the following commands - changing the the new folder directories as required:
    • cscript.exe C:\inetpub\AdminScripts\adsutil.vbs set smtpsvc/1/badmaildirectory D:\inetpub\mailroot\Badmail
    • cscript.exe C:\inetpub\AdminScripts\adsutil.vbs set smtpsvc/1/dropdirectory D:\inetpub\mailroot\Drop
    • cscript.exe C:\inetpub\AdminScripts\adsutil.vbs set smtpsvc/1/pickupdirectory D:\inetpub\mailroot\Pickup
    • cscript.exe C:\inetpub\AdminScripts\adsutil.vbs set smtpsvc/1/queuedirectory D:\inetpub\mailroot\Queue
  • Start up the SMTP server again (this is done from the IIS 6 Manager)

No comments:

Post a Comment