Installing Kolab 3.2 on CentOS

Kolab the open-source groupware collaboration project released version 3.2 on Valentines day. I have been on version 3.0 for some time now and wanted to get away from using ownCloud and some other projects and just use Kolab as it was doing my mail, contacts and calendaring anyway.

The installation process is not all that difficult, here is what I did to install the software.

Lets get some utilities.


# yum install wget
# yum install nano

First we need to prepare the target system. The document http://docs.kolab.org/installation-guide/preparing-the-system.html tells us we need to relax the SELinux policy.


# setenforce 0

Lets also make it persist across reboots.


nano /etc/selinux/config

Change `enforcing` to `permissive`.

At this point (since this is a completely internal install) I wanted to disable the iptables firewall. (We can re-enable later after it’s all working).


# /etc/init.d/iptables stop
# chkconfig iptables off

Kolab has some very strict DNS requirements for how this machine refers to itself, and how people locate this machine.


# hostname -f

This needs to be exactly how you connect to this server via the web interface. If this is not how your external DNS will handle this servers FQDN you need to fix your hosts file.


# nano /etc/hosts

Follow the steps @ http://docs.kolab.org/installation-guide/centos.html

First we need to install EPEL. (At the time of this post, this is the most current RPM you need for EPEL.)


# rpm -Uhv http://mirror.chpc.utah.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Next download some files with wget that add the Repos.


# cd /etc/yum.repos.d/
# wget http://obs.kolabsys.com:82/Kolab:/3.2/CentOS_6/Kolab:3.2.repo
# wget http://obs.kolabsys.com:82/Kolab:/3.2:/Updates/CentOS_6/Kolab:3.2:Updates.repo

Next we can install all the packages Kolab needs.


# yum install kolab

After all these are installed we (at this time, its a bug that needs fixing) need to fix the template script for amavisd.conf


# nano /usr/lib/python2.6/site-packages/pykolab/setup/setup_mta.py

Look around line `386` the small block should look like the following


        if os.path.isdir('/etc/amavisd'):
            fp = open('/etc/amavisd/amavisd.conf', 'w')
        elif os.path.isdir('/etc/amavis'):
            fp = open('/etc/amavis/amavisd.conf', 'w')
            fp.write(t.__str__())
            fp.close()

Take a look under the second line, it opens the file but does not write and then close it. We need it to do this or we will get a zero byte empty amavisd.conf file.

If yours looks like the above make it look like this


        if os.path.isdir('/etc/amavisd'):
            fp = open('/etc/amavisd/amavisd.conf', 'w')
            fp.write(t.__str__())
            fp.close()
        elif os.path.isdir('/etc/amavis'):
            fp = open('/etc/amavis/amavisd.conf', 'w')
            fp.write(t.__str__())
            fp.close()

You see I have added two lines under the second. Save the file and exit.

Now we can continue installing Kolab.


# setup-kolab

During this install you will be asked for many passwords. Write down the defaults or make up your own passwords.

After the install is complete, I reboot the system to make sure all services are started and that everything loads correctly.

We now need to update the database schema. At this time, even on a fresh install the database schema is out of date. I found this out by finding some odd bugs and talking about them in the Kolab IRC channel. After running the update database script they all went away.


# cd /usr/share/roundcubemail/
# ./bin/updatedb.sh --dir plugins/libkolab/SQL --package libkolab
# ./plugins/libkolab/bin/modcache.sh clear -a

I changed my Kolab web services to run off a different port, I had to edit `nss.conf` which is part of Apache.


# nano /etc/httpd/conf.d/nss.conf

Two parts of this file need to be changed if you want to change from the default SSL port that Kolab ships with. The default SSL port is 8443. Find the lines


Listen 8443
VirtualHost _default_:8443

Change the two mentions of 8443 to your own port.

If your going to be using only SSL then we need to make a few more changes in some files.

`config.inc.php`


# nano /usr/share/roundcubemail/config/config.inc.php

