@echo off rem __________________________________________________________ [ header ] __ rem Cerro Scripts: smtp-banner.cmd rem rem Copyright (c) 2004 Philipp Föckeler (www.cerrotorre.de) rem rem This script sets the initial message (connect string) for incoming SMTP rem sessions on Exchange 2003 servers. rem rem Usage: smtp-banner "Banner" [VS] rem "Banner": Connect String for SMTP-Sessions to this Server rem VS : Number of Virtual SMTP server, standard is 1 rem rem ________________________________________________________________________ set MYCD=%CD% cd /D %TEMP% rem Hochkommata entfernen set BANNER=zerobanner%1 set BANNER=%BANNER:"=% if "%BANNER%"=="zerobanner" goto usage set BANNER=%BANNER:zerobanner=% rem Prüfen, ob 2. Parameter vorhanden, sonst VS1 setzen if "%2"=="" (set VS=1) else (set VS=%2) echo Set SMTPBase = GetObject("IIS:\\localhost\SMTPSvc\%VS%") >smtp-banner.vbs echo SMTPBase.Put "ConnectResponse", "%BANNER%" >>smtp-banner.vbs echo SMTPBase.SetInfo >>%TEMP%\smtp-banner.vbs echo smtp-banner (c) 2004 Philipp Foeckeler (www.cerrotorre.de) echo MetaBase-Config....... cscript //nologo %TEMP%\smtp-banner.vbs >NUL del %TEMP%\smtp-banner.vbs echo SMTP-Reset....... net stop smtpsvc net start smtpsvc echo Done - Check with telnet to 127.0.0.1 on SMTP-Port (normally 25) goto done :usage echo smtp-banner (c) 2004 Philipp Foeckeler (www.cerrotorre.de) echo. echo Usage: smtp-banner "Banner" [VS] echo "Banner": Connect String for SMTP-Sessions to this Server echo VS : Number of Virtual SMTP server, standard is 1 echo. :done cd /D %MYCD%