Installed Radicale3 for hosting my own calendar and contacts data

So I finally got around to installing something so I can host my own calendar and contacts so that data is not shared with the big four corporate companies.

As I just need basic calendar and contacts functionality I chose the open source project Radicale. As I have run Fedora to control the house and my private data since 1998 I firstly installed the Radicale rpm via DNF.

dnf install radicale

This should install radicale3 as that is the latest version at the time of writing this blog post.

I will be running it off a sub domain of my public domain so I have set that up in the DNS with my main domain hosting company.

I have used a sub domain with a reverse proxy rather than opening another port [5232] on the firewall. I initially set it up with the port open but then rethought my approach as its more secure than to open the port on the firewall.

One other good thing using a sub domain is that you just need to have the proxy settings for that host rather than using location settings with the pathing.

Apache virtual host looks like this

<VirtualHost *:443>
 
 ServerName <subdomain.domain>
 DocumentRoot <pathtodomain>

 ProxyRequests Off
 ProxyPreserveHost On

 <Proxy *>
 Order deny,allow
 Allow from all
 </Proxy>

 # Forward requests to the backend Radicale server
 ProxyPass / http://localhost:5232/
 ProxyPassReverse / http://localhost:5232/

 # Inform Radicale about its location behind the proxy
 RequestHeader set X-Script-Name /radicale

 SSLCertificateFile <path to public key>
 SSLCertificateKeyFile <path to private key>

</VirtualHost>

Set up the config file for radicale to use it locally running on localhost on port 5232 and I am using my dovecot server to authenticate the users.

Then you should just be able to surf to the subdomain and be presented with the login page of the radicale server. Login and add your collections for the calendars and contacts.

Then configuring all the clients should be pretty straight forward for PC, Mac, iOS and Android.

MMEncode is not available on Linux distros any more.

Not sure what happened to this or why but its no longer available. I used to have a script that used it to convert binary data to text for attachments on emails. Having searched high and low I came up with a new solution – use openssl.

You can do the same that you were doing with mmencode by doing the following

openssl base64 -e < $FILE

Enjoy.

MySQL pegging CPU after the leap second adjustment.

So I find that my MySQL database is running high on CPU all of a sudden. I optimize the tables etc and no difference. I hunt around the internet to find that there seems to be a problem with this years leap second adjustment which sends MySQL into orbit.

The solution reset the date

date -s "`date`"

and it dropped back to normal.

Credit goes to this lady here http://www.sheeri.com/content/mysql-and-leap-second-high-cpu-and-fix

BackupPC Has qw(…) Warnings Since Upgrading Perl

So since upgrading Perl I am presented with qw warnings coming out of the cron job checking that BackupPC is running.

Use of qw(...) as parentheses is deprecated at /usr/share/BackupPC/lib/BackupPC/Storage/Text.pm line 301.
Use of qw(...) as parentheses is deprecated at /usr/share/BackupPC/lib/BackupPC/Lib.pm line 1412.

The way to get rid of these warnings is to enclose qw in parentheses and Perl processes the foreach parameters without warnings.

Like so

Text.pm (Line 301)

#
# Promote BackupFilesOnly and BackupFilesExclude to hashes
#
foreach my $param (qw(BackupFilesOnly BackupFilesExclude)) {
next if ( !defined($conf->{$param}) || ref($conf->{$param}) eq "HASH" );
$conf->{$param} = [ $conf->{$param} ]
if ( ref($conf->{$param}) ne "ARRAY" );
$conf->{$param} = { "*" => $conf->{$param} };
}

Lib.pm (Line 1412)

