hMailServer Admin remote

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
evanrich
New user
New user
Posts: 10
Joined: 2010-09-19 06:50

hMailServer Admin remote

Post by evanrich » 2012-05-19 13:03

I've been using hMailServer for quite a while now, and have found it to be a very easy to use system for email. One thing lacking though is a way to administer the system when I'm not near it. I did a search and didnt see anything, so my apologies if this has already been thought of or discussed, but I've been thinking, how about a remote app?

I've started some work on an Android version (been working on teaching myself Java and Android development)

Here's what I have so far for a mockup (started about an hour ago):
hmailadmin.png
hmailadmin.png (18.97 KiB) Viewed 7572 times
Obviously each section would basically mirror the windows admin utilities, letting you add accounts/domains/rules, check messages processed, etc.

Since hMailServer does not have a webapi (that I know of) and only COM, a helper app would need to be written to run on the server to process commands sent by the remote. This would be a fairly large undertaking for me as I haven't really written anything like this before (more of a .NET coder), but if anyone is interested or thinks this would be useful, I'd be happy to grant SVN access to the code.

Anyone interested, or am I wasting my time?
5.4-B2012021601, SQL Server 2008R2, Windows 2008 R2

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hMailServer Admin remote

Post by ^DooM^ » 2012-05-19 13:21

It's a neat idea although one i don't think would be used that often. I would just login to the phpwebadmin over a browser on my phone if i needed remote access. or use an RDP client on my phone and RDP into the server.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer Admin remote

Post by Bill48105 » 2012-05-20 05:46

As an Android user I could see how that'd be super handy but that being said seems it'd make most sense to have a mobile-friendly version of the phpwebadmin that comes with hmail & it could be used with iphones, windows phones etc. But if someone wanted to put the effort into it I'm sure an app could send HTTP POSTs/GETs to the existing phpwebadmin & have the app be the front-end. Possible some coding might need to be changed but bet it'd be minimal.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

evanrich
New user
New user
Posts: 10
Joined: 2010-09-19 06:50

Re: hMailServer Admin remote

Post by evanrich » 2012-05-20 06:26

HA. I didn't even know it came with it's own webadmin.

@Doom, I'm all for RDC on my tablet/phone as well, but it's a little clunky at times and hard to see stuff on the display when trying to press buttons. Given how often do you administer hmailserver? probably not that much. But a front end that allows click-click-click to perform an operation vs pinching, zooming, and then trying to read or type stuff is hard.

@bill. I'll have to look a the phpwebadmin interface. My thinking was originally going to be a .net service that runs in the background listening for commands to execute over a user-selectable encrypted TCP port. The fact that the server already comes with an php interface is nice, but how many people have php installed to be able to run it?

Client<->server communication programming is new to me, but I think I'm going to go ahead and attempt it, at least on my system (with the service idea @first.) I don't really know php, but if anyone wants to help I'm making the entire project open source to share. I have my own in-house SVN server, but if there's interest I can host everything on github.

It ultimately comes down to ease of use. Launch an app, add a user, change a password, add a new domain, check # of messages processed...All can be done from around the world remotely with a few clicks, this to me seems like an easy way to keep tabs on your system when you're not in front of it.
5.4-B2012021601, SQL Server 2008R2, Windows 2008 R2

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

Re: hMailServer Admin remote

Post by mattg » 2012-05-20 08:21

evanrich wrote:The fact that the server already comes with an php interface is nice, but how many people have php installed to be able to run it?
Many Webmail run on PHP. You may just be surprised how many do have PHP installed
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: hMailServer Admin remote

Post by dzekas » 2012-05-20 08:39

evanrich wrote:@bill. I'll have to look a the phpwebadmin interface. My thinking was originally going to be a .net service that runs in the background listening for commands to execute over a user-selectable encrypted TCP port. The fact that the server already comes with an php interface is nice, but how many people have php installed to be able to run it?
How many servers have ASP installed in IIS? Or any other scripting language?

