Hi Mark,
This is a part of my VB-script to create virtual
mailservers. Probably in this example are some errors because I cut down the
entire script that not only creates new virt.servers but are also able to update
them and create new mailboxes and aliases.
============================================================
'creates
' -virtual domain servers
"mail.domain.tld"
' -in the
directory "mail_domain_tld"
'
-using the IMail User-database
'
-with a default user-mailbox-size of
20MB
'
'in this example the data comes
from DB and are stored in a Recordset
(RS)
'NOTE: you first have to
open a DB-Connection and read the disired data (name1 and
name2)
Set objShell =
CreateObject("WScript.Shell")
do
while not RS.eof
name2 =
RS("name2")
name1 =
RS("name1")
prefix =
"mail."
result = objShell.Run(imail_path
& "adddomain.exe -h " & prefix & name2 & "." & name1 & "
-iVIRTUAL -t mail_" & name2 & "_" & name1 & " -a " & name2
& "." & name1 & " -u IM -x 20000000", 1,
TRUE)
if result<>0 then 'problem
server was not creates
wscript echo("Error: " & prefix
& name2 & "." & name1 & chr(10) & " code: " &
result)
end
if
RS.movenext
loop
set objshell =
nothing
============================================================
> -----Urspr�ngliche Nachricht-----
> Von:
[EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
Im Auftrag von Mark Brody
> Gesendet: Donnerstag, 22. August 2002
01:09
> An: [EMAIL PROTECTED]
> Betreff: [IMail Forum]
Add many domains at once
>
>
> Is there any way to automate
adding a lot of virtual domains
> (225) with all the same settings. I've
looked at
> adddomain.exe and emailed ipswitch support about it and
they
> say that the utility would have to be run for each domain to
add.
>
> Anyone ever seen a way to script this?
>
>
TIA
>
> Mark Brody
> opus:interactive
>
www.opusinteractive.net
>
>
> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
>
List Archive:
> http://www.mail-archive.com/imail_forum%>
40list.ipswitch.com/
>
> Knowledge Base/FAQ:
> http://www.ipswitch.com/support/IMail/
>
