Koozali.org: home of the SME Server

[ANNOUNCE] Installing Desknow on SME 7.1

Offline blakeh

  • 10
  • +0/-0
[ANNOUNCE] Installing Desknow on SME 7.1
« on: May 19, 2007, 02:17:30 AM »
Sorry for the delay in posting this.

Installing Desknow on SME 7.1

Background:

Desknow (http://www.desknow.com) is a java driven mail and collaboration suite.  It's easy to install, upgrade and administrate and has a great feature set.  

    It supports pop, imap, pops, imaps, smtp, smpt/ssl and smtp over secondary port.
    Shared calendar and contacts
    Integrated jabber messenger server with web messenger, or you can use external jabber clients
    Supports SyncML standard for syncing with Outlook, smart phones, Palm Treo, etc.
    Supports pocket pc browser through the web interface
    Supports ical standard
    Supports WebDav
    Supports a web API for programming functions (see the Administration manual)
    Support for DNSRBL lists for spam blocking from the web interface. Easy to do things such as country based IP blocking. (via country based DNSRBL lists from pages like
http://www.moensted.dk/spam/)[/list]

And lots more.  The Desknow.com website has a complete list of everything.

You can download a 30 day demo that will enable all features for free.  After that it goes into a reduced feature 'lite' mode where it will stay forever unless you purchase a license.  DeskNow also has a Windows excutable that includes an embedded Postgresql database that you can install on Windows XP and play around with to see the features. Lots of people just install this on a Windows XP box for small installs.

I personally like it better than Zimbra and some of the other groupware packages.  I think the interface has a cleaner look and the features are a little more polished.  We signed up to be a reseller and ASP for the product and we offer DeskNow as a hosted service to companies under our brand, DeluxeWebmail.com  We also have a commission program for resellers.

We run our hosting servers in a datacenter, but I wanted to use DeskNow on SME for smaller installs or projects because I trust SME as a hardened linux distro for small companies, but I'm not a fan of Horde, and more and more companies are buying into the MS SBS nonsense, I wanted a mail and collaboration solution that didn't involve selling my soul and giving my customers something that in the long term is an expensive unmaintainable mess.

(Sorry, no more ranting about MS)

This is my first crack at getting this working on SME, pieced together from some of the other posts on here about some of the various parts.  DeskNow will be using the SME install of Mysql for it's database and clamav for its virus scanning.  This is also my first crack at a how-to, so good luck.


Here's what I don't have working/implemented yet:

1. DN won't accept email from the cron jobs and other processes on the local box.  I suspect this is because qmail is disabled, but it's probably a config issue.  I'm still working on this, but it means that emails about system events (raidmon) and other items won't arrive.  DN is supposed to be compatible with using qmail as the backend server, but I think that would require retooling much of the SME guts so I've opted not to go that route.

2. Other than SME doing a backup/dump of the Mysql database, the db used by DN isn't getting backed up separately, which it really should be.  I plan on putting a script in place to dump the db into the ibay along with the other DN backup files nightly.

3. DN isn't integrated into the LDAP directory in SME (although it is supposed to have this ability).  Therefore you will have to enter your users both into SME and into DN.  However, if your users don't need to use the filesharing in SME and were only email users on SME, then you would only have to enter them into DN and they do not need to be entered into SME.

This How-to assumes starting from a freshly installed SME box.  If you have current users with current email, it should be possible to use the Imap import function in DN to pull that mail from the SME side into DN (first turning off imap in DN and enabling it in SME) However, at the moment, that is beyond the scope of this particular posting. (I haven't tried it yet)

DISCLAIMER: I make no guarantees that this will work.  Furthermore I make no guarantees that you won't totally jack up your SME box.  Make backups of everything before starting.

Here goes.  Buyer beware, YMMV, etc.  


In your browser go to:

http://java.sun.com/j2se/1.5.0/jdk/download.jsp

On the page that comes up,  you want to download the Linux self-extracting file (currently jdk-1_5_0_08-linux.i586.bin)  Sun doesn't currently allow for command-line download.

Then in your browser go to:

http://dev.mysql.com/downloads/connector/j/5.0.html

Pick a mirror close you to and download the tar.gz file of the jdbc connector.

Once you have downloaded these two files, use FTP to get them uploaded to your SME box. Put them in /root or make an ibay for easy finding.

login as root via ssh to your SME box.

Download current version of Desknow

Code: [Select]
wget http://www.desknow.com/downloads/desknow.tar.gz

Now we need to rework some plumbing on SME disable the services that process and deal with mail:

Code: [Select]
config setprop pop3 status disabled
config setprop pop3s status disabled
config setprop imap status disabled
config setprop imaps status disabled
config setprop spamd status disabled
config setprop spamassassin status disabled
config setprop squid status disabled
config setprop qmail status disabled
config setprop smtpd status disabled
config setprop ssmtpd status disabled
config setprop smtp-auth-proxy status disabled
config setprop qpsmtpd status disabled
config setprop sqpsmtpd status disabled


Next we need to tweak the database settings:

Code: [Select]
config setprop mysqld LocalNetworkingOnly no
config setprop mysqld InnoDB enabled

Now we activate it all

Code: [Select]
signal-event post-upgrade
signal-event reboot


After reboot, ssh back into the box.

Code: [Select]
mkdir /usr/java

go to the directory where you uploaded the jdk file

Code: [Select]
chmod a+x jdk-1_5_0_08-linux.i586.bin
./jdk-1_5_0_08-linux.i586.bin


This will uncompress the java files in the current directory after you agree to all the legalese.  

Now move the files to our java location:

Code: [Select]
mv ./jdk1.5.0_08 /usr/java

Now go to where you downloaded the desknow file (should be in /root)

Code: [Select]
cd /root

tar -zxvf desknow.tar.gz

This will extract all the DN files.  We're going to follow the standard install instructions for DN.

Code: [Select]
cd desknow_server
mv desknow /var
mv desknowdata /var
mv etc/desknow.conf /etc
mv etc/init.d/desknow /etc/init.d

Now we need to edit our config file

Code: [Select]
nano /etc/desknow.conf

edit the line that starts with "JAVA_HOME" to read as follows:

Code: [Select]
JAVA_HOME="/usr/java/jdk1.5.0_08"

Hit control-x and save and exit.

Now we run the config wizard:

Code: [Select]
/var/desknow/bin/configconsole.sh

Accept the default for all IP addresses for DN to listen on.
On the next section for HTTP port, chose 8080 if it's not already the default.  We can't choose 80 because apache used by SME is on that port.
for HTTPS chose 8443, since I believe that SME is using 443 for the admin interface.

You can choose the defaults for the instant messaging

Then you select the feature set for DN.  For people wanting to only using DN for calendaring and still use SME for email, you could skip the section above on disabling the email functions in SME and choose #2 here in the DN config and use it strictly as a collaboration server, _IN_THEORY_.  (I haven't tried that config yet)

For now choose #1

The next section asks for IP addresses allowed to relay mail.  Just hit enter.  You can add addresses later via the web interface for the local lan.

Next it asks for the main domain.
Then the default language for the interface.
Then the default spell-check language.
Then hit enter for the timezone and we're done with the config wizard!

Now let's work on the database.

Go to the directory where you put the mysql-connector-java-5.0.6.tar.gz file

Code: [Select]
tar -zxvf mysql-connector-java-5.0.6.tar.gz
cd mysql-connector-java-5.0.6
cp mysql-connector-java-5.0.6-bin.jar /var/desknowdata/lib


now find out what your mysql root password is, you'll need this:

Code: [Select]
cat /root/.my.cnf

Your mysql root pw will be the long string.  Copy it with your cursor if your terminal client supports it.

Let's create the database:

Code: [Select]
/usr/bin/mysql -u root -p

(paste or type that long password now)

Type the following commands into mysql:

Code: [Select]
create database desknow character set utf8;
grant all privileges on desknow.* to desknowserver@localhost identified by 'password'; (replace password with one of your choice)
grant all privileges on desknow.* to desknowserver@'%' identified by 'password';      (replace password with the one you chose above)
quit

Now let's start DeskNow!

Code: [Select]
/etc/init.d/desknow start

Open a browser and go to http://SME-IP-addr:8080

You'll be presented with the database setup page, you'll enter the database password you choose in the mysql step above.

After that, you should get the Desknow Login page.  Login with 'admin' and the password you picked during the config wizard.

If you want DN to start automatically when you boot the server, type the following: (from the readme.txt in the install file)

Quote
Starting/Stopping DeskNow automatically
--------------------------------------
Create the appropriate links in /etc/rc?.d
Ex.:
ln -s /etc/init.d/desknow /etc/rc7.d/S80desknow
ln -s /etc/init.d/desknow /etc/rc7.d/K80desknow
ln -s /etc/init.d/desknow /etc/rc5.d/S80desknow
ln -s /etc/init.d/desknow /etc/rc5.d/K80desknow


To enable DN to do virus scanning:

    login as admin
    Click on Administration on the left
    Click on Antivirus on the right
    Check the enable box
    Pick 'Clam Antivirus' from the dropdown list
    Change the line so that it it is 'clamdscan' instead of 'clamscan' in the commandline.
    Hit 'OK' at the top.  

Now DN will use the internal clamav scanner.

If you want to make it so that computers on the local network don't have to authenticate to send outbound mail via smtp, under administration go to Mail/SMTP Incoming/Relay and input either their addresses, or the whole subnet into the form.

DN will place it's backup files in /var/desknowdata/backup. You could make an Ibay called dnbackup, and have DN put the backup files here for easy access from other computers on the network or for easy retrieval.

I recommend checking out the Administration manual for DN on their website which has all the config options you can change in the config files for tweaking various settings.  Also their forums are an excellent source for help as well.

To reverse all this, just do config setprop xxxx status enabled for the commands above and remove the /etc/init.d/desknow file.  That will stop desknow from starting up. You can manually delete the files under /var/desknow and /var/desknowdata

I welcome all input and feedback on this how-to.

Thanks!

bh

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[ANNOUNCE] Installing Desknow on SME 7.1
« Reply #1 on: May 19, 2007, 04:18:11 PM »
Do you have commercial intentions posting this?
Your How-to is incomplete and takes away many of the features included in SME.

Offline blakeh

  • 10
  • +0/-0
[ANNOUNCE] Installing Desknow on SME 7.1
« Reply #2 on: May 19, 2007, 05:00:58 PM »
??

No, no commercial intentions at all.

I've been an SME user for years and have benefited from lots of the information in these forums.  There was interest from others on getting DeskNow to work on SME and I've been wanting to use DN on SME for some time.  I sat down to spend the time and figure it out and posted the information here for others who were interested.

What do you feel is incomplete about the how-to except for the items I mention that I haven't solved yet?

Have you used DeskNow or checked it out?  It is an excellent groupware package.

bh

Offline blakeh

  • 10
  • +0/-0
[ANNOUNCE] Installing Desknow on SME 7.1
« Reply #3 on: May 19, 2007, 08:26:02 PM »
Msg deleted, see next message regarding local box email.

Offline blakeh

  • 10
  • +0/-0
[ANNOUNCE] Installing Desknow on SME 7.1
« Reply #4 on: May 19, 2007, 09:19:11 PM »
Another update.

An easy way to have SME hand off local generated email to DN without having to do the symlink in the post from me above.

Go into server-manager and under Email/Email Delivery Settings, set the IP address of the internal delegate mail server to the internal IP address of the SME box itself.  

This causes qmail to attempt delivery via smtp instead of using itself.  Once it makes the smtp connection, DN receives it.

Qmail still needs to be enabled however via the setprop command.

bh

Offline blakeh

  • 10
  • +0/-0
[ANNOUNCE] Installing Desknow on SME 7.1
« Reply #5 on: May 20, 2007, 02:27:06 AM »
One more step to get this working if you're running in server & gateway mode or private server.

With imap, pop3 and smtp disabled, you'll need to add port forwarding rules via the server-manager interface to open these ports up on the public side.

For each of them, you'll use the SME internal IP address for the destination.

All are tcp, and source and destination is the same for all of them.

Here's the list:

TCP 25  (smtp)
TCP 587 (secondary smtp listening port if enabled in DN)
TCP 5222 (jabber instant messaging server)
TCP 5223 (jabber over ssl)
TCP 143 (imap)
TCP 8080 (http access to web interface from external)
TCP 8443 (https if you install a certificate into DN)
TCP 110 (pop3 access external)
TCP 465 (ssmtp)
TCP 993 (imaps)
TCP 995 (pop3s)

That should take care of it.


bh

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[ANNOUNCE] Installing Desknow on SME 7.1
« Reply #6 on: May 21, 2007, 04:52:29 AM »
Quote from: "blakeh"
??

No, no commercial intentions at all.

 Looks better now.:wink:

Quote from: "blakeh"

What do you feel is incomplete about the how-to except for the items I mention that I haven't solved yet?

It would look much better if you write it here http://wiki.contribs.org/Category:Contrib
Quote from: "blakeh"

Have you used DeskNow or checked it out?  It is an excellent groupware package.

I checked the demo, but it's way too expensive.
With e-groupware or GroupOffice, it's better to donate to contribs.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
[ANNOUNCE] Installing Desknow on SME 7.1
« Reply #7 on: May 22, 2007, 06:00:08 PM »
Quote from: "stuntshell"
Quote from: "blakeh"

What do you feel is incomplete about the how-to except for the items I mention that I haven't solved yet?

It would look much better if you write it here http://wiki.contribs.org/Category:Contrib

No the contrib section is ment to hold RPM packages which can be readily applied, instructions like this should go into the http://wiki.contribs.org/Category:Howto section, please put it there for easy, future reference.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline billmakr

  • *
  • 33
  • +0/-0
    • http://www.midrangesystems.biz
Re: [ANNOUNCE] Installing Desknow on SME 7.1
« Reply #8 on: November 12, 2007, 04:18:32 PM »
I have been watching this thread for more information on your experience in the desk now install. Last post 05/19/07 said you had working well. Is it still reliable and do updates from desk now cause problems? Thank you for sharing this information as I too am a big fan of Desknow and would love to be able to run it on the SME platform. Please continue to share your progress and instructions with us lowly Linux nub's.


Thanks again for your hard work and generosity.


Paul Henry

Offline blakeh

  • 10
  • +0/-0
Re: [ANNOUNCE] Installing Desknow on SME 7.1
« Reply #9 on: November 26, 2007, 01:03:25 PM »
Paul-

DN has been running great on my little SME box since I posted this. I've been able to do updates to DN, updates to SME and all is working with no problems.

Glad to see someone had an interest in this.  You can contact me with questions directly at blake 'at' deluxewebmail 'dot' com.

Thanks!

bh