foreach my $param (qw(BackupFilesOnly BackupFilesExclude)) {
next if ( !defined($conf->{$param}) );
if ( ref($conf->{$param}) eq "HASH" ) {

Barclays Stockbrokers Have An Invalid Security Certificate

if you go to the barclaysstockbrokers.com url and try to login you get presented with an invalid security certificate error by firefox and ie 8.  The certificate is for www.stockbrokers.barclays.com not www.barclaysstockbrokers.com.

I have rang them and emailed them but no one seems that interested in getting fixed they dont see it as a problem.  Well in these days of phishing and spoofing I would say its a problem.  We will see how long they take to fix it, if at all.

UPDATE: 9 July 2009

Well eventually someone got back to me about it.  Looks like they have a problem with the login on the page as its hardcoded to stockbrokers.barclays.co.uk instead of the using the url that you actually come from.  I have been told by there technical bods that if you use the login at the top of the page it uses the correct url.  And it does work.  Come on Barclays sort it out so that all the logins use the correct URL.  I cant believe it took so long for you to actually come back to me with a sensible answer but to still see the site broken in this way is really unbelievable.  I expect quite a few people are having this problem as your eyes go to the login button within the site not the black bar at the top.

Looking at the stats on my page quite a few people are getting this error as the number of people coming to my site with the search words ‘barclays stockbrokers’ and ‘invalid certificate’ are quite high.

Accessing Vista with smbclient

Just bought a new machine and decided to put VISTA on it.  Now biggest problem was accessing the shares via smbclient or Samba.  Hunted high and low on the net couldnt find anything not specific for VISTA and smbclient.

I then looked for windows xp and smbclient and found a post about changing a registry entry.  Up to this point I had tried everything everyone else was saying like enable file sharing, private sharing etc and couldnt get any of that too work at all.

Probably works via another vista machine but not from linux or my apple.

I upgraded samba to the latest version before doing this.  I then added a registry entry in \HKEY_LOCAL_MACHINE

\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

called LocalAccountTokenFilterPolicy which a hexadecimal value of 1 and bobs your uncle you should be able to access shares and admin shares such as C$ on the vista machine from smbclient or mounting it in the fstab.

Hope that helped you, it helped me no end as I was getting very frustrated about it.  And samba is key to my machines here.

 

Checkpassword-0.90 Compilation Error on Fedora Core 3

Ok now next problem that I ran into in trying to get qmail running on the distrubution is that checkpassword-0.90 doesnt want to compile and looking on the web there is 1 arabic website explaining how to get around this which I cant understand but with again more pain I have finally cracked it.

In the source directory of checkpassword you will need to change the error.h file to include errno.h just after the line extern int errno like so…

extern int errno;

#include

then recompile and everything should work. 

IPTABLES doesn't work on initial boot

Now for a long long time I have been perplexed by why my firewall never works on my linux boxes on initial boot. 

When you run iptables –list is shows all the rules but never works until you run it again under the root account.  Now I finally got around to finding out why and its because the ipv4 forwarding is being reset somewhere down the boot chain.  Yep I found it, what you need to do is edit /etc/sysctl.conf and change the net.ipv4.ip_forward = 1 as this is set to 0 by default and switches off all forwarding used in any firewall script.

Now I did have the forwarding set in the script but the sysctl appears to run after all the startup processes.

Hope this helps as it certainly has been puzzling me for sometime.

Building the Linux-ATM software on Fedora Core 3 on a VIA C3 Processor

Recently I built the linux-atm software, which is an atm utility which allows me to use my pci ADSL card on linux.

The latest release is version 2.4.1 which I pulled down off of sourceforge, and I then tried to compile it.  This is what I fell fowl of..

1. The source has four compilation errors which are at lines with default: in the case statements these need ; after them, you can either edit the four bits of source code yourself or get a patched version of the code from here.

2. Then I kept getting the error ‘storage size of req is not know’ and ‘invalid application of sizeof to incomplete type atmif_soic’ which I realised that I had the paths to my kernel source incorrect.  Now I put in a symbolic link to the source so /usr/src/linux pointed to /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/include [ which is where the source really was ].  So to correct this error I typed this before running the configure of linux-atm.

CFLAGS=-I/usr/src/linux ./configure

and that got me over that problem.

3.  Then I got the error ‘config.h:6:2 error including kernel header in userspace use the glibc headers instead’ in atmdev.h to get around this I changed the line config.h to autoconf.h

Then it all worked and everything was installed into /usr/local/bin and /usr/local/sbin.

Hope that has helped someone.  The linux-atm package has been around for sometime but I didnt think the documentation or notes about how to change the path to pick up your distributions source code was that clear.