How to setup external database

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

How to setup external database

Post by maggiore81 » 2009-05-01 17:04

Hello
I have read the docs but I have not find any info about that.

I would like to test Hmail 5.1 with Ms SQL 2005 Express DB
what kind of Db have I to create for hmail?

I don't have any info about that
Mr. Spadoni
Network Administrator
--
Spadhausen ISP
admin (at) spadhausen . com

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

Re: How to setup external database

Post by martin » 2009-05-02 11:50

Run hMailServer Database Setup. It creates the database.

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Re: How to setup external database

Post by maggiore81 » 2009-05-02 12:12

I had some troubles on SQL Express 2005, because I needed to set SERVERNAME\MSSQL in the server address tab.
hmail program had troubles connecting to it if I set 127.0.0.1 (I set sql to listen just on localhost so I don't expose the server to the world).
Mr. Spadoni
Network Administrator
--
Spadhausen ISP
admin (at) spadhausen . com

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

Re: How to setup external database

Post by martin » 2009-05-02 12:19

If the server address is SERVERNAME\MSSQL, using the address 127.0.0.1 won't work. Because that would be the wrong address. :)

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Re: How to setup external database

Post by maggiore81 » 2009-05-03 11:20

eheheh easy for you, but not for me that I didn't know!

But if I cannot read that info anywhere... I just have to try it.


This morning I installed one Win 2003 and Sql Express 2005 SP3

I was not able to let it connect to the db.

The db was listening on 127.0.0.1 port 1433 (i see the daemon listening with tcpview) but the server
connected to his 172.16.0.4 (eth ip)

how can I do?



----------

I set up che sql to listen for local connection only in the attack surface setup

and it finally worked.
Mr. Spadoni
Network Administrator
--
Spadhausen ISP
admin (at) spadhausen . com

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

Re: How to setup external database

Post by martin » 2009-05-03 17:29

> But if I cannot read that info anywhere... I just have to try it.

Well, this is "basic" SQL Server administration information. I don't think that such information should necessarily be a part of the hMailServer documentation. I'm certain this information is well documented in the SQL Server documentation. Somewhere.
I was not able to let it connect to the db.
You forgot to say what error message you got.
but the server connected to his 172.16.0.4 (eth ip)
I don't understand this part. What is the "server" in this case? hMailServer?

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Re: How to setup external database

Post by maggiore81 » 2009-05-03 21:59

martin wrote:> But if I cannot read that info anywhere... I just have to try it.

Well, this is "basic" SQL Server administration information. I don't think that such information should necessarily be a part of the hMailServer documentation. I'm certain this information is well documented in the SQL Server documentation. Somewhere.
I was not able to let it connect to the db.
You forgot to say what error message you got.

Sorry, you are right.
Unable to connect to SQL server :)
but the server connected to his 172.16.0.4 (eth ip)
I don't understand this part. What is the "server" in this case? hMailServer?
The hmailserver.exe tried to connect to 172.16.0.4 (that was the eth server ip).

I resolved the issue configuring SQL to accept local connection only.
I set it to listen on TCP 1433

in the hmaildb setup I set MAIL\SQLEXPRESS (servername\defaultinstance) and without any tcp sockets, it told me "DB created"
:)
Mr. Spadoni
Network Administrator
--
Spadhausen ISP
admin (at) spadhausen . com

Post Reply