Search  
You are here:  Forums    
Latest Posts Minimize
RE: Multiple copies being sent + smtp 451 by gyroscopes on 12-03-2008 11:23 PM
RE: connection limit? by RemyV on 12-03-2008 9:28 PM
connection limit? by NateDawg on 12-03-2008 7:38 PM
RE: Multiple copies being sent + smtp 451 by gyroscopes on 12-02-2008 12:00 AM
RE: vbs script for deleting users with MLSRVX.DLL by SteveT on 12-01-2008 11:04 PM
RE: Export server and users configuration by SteveT on 12-01-2008 11:00 PM
Multiple copies being sent + smtp 451 by gyroscopes on 12-01-2008 10:02 PM
Export server and users configuration by gcvoiron on 12-01-2008 8:46 AM
RE: vbs script for deleting users with MLSRVX.DLL by krommetje on 11-30-2008 3:02 PM
I can send, but can't receive by amanda on 11-29-2008 9:26 PM

Top 10 Links Minimize

ArGoStuff User to User Support Forums Minimize
Subject: create / modify domain and user using mailserverx.dll
Prev Next
You are not authorized to post a reply.

Author Messages
cluaran

Posts: 27
Online: User is Offline
ArGoNuke Swabbie
ArGoNuke Swabbie





03-28-2008 7:51 PM  
hi everybody....

i jus made this vbs to create domain and users

dim LocalDomains, LocalDomain, Aliases
set LocalDomains=CreateObject("MailServerX.LocalDomains")
set LocalDomain=CreateObject("MailServerX.LocalDomain")


Set Conn = CreateObject( "ADODB.connection")
On error resume next
Conn.Open "driver={MySQL ODBC 3.51 Driver}; database=xxxxxxx;server=xxxxxxx;uid=xxxxxx;pwd=xxxxxxxxx"

azione = "select * from domini where aliasdi = 0 order by id asc"
set recupero = conn.execute(azione)
while not recupero.eof
    iddominioprincipale = recupero("id")
    nuovodominioprincipale = recupero("nomedominio")
    permettilistedistribuzione = recupero("permettilistedistribuzione")
    if permettilistedistribuzione = 1 then
        permettilistedistribuzione = true
    else
        permettilistedistribuzione = false
    end if
    permettiamministrazionedaweb = recupero("permettiamministrazionedaweb")
    if permettiamministrazionedaweb = 1 then
        permettiamministrazionedaweb = true
    else
        permettiamministrazionedaweb = false
    end if
    permetticreazionedaweb = recupero("permetticreazionedaweb")
    if permetticreazionedaweb = 1 then
        permetticreazionedaweb = true
    else
        permetticreazionedaweb = false
    end if
    massimoharddisk = recupero("massimoharddisk")
    massimoaccounts = recupero("massimoaccounts")
    massimolistedistribuzione = recupero("massimolistedistribuzione")
    passworddiamministrazioneweb = recupero("passworddiamministrazioneweb")
    if LocalDomains.IsLocalDomain(nuovodominioprincipale) = false then 'se il dominio non esiste allora lo creo
        LocalDomain.Name = nuovodominioprincipale
        LocalDomain.AllowDistribLists = permettilistedistribuzione
        LocalDomain.AllowWebAdministration = permettiamministrazionedaweb
        LocalDomain.AllowWebCreation = permetticreazionedaweb
        LocalDomains.DiskQuota =  massimoharddisk 'non funzionante
        LocalDomain.MaxAccounts = massimoaccounts
        LocalDomain.MaxDistribLists = massimolistedistribuzione
        LocalDomain.WebAdminPassword = passworddiamministrazioneweb
       
        set Aliases=CreateObject("MailServerX.Lines")
        azione = "select * from domini where aliasdi = " & iddominioprincipale & " order by id asc"
        set recuperoalias = conn.execute(azione)
        while not recuperoalias.eof
            nomealias = recuperoalias("nomedominio")
            Aliases.Add (nomealias)
        recuperoalias.movenext
        wend
        LocalDomain.Aliases=Aliases

        LocalDomains.Add(LocalDomain)
    end if
recupero.movenext
wend