I added the following lines under the `$config[‘db_dsnw’] value.


    $config['calendar_caldav_url'] = "https://your.fqdn.tld:8443/iRony/calendars/%u/%i";
    $config['kolab_addressbook_carddav_url'] = 'https://your.fqdn.tld:8443/iRony/addressbooks/%u/%i';

Change the FQDN and the ports to match your setup.

`kolab_files.inc.php`


# nano /usr/share/roundcubemail/config/kolab_files.inc.php

I change the `kolab_files_url` variable by adding an `s` to `http`


$config['kolab_files_url'] = 'https://' . $_SERVER['HTTP_HOST'] . '/chwala/';

There might be more files that need some changing, but I have not found any that need it yet.

This should get you on to the next step http://docs.kolab.org/installation-guide/first-login.html

Using iRony+Chwala as a WebDAV server your URL is:


https://your.fqdn.tld:port/iRony

Issues:
1. If you visit your Address Book and notice nothing shows up, you import and nothing shows. You turn off cache in libkolab.conf and the contacts show up? You need to run the database update script.

2. If you turn cache off and contacts work but the cloud files break you need to run the database update script.

3. If the buttons on the files page are disabled you might need to go through and verify all URLs are correct for HTTP(s). Verify your FQDN, DNS Settings at your provider, and check your hosts file for correct entries. It seems that the files page is very picky and requires that from the page be able to loop back and see itself. So all your hostnames, and FQDNs have to be exactly as they are. If your using SSL be sure to edit the files I mention on this page and change http to https that are hardcoded in the PHP files.

By |February 20th, 2014|Categories: How To|Tags: , , , |12 Comments

Google Voice forward to Asterisk PBX

I recently started at a new place of employment and wanted to port my cell number over from Sprint which my old employer used. This was okay with them so I ended up porting the number to my Google Voice account. I wanted to forward it to a new DID that I would get with a SIP provider and run my Asterisk PBX from that.

I then got a new phone from the employer and installed a Android SIP client on it. Registered the extension to my Asterisk server and started some testing.

Well sometimes the calls work fine, and sometimes Google Voice ends up just sending the call to the Google Voicemail. I wanted to fix this problem, and I believe I have found the solution if your trying the same thing.

On your incoming route in Asterisk for your Google Voice number, you need to setup a wait period. In the incoming route screen of FreePBX there is a field that allows you to wait before picking up the call. I changed this from an empty default field to 2 seconds.

I then checked the box above it to enable Signal RINGING.

It took me a while to figure this out, but I now have my incoming Google Voice number coming to my Asterisk server, hitting the incoming route, then an IVR, then to various extensions and ring groups.

By |April 2nd, 2013|Categories: How To|Tags: , , , |6 Comments

How to Setup Postfix

I sold the PowerEdge 2950 server tonight, been trying for a while. Hope you enjoy the server as much as I did man!

But he asked a question that I’m sure a few other people could use a little help on.

I have Postfix installed but how can I get it to really be a mail server for a domain?

Well this is actually not all that hard, but does require some setup in DNS.

First you need to login to which ever control panel you use for your domain name record management. (If you run your own BIND server I doubt you need this help anyway.) Check to make sure you have an `A` record that your domain name points to an IP address of the server (or public IP of router to route inside a network) something like ” `archaicbinary.net` POINTS TO 000.000.000.000 “.

Second we need to make a `MX` record with the same name as the domain name for which you want after your @ address. So email `@archaicbinary.net` this would just be `archaicbinary.net`. The value of the `MX` record will be the same hostname of the `A` record you created before.

Third for just this testing purposes the `priority` of the `MX` record value can be say `20`.

Save your changes and let the DNS records get updated to all the servers (this could take up to 10 days for really old, slow out of the way DNS servers).

You should be able to telnet to the A record on port 25 and get your mail server as long as it’s running and the ports are mapped if you use a NAT type setup. This tells us our A record is working.

You can then run any of the online SMTP online tools to test your DNS and SMTP servers setup to make sure things actually are reaching your server.

Please remember that hosting a mail server on a dynamic + public, provided IP address from most ISP’s in the US will usually get caught as spam.

By |March 1st, 2013|Categories: How To|Tags: , |0 Comments

TriBBS, Fidonet, TriDOG and TriTOSS

Ah what an adventure this is getting to be. As you may know I’m setting up my old Telnet BBS again, not just the door games, but the full system including File Areas, Message Bases, and yes the Door Games.

I have all the games working so far, and file transfers are fine when you use a good client (mTelnet or SyncTerm).

The message bases are taking a little more time as I am trying to get connected to Fidonet for netmail and echomail.

TriBBS is pretty old software honestly, and I am probably making this really difficult on myself by choosing to use TriBBS instead of a newer BBS package. Honestly I do like TriBBS, I have it registered since way-back when I was hosting it on a 14400 baud dialup connection.

So I contacted Janis Kracht who helps new comers setup their systems for Fidonet. You can find her site here: http://www.filegate.net/

You can signup using this form: http://fidonet.ca/bnbform.html.

Apply for Fidonet here: http://www.fidonet4u.info/

We have been talking for a few days over email trying to get everything I need setup, and I’m sure it’s been a long time since she has setup such an old system on Fidonet. We finally got netmail working as I am writing this we are able to send each other messages, and when I get a real node number, I should be able to send netmail to anyone else.

Here is what I used/did/configured on my side with TriBBS to receive netmail and echomail so far.

Utilities:
TriDOG 11
TriTOSS 11
BinkD
CFRoute

Files:
BACKBONE.NA


1. Load up Triman for your master node. Probably Node 1.
2. Go to Data Files -> Networks
3. Press F2 to Add Net, Name it 'Fidonet'.
4. Go to Data Files -> Message Conferences.
5. Press F2 to Add Conf. I did the following:

Conference Description: Fidonet - Network Mail
Read Message Sec: 10
Post Message Sec: 10
Private Conference: No
Alias Conference: No
Allow Private Posts: Yes
Allow Public Posts: No
Networked Conference: Yes
Network: (Choose Fidonet)
Fido-Style NetMail Conf: Yes
User Message Deletion: Allowed
Purge Msgs Older Than: 120
Msg Pack Backup File: No

6. Extract TriDOG into it's own folder. I did D:\TRIBBS\TRIDOG
7. Edit the TRIDOG.CFG file.
8. You should read the TRIDOG.DOC file to see what the lines mean.
9. I did the following:

tribbs=D:\TRIBBS\NODE1
address=fido:net/addresshere
fakeaddress=optional:fido:net/styleaddress
tagline=Archaic Binary
conf=2,D:\TRIBBS\MAIL\INCOMING\COMPLETE

10. Extract TriTOSS into it's own folder. I did D:\TRIBBS\TRITOSS
11. Run the CONFIG.EXE program.
12. Go through each section and change, update, modify what the defaults are.

System:
Main Address: your.fido:net/address
Mailer Type: BinkleyTerm
Sysop Name: Your Name
Origin Line: Your BBS Name
AKAs: (Nothing Yet)

Paths:
Node 1 Path: D:\TRIBBS\NODE1\
NetMail Directory: D:\TRIBBS\MAIL\INCOMING\
InEcho Directory: D:\TRIBBS\MAIL\INCOMING\
OutEcho Directory: D:\TRIBBS\MAIL\OUTGOING\
BadEcho Directory: D:\TRIBBS\MAIL\UNKNOWN\
EchoList Filename: 
LogFile Filename: D:\TRIBBS\TRITOSS\TRITOSS.LOG

Archivers:
Just make sure you have all those archiver programs in your path. I place all mine in D:\TRIBBS\UTILS

Echos:
Add the echos you want to get from echomail here.
The name MUST MATCH that in the ECHOLIST file.

Mine:
Echo Name: BBS_INTERNET
Conf Number: 3 - Fidonet - BBS_INTERNET
Group Sec.: A
Origin Line: Archaic Binary
SeenBy Address: 1:18/9999.0
Nodes: fido:net/nodeforecho
The conference above, was created before hand in Triman and setup as such:

Conf Desc: Fidonet - BBS_INTERNET
Read/Post Security: 10
Private Conf: No
Alias Conf: No
Allow Private: No
Allow Public: Yes
Networked Conf: Yes
Network: Fidonet
Fido-Style NetMail Conf: No
User Message Del: No
Purge Msgs Older Than: 0
Msg Pack Backup File: No

Nodes:
Press INS to insert a new node number, type in your Fidonet address.

Not much to do in here, I set my Origin Address to myself and typed in my fido:net/address.

Uplinks:
Press INS to insert your Fidonet uplink node address. I don't know if I will need this after we are done, but I may have to change it to my new uplink node once we are done testing.

Not much in here. I changed the Echo List path to the BACKBONE.NA file as used before.

The Origin Address I used my own.

13. This is the batch file I use, which is ran after a user logs off the system, and a few other triggered times as well.

Batch:


@ECHO OFF
CLS
D:
CD \TRIBBS\TRIDOG
TRIDOG.EXE
CD \TRIBBS\UTILS
CFR-WIN.EXE CROUTE.CFG
CD \TRIBBS\TRITOSS
TRITOSS.EXE
CD \TRIBBS\MAIL\INCOMING
MOVE *.MSG \TRIBBS\MAIL\INCOMING\COMPLETE
CD \TRIBBS\TRIDOG
TRIDOG.EXE
CD \TRIBBS\MAIL\INCOMING\COMPLETE
DEL *.MSG

This batch file runs TRIDOG.EXE first, which takes any messages ready to go out and makes them into .MSG files (BBS -> MSG File).

CFR-WIN (CFRoute) takes the .MSG files from \TRIBBS\MAIL\INCOMING\COMPLETE and packages them up, and then moves them to \TRIBBS\MAIL\OUTBOUND where BinkD is waiting for files to show up.

TRITOSS.EXE then runs to check the \TRIBBS\MAIL\INCOMING folder for new mail from BinkD. If it finds netmail waiting it convers it into a .MSG file if it finds echomail it plugs that message into the BBS Conf Area defined in the config.

We then move any .MSG files into \TRIBBS\MAIL\INCOMING\COMPLETE that TriTOSS made.

We run TRIDOG.EXE again, to find those new netmail messages in \TRIBBS\MAIL\INCOMING\COMPLETE and insert them into the BBS.

We then remove any left over .MSG files in the \TRIBBS\MAIL\INCOMING\COMPLETE folder.

CFRoute Config File:


LOG D:\TRIBBS\UTILS\CFROUTE.LOG
NETMAIL D:\TRIBBS\MAIL\INCOMING\COMPLETE
OUTBOUND D:\TRIBBS\MAIL\OUTGOING
MAIN your:fidonet/address@fidonet.org
NODELIST D:\TRIBBS\UTILS\NODELIST

ROUTE-TO fido:uplink/address 1:*   2:*   3:*   4:*   5:*   6:*

NODELIST above in the CFRoute config file is a text file containing the Nodes.

Filename only, not including the extension. Usually a .### file.

Update: Echomail was working correctly after a config change. Updated the stuff above to reflect. I need to add my CFRoute config here as well.

This might seem odd, and if you ARE a TriBBS sysop or WERE a TriBBS sysop and do have experience with this process please, please contact me if I am doing something wrong. I would love to discuss the correct procedure for getting NetMail and EchoMail into TriBBS correctly.

By |September 14th, 2012|Categories: BBS Info, How To|Tags: , , , , , , |0 Comments

Kaba Keycard LRC

When creating a keycard with a Kaba mag key writer with a PMS (Property Management System) or other software you need to calculate the LRC byte of the entire string. There are some examples from Kaba on how to do this, but not one for C# which would be the language that I needed to create this interface in.

Here is what I ended up doing:

private char GetKabaLRC(string s)
{
     char LRC = (char)(0);
     for (int i = 0; i < s.Length; i++)
     {
          LRC ^= s[i];
     }
     return LRC;
}
By |August 24th, 2012|Categories: How To|Tags: , , , , |2 Comments