Import from ArgoSoft in to hMailserver v5

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-27 16:04

Import-argo was written for hMailServer version 4. Using it on hMailServer version 5 seems to work partially (e.g. distribution-lists are not imported).

Does anyone have a modified solution that works with version 5?

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: Import from ArgoSoft in to hMailserver v5

Post by sheffters » 2009-10-27 16:14

might be easier to install hmail v4 and then use that script and then upgrade though the 5.x releases to the latest.

S.

relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Re: Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-28 12:29

I just hoped that there was a way to import directly into version 5.

Too bad my knowledge of c++ is absolutely zero, otherwise I would have fixed it myself (edit: or at least try to) :lol:

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Re: Import from ArgoSoft in to hMailserver v5

Post by westdam » 2009-10-28 16:47

what version of argosoft? .net or MS PRO ?

if you use ms pro ( not the .net ) i can give some tool i've done for the argosoft mailserver.
this tool just extract all the email and create a zip file only with username and psw ( no mail ) .

relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Re: Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-28 18:37

Well, I gave it a go anyway. I managed to update the Header files in the project to the new version of hMailServer and I can compile it in debug mode. Only the application won't run on the hMailServer-server, because it is missing some debug dll (mfc90ud.dll). So I'm trying to compile in Release-mode, but now the compiler complains that it has a

Code: Select all

Error	2	error C2011: 'CInterfaceApplication' : 'class' type redefinition	c:\importargo\Snapshot\hMailServer5\CInterfaceApplication.h	6	ImportArgo
Error	3	error C2079: 'CTransfer::m_app' uses undefined class 'CInterfaceApplication'	c:\importargo\snapshot\Transfer.h	49	ImportArgo
Can anyone share information on how to get the #pragma once to work in Release mode? Or another way to solve this?

relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Re: Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-28 18:40

westdam wrote:what version of argosoft? .net or MS PRO ?

if you use ms pro ( not the .net ) i can give some tool i've done for the argosoft mailserver.
this tool just extract all the email and create a zip file only with username and psw ( no mail ) .
Yes I'm using ms pro, not the .net version. I would like to export all domains, email-accounts, distribution-lists, etc. to hMailServer. So I guess your tool is not what I'm looking for.

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Import from ArgoSoft in to hMailserver v5

Post by martin » 2009-10-28 18:42

Maybe you should contact the author of the software via SourceForge?

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Re: Import from ArgoSoft in to hMailserver v5

Post by westdam » 2009-10-28 18:54

relax wrote:
westdam wrote:what version of argosoft? .net or MS PRO ?

if you use ms pro ( not the .net ) i can give some tool i've done for the argosoft mailserver.
this tool just extract all the email and create a zip file only with username and psw ( no mail ) .
Yes I'm using ms pro, not the .net version. I would like to export all domains, email-accounts, distribution-lists, etc. to hMailServer. So I guess your tool is not what I'm looking for.
ok, i came from argo . i tell you what i've done.. i had 10 domains , 80 accounts with 1gb data eml files.

import to hmailserver with the standard martin's appz was unsuccesfull (too long to do and programs timed out ) .
I 've had to :

extract all the account from argo with the tool i've done into a zip files, reinstalled on a fresh new ms pro argo installation and restored (just extract to _users folder ) . So i've got a ALL the domain , with ALL the username/psw and distro lists but NO messages inside the accounts. Install hmailserver v4, run the martin appz and import into v4. After that i've copy all the .eml files from the _users argo folder into the hmail data directory. Then run the hmailserver DDS application. After 30 min. DDS import all the email into the accounts smootly. no mail lost. After that you can upgrade to v5.


PS
the "tool" i've done just copy everything except .eml files.. i

PPS

i think you have to install v4.1 then to v4.4 and then to v5.The martin argo importer it's old i dont think will go with v5 or v4.3-4

relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Re: Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-29 12:18

Well, I managed to get the release build working by adding a #pragma once directive to cInterfaceApplication.h. I thought that it should be added in to the including file, e.g. Transfer.h, but that's not the way it works :lol:
But when trying to get the distribution-lists working I noticed that distribution lists aren't handled at all. It just reads 'return true' and imports nothing.

Maybe I will add the necessary code for the distribution-lists, but that won't be before I know how to handle the ArgoSoft IInterfaceDistributionLists's method get_Item and IInterfaceDistributionList's get_Members which return objects of type LPDISPATCH. :cry: :wink:

Edit: @westdam: I don't have (m)any emails to copy: everyone uses pop3 to retrieve there mail from the server. So I suspect I won't get any timeouts, but thank you for the idea. Very creative :)

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Re: Import from ArgoSoft in to hMailserver v5

Post by westdam » 2009-10-29 12:32

@relax: no problem ,just glad to help.. as "ex" official supporter of argosoft i'm glad to help to move out to a new platform. :D

argo was a nice mailserver if u've had 1-2 domains and 100 accounts ( max ).
hmailserver now it's the most powerful mailserver free ( and it's comparable or better to other software like mailenable or merak )

relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Re: Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-29 13:04

Ok, now I'm getting somewhere. I've managed to import the distribution-lists, but (there's always a but) I can't seem to add the email-addresses that belong to the list. It looks as if the hMailServer-interfaces don't have a public method for adding the recipients. Am I right about this?

Here's what I tried:

CInterfaceDistributionList distrib;

<snip>

CInterfaceRecipients recipients = distrib.get_Recipients();
recipients.Add() <-- not available

relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Re: Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-29 13:35

Partially answering my own question here: I read in the documentation that the Recipients-property of the DistributionList object is read-only.

Is there no way to add recipients to the list?

User avatar
mattg
Moderator
Moderator
Posts: 21186
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Import from ArgoSoft in to hMailserver v5

Post by mattg » 2009-10-29 15:31

http://www.hmailserver.com/documentatio ... recipients


Distributionlist.Distributionlistrecipients.Add
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

relax
New user
New user
Posts: 9
Joined: 2009-10-27 15:10

Re: Import from ArgoSoft in to hMailserver v5

Post by relax » 2009-10-29 16:48

mattg wrote:http://www.hmailserver.com/documentatio ... recipients

Distributionlist.Distributionlistrecipients.Add
Thank you, but that doesn't work. The typelib wizard and typelib explorer don't show that this method is available. I do have
Distributionlist.get_Recipients(), but that results in a CInterfaceDistributionListRecipients which is read-only.
Here's the actual code I use to test it with;

Code: Select all

CInterfaceDistributionLists distribs = hdomain.get_DistributionLists();
CInterfaceDistributionList distrib =  distribs.Add();
distrib.put_Address(_T("thelist"));

CInterfaceDistributionListRecipients recipients = distrib.get_Recipients(); // <- r e a d - o n l y

CInterfaceDistributionListRecipient recipient = recipients.Add();
recipient.put_RecipientAddress(_T("x@yz.nl"));
recipient.Save();
	
distrib.Save();

Could someone move this topic to the scripting-forum?

Many thanks!

Post Reply