FCLT#54481 hMailserver automatisch opruimen
svn path=/Website/branches/v2018.1/; revision=39250
This commit is contained in:
@@ -6,6 +6,23 @@
|
||||
// * delete all mails older then -daysToKeepMessages- from all mailboxes in all domains.
|
||||
// *
|
||||
// ******************************************
|
||||
|
||||
if (WScript.Arguments.length < 2)
|
||||
{
|
||||
WScript.Echo("Provide username and password. Number of days to keep is optional.");
|
||||
WScript.Quit(-1);
|
||||
}
|
||||
|
||||
var un = WScript.Arguments(0);
|
||||
var pw = WScript.Arguments(1);
|
||||
var days;
|
||||
if (WScript.Arguments.length > 2)
|
||||
days = WScript.Arguments(2);
|
||||
|
||||
MailboxCleaner(un, pw, days);
|
||||
// ******************************************
|
||||
|
||||
|
||||
function MailboxCleaner(hmAdminUsr, hmAdminPwd, daysToKeep)
|
||||
{
|
||||
var return_code = 0;
|
||||
@@ -83,13 +100,6 @@ function padout(number)
|
||||
function toDateTimeString(jsDate)
|
||||
{
|
||||
return padout(jsDate.getFullYear()) + "-" + padout(jsDate.getMonth() + 1) + "-" + padout(jsDate.getDate()) + " "
|
||||
+ padout(jsDate.getHours()) + ":" + padout(jsDate.getMinutes()) + ":" + padout(jsDate.getSeconds())
|
||||
+ padout(jsDate.getHours()) + ":" + padout(jsDate.getMinutes()) + ":" + padout(jsDate.getSeconds());
|
||||
//+ " UTC"+(jsDate.getUTCHours()>0?"+":"")+padout(jsDate.getUTCHours()/10);
|
||||
}
|
||||
|
||||
|
||||
// Call script.
|
||||
var un = "Administrator";
|
||||
var pw = "VC43lk";
|
||||
var days;
|
||||
MailboxCleaner(un, pw, days);
|
||||
Reference in New Issue
Block a user