azione = "select * from email where aliasdi = 0"
set recupero = conn.execute(azione)
while not recupero.eof
    dim Users, User
    ' First, create and initialize the User object
    set User=CreateObject("MailServerX.User")
    idemailprincipale = recupero("id")
    nomeaccount = recupero("nomeaccount") & "@" & recupero("dominio")
    pwaccount = recupero("pwaccount")
    maxdimensionicartella = recupero("maxdimensionicartella")
    nomerealeaccount = recupero("nomerealeaccount")
    indirizzo  = recupero("indirizzo")
    forward = recupero("forward")
    mantienicopiaforward = recupero("mantienicopiaforward")
    if lcase(mantienicopiaforward) = 1 then
        mantienicopiaforward = true
    else
        mantienicopiaforward = false
    end if
    autorespondersoggetto = recupero("autorespondersoggetto")
    autoresponderattivo = recupero("autoresponderattivo")
    if lcase(autoresponderattivo) = 1 then
        autoresponderattivo = true
    else
        autoresponderattivo = false
    end if
    attivo = recupero("attivo")
    if lcase(attivo) = 1 then
        attivo = true
    else
        attivo = false
    end if
    casellapostainviata = recupero("casellapostainviata")
   
    User.UserName = nomeaccount
    User.Password = pwaccount
    User.MailboxSize = maxdimensionicartella
    User.RealName = nomerealeaccount
    User.ReturnAddress = indirizzo
    User.ForwardAddress = forward
    User.KeepCopies = mantienicopiaforward
    User.AutoresponderSubject = autorespondersoggetto
    User.AutoResponderEnabled = autoresponderattivo
    User.Active = attivo
    'SentItemsFolder = casellapostainviata
   
    autorespondercontrnuto = recupero("autorespondercontrnuto")
    set AutoResponderData=CreateObject("MailServerX.Lines")
    autorespondercontrnuto =  recupero("autorespondercontrnuto")
    splittaautorespondercontrnuto = split(autorespondercontrnuto,vbcrlf)
    for i = 0 to ubound(splittaautorespondercontrnuto)
        rigacontenuto = splittaautorespondercontrnuto(i)
        AutoResponderData.Add (rigacontenuto)
    next
    User.AutoResponderData=AutoResponderData
   
    set Aliases=CreateObject("MailServerX.Lines")
    azione = "select * from email where aliasdi = " & idemailprincipale & " order by id asc"
    set recuperoalias = conn.execute(azione)
    while not recuperoalias.eof
        nomealias = recuperoalias("nomeaccount")
        Aliases.Add (nomealias)
    recuperoalias.movenext
    wend
    User.Aliases=Aliases
   
    ' Now, create the Users object, and add new user
    set Users=CreateObject("MailServerX.Users")
    Users.Add User
recupero.movenext
wend


now... what i've to change if i want to MODIFY and not ADD domains and users?

thanks... Mirko

You are not authorized to post a reply.
Forums > General Discussion Forums > ArGoSoft Mail Server > create / modify domain and user using mailserverx.dll



ActiveForums 3.7

Donations Minimize

Find our site useful? Make a donation to show your support

Donate

logo_ccMC.giflogo_ccVisa.giflogo_ccDiscover.giflogo_ccAmex.gif

ArGoStuff Supporters

 


News from ArGoSoft Minimize
1 2 3 4 5 6


Mail Server Pro v1.8.9.6
  • Improved Export to .NET function - sometimes email messages were not getting exported, because the database of email messages was not up to date. Now each folder gets rebuilt before the export function;
12/2/2008 11:19:02 PM
Email Address Validator

We have discontinued our email address validation service, and launched new web site:

http://www.emailaddressvalidator.com

It provides the web service interface to validate lists of email addresses. We hope that our service will help to reduce unwanted traffic on Internet, ensuring that mail is sent only to valid and legitimate addresses.

Sign up now, and get 150 free validations!

11/25/2008 10:13:02 AM
Mail Server v1.0.5.8

Mail Server

  • Mailbags now have an option to accept mail only when specified server is down - will help to fight with spam which attempt to deliver mail bypassing the main server;
  • When delivering mail, if main exchanger returns 4xx reply (temporary problem), the server will not try other exchangers, will retry later the main exchanger;
  • Server options moved from registry to a XML file. 64 bit versions of Vista and 2008 server appear to be having access rights problems to the Windows registry, and the change will make our server more compatible with 64 bit versions;
  • Added an option to specify the number of lines on the log screen, when using the user interface. Was causing memory problems if left running for long time;
  • Fixed couple of problems, which were showing when SQL server was set up to use case sensitive SQL statements;
  • Made changes in the remoting interface to allow logging in using aliases;

Web Interface

  • Made changes to allow logging in using aliases;
  • When viewing folders, web interface now displays the name of logged in user;
11/12/2008 2:31:31 PM
FTP Server v1.0.1.6
  • Server settings have been moved from registry to the XML file, which will be located in the common application data directory. 64 bit versions of Windows were having trouble writing into the registry; similar change is coming to the mail server;
  • If used, XML files (Users.XML, Groups.XML and ServerOptions.XML) will also be moved to the common application data directory;
11/8/2008 11:41:29 PM
FTP Server v1.0.1.5
  • When performing active data transfers on systems with multiple IP addresses, data connections were using first available IP address, rather than one on which the control connection was active. It was causing confusion with firewalls and routers;
11/2/2008 9:39:24 PM


1 2 3 4 5 6

DNSSTUFF.COM 


Home:ArGoStuff:Forums:Articles:Cyber Security Tips:FAQ:Downloads:Links
Copyright 2006-2008 by ArGoStuff Terms Of Use Privacy Statement