If you implement it as dedicated service, you will have to implement encryption layer and comm layer. If you do it in scripting language supported by your webservice, you don't need those components as they are provided by web service and your "app" is cross platform. It will work on Android, Blackberry, iphone or any other dumb phone, which has only some simple browser installed.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hMailServer Admin remote

Post by ^DooM^ » 2012-05-20 11:26

I agree wit dzekas. it would be better to make an app connect to a webserver and display a webpage than deal with all the security involved in allowing this app direct access to hMail.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer Admin remote

Post by Bill48105 » 2012-05-20 16:52

^DooM^ wrote:I agree wit dzekas. it would be better to make an app connect to a webserver and display a webpage than deal with all the security involved in allowing this app direct access to hMail.
AND wit Bill. ;)

I had thought about setting up server to server connection for syncing/redundancy but every time I work it out in my head I ask myself why bother reinventing the wheel & just use what is already available: HTTP or special SMTP/IMAP/POP commands. As pointed out already the same could be said about any phone app. Make use of what is available & save yourself some grief and in turn by doing so (using php/http(s) web admin) it opens it to way more users & not just android. Sure you can still make an android app front-end if you wanted to help make it easier (such as managing multiple hmail servers from 1 screen, saving user/pass, shortcut, etc) but at least not required.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

evanrich
New user
New user
Posts: 10
Joined: 2010-09-19 06:50

Re: hMailServer Admin remote

Post by evanrich » 2012-05-25 01:27

Bill & Doom,

Thanks for the info. Like I mentioned, I'm know next to nothing about web service calls, SOAP, XML, php, etc...but I see this as an opportunity to learn (our enterprise apps at work use this so perhaps I can apply anything I learn towards that). I'll definitely look into that as something to convert the application into using in the future. Just so I understand what you're saying, you're basically suggesting creating a front end that uses calls to the php interface, retrieving the data from that and displaying it to the user, right? (at first I thought you were implying creating an app that just has a webpage widget to show the interface in, that's not much of a front end now is it :)


It's going to take me time to come up with everything, I've got a lot of the menus and basic activities laid out so far, and I've got test code that sends a string to a small console app on the server (if I type "addaccount|test" it creates an account named "test" in my default domain.

Once I've figured out the .net version (1.0?) then I'll start looking in to how to work with php. It'll take a while though since I've never done anything like this before.
5.4-B2012021601, SQL Server 2008R2, Windows 2008 R2

prisma
Senior user
Senior user
Posts: 309
Joined: 2010-07-09 13:16

Re: hMailServer Admin remote

Post by prisma » 2012-05-29 12:04

@evanrich: one way could be to write an app that uses the official hMailAdmin webfrontend and perform a transformation to optimize the website for use with gadgets. I'm not familiar with the capabilities of objective C (apple) or whatever and how to write the pipe . I already did a xslt for a xml-file to be a readable webpage and this was very easy, but this has nothing to do with your needs.

One possibility was to experiment with clients-side CSS, but I'm not sure if android and iOS browsers are supporting this.

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: hMailServer Admin remote

Post by dzekas » 2012-05-29 17:49

evanrich wrote:Once I've figured out the .net version (1.0?) then I'll start looking in to how to work with php. It'll take a while though since I've never done anything like this before.
You don't need PHP. Dynamic pages can be created in ASP. Any language of your choice will work as long as it is supported by IIS or Apache.

You are wasting your time, if you decide to implement both client and server. Such design will have own communication protocols and every required security/communication layer. Keep your program simple. You can't make simple things, if you design administrative frontend with independent client and admin server components.

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer Admin remote

Post by Bill48105 » 2012-05-29 19:47

evanrich: I was saying you can just use server-side web to interface then you don't need to worry about all the rest. A phone-optimized web interface (iow smaller & vertical scroll etc. Essentially could look exactly like your screenshots) would be MUCH MUCH more useful & simple to do that a whole-out android-specific app especially if you intend on doing client/server & security etc. By doing the php (or asp but I prefer php for being more open) code the web server takes care of transport/security (SSL if enabled) etc. Fact it runs on browser means it is 100% open to every platform. If you really want an app then make one but in essence it's just a simple web browser.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply