Author Archive

Alfresco upgrade from 4e to 5d

Article still being edited.


This upgrade doc was written with the help of the following document

This is an upgrade from Alfresco 4.2.e to version 5.0.d but may well work for other versions.

I assume Alfresco 4.2.e is installed under the default directory /opt/alfresco-4.2.e

Stop Alfresco:

#service alfresco stop

Ensure that the old version does not start automatically upon reboot:

# chkconfig alfresco off

We need to find out what the database password is to dump the database:

# grep db.password /opt/alfresco-4.2.c/tomcat/shared/classes/

This will show the current db password. e.g. here it is dbpass4.2.e


Install the newer version of Alfresco:

chmod a+x



run through all the installation prompts and when finished I let it start up, one thing I did to allow it to be installed alongside the old version to to call the start-up script alfresco-e

Once installed and started we can stop the new Alfresco:

# service alfresco-e stop

we now need to just start the database:

# su – postgres

$ /opt/alfresco-4.2.c/postgresql/bin/pg_ctl start -w -D /opt/alfresco-4.2.c/alf_data/postgresql

We now need to dump the current database:

$ cd /opt/alfresco-4.2.c/postgresql/bin

./pg_dump -Fc alfresco > backup.pgb

We now stop the old database:

$ /opt/alfresco-4.2.c/postgresql/bin/pg_ctl stop -w -D /opt/alfresco-4.2.c/alf_data/postgresql/

We now have a database dump that can be used to populate a new database in the new installation. First we have to create the database, then populate it.

we now start the new database:

cd /opt/alfresco-4.2.e/postgresql/bin/

$ /opt/alfresco-4.2.e/postgresql/bin/pg_ctl start -w -D /opt/alfresco-4.2.e/alf_data/postgresql/

After that we connect to the new postgres instance to create the new database:

$ ./psql -U postgres -h localhost

Now enter the new password (which is the admin password you used during installation of alfresco-4.2.e), if you have forgotten you will find it in /opt/alfresco-4.2.e/tomcat/shared/classes/

Now create the database, where we will restore the data to:

postgres=# create DATABASE alfresco_42c;


The \q will quit out of the database shell

We left the database dump in the existing alfresco installation directory, so we address it from there when restoring

$ ./pg_restore -d alfresco_42c /opt/alfresco-4.2.c/postgresql/bin/backup.pgb

Now we will stop the database

$ /opt/alfresco-4.2.e/postgresql/bin/pg_ctl stop -w -D /opt/alfresco-4.2.e/alf_data/postgresql/

We now need to point the new installation to our new database:

use your favourite editor to change the database referenced by the new Alfresco:

switch back to root

$ exit

# vim /opt/alfresco-4.2.e/tomcat/shared/classes/

change to

We first delete the default installation data and then replace it with our repository data:

# cd /opt/alfresco-4.2.e/alf_data

# rm -rf contentstore  contentstore.deleted  keystore  oouser   solr  solrBackup

(this is everything in the directory apart from postgresql)

now we sync everything across:

rsync -trv –progress –exclude=”/postgresql/” /opt/alfresco-4.2.c/alf_data/* /opt/alfresco-4.2.e/alf_data

It should now be possible to restart the new repository:

# service alfresco-e restart

And test the web interface; depending upon how fast your machine is and how much data it will take some time to restart

Finally we have to copy across any global settings we may have such as mail and share settings in /opt/alfresco-4.2.c/tomcat/shared/classes/ to /opt/alfresco-4.2.e/tomcat/shared/classes/

Last is a restart to take the new settings:

# service alfresco-e restart

Disabling services on Zimbra

This will disable snmp, you may also consider disabling logger and stats.

zmprov ms -zimbraServiceEnabled snmp



Connecting to a squid proxy securely

Squid allows the use of https_port to specify a port that it will accept proxy requests over SSL.

An example is as follows in the squid.conf file:

https_port 8123 cert=/etc/pki/tls/private/squid.pem

I am using port 8123 as it is already a port allowed under the default SELinux installation on Red Hat Enterprise Linux. The cert instruction is the path to the SSL cert in PEM format. If you do not specify the key Squid assumes it is bundled in the SSL cert PEM file.

Don’t forget to open the firewall port.

At present Firefox and Chrome support connecting to the squid proxy over SSL, though one must use a pac file at the moment rather than the internal application settings.

An example pac file looks like:

cat /var/www/html/wpad.pac
function FindProxyForURL(url, host) {
return “HTTPS;”

You can then stick the pac file on a friendly web server or on your local file system and point the web browser in the configuration settings.

You can also launch chrome from the command line on mac with the following settings:

open ./Google\  –args –proxy-server=

Windows will take similar settings details here:

Check your proxy logs to ensure that the proxy is functioning.

PLEASE NOTE: Chrome and Firefox will not take the secure proxy settings in their application configuration settings. They require the use of a proxy.pac / wpad.dat file to function. If you configure the secure proxy in the application settings the web browser will fail to connect and throw an error.

Reducing SPAM

There seems to have been a cascade of SPAM over the last couple of days so I implemented some more anti-spam controls:

In /opt/zimbra/data/spamassassin/localrules/

I have:


score URIBL_BLACK 3.250

score RAZOR2_CHECK 3.250

score PYZOR_CHECK 3.250

score BAYES_999 4.000

score BAYES_99 4.000

score BAYES_60 2.250

score BAYES_50 1.500

score BAYES_00 -0.500


I have also created files:

 /opt/zimbra/blacklist and


These have been specified in:


the config in /opt/zimbra/conf/ reads:

read_hash(\%whitelist_sender, ‘/opt/zimbra/whitelist’);

read_hash(\%blacklist_sender, ‘/opt/zimbra/blacklist’);

The content of the files is for example:


# please run zmamavisdctl restart as zimbra user to make this work.

In /opt/zimbra/conf/ I have set some more spam rules

body TOPICA_RULE    /

describe TOPICA_RULE Spam delivered from prolific spammer

score TOPICA_RULE   100.5

uri TOPICA_RULE2    /

describe TOPICA_RULE Spam delivered from prolific spammer

score TOPICA_RULE2   100.5

uri TEST_RULEX    /

describe TEST_RULEX Spam delivered from prolific spammer

score TEST_RULEX   100.5

uri EMV3_RULE    /

describe EMV3_RULE Spam delivered from prolific spammer

score EMV3_RULE   100.5

header EMV2_RULE  ALL =~ /emv2\.net/i

describe EMV2_RULE Spam delivered from prolific spammer

score EMV2_RULE   100.5


Living with a Jolla phone…

I bought a Jolla phone for a number of reasons, such as the removable battery, not being tied to an Android / Google account and finally something that is not Apple as their software and hardware seems to be gaining bugs like a light at night.

There are a number of limitations to the Jolla for use at the moment. Some of which are in process of being fixed, others I need to submit bugs or feature requests for.



Mail crashes when replying to emails using Zimbra and so I cannot reply to any emails using the default mail app. ActiveSync, Calendars and Contacts are not installed by default so I had to spend a lot of time digging just to make the most basic functionality of a smart phone.

[Update 150201] This has now been fixed. When first logging in with my Jolla account I am offered a good set of default applications to install.

Mail does not recognise .ics attachments and so I cannot receive any calendar invitations. Mail also does not recognise epub files either and so does not offer to open ebooks (such as daily newspapers) when emailed.


Calendar does not allow one to invite others to appointments or meetings. The UI is limited to see one day at a time.

If an ActiveSync account is deleted the calendars that are associated with that ActiveSync account are abandoned on the phone.

[Update 150201 This has now been fixed, when I delete an ActiveSync account Calendars, Contacts and Emails are deleted.]

The only way to delete these is a total phone reset with removal of all data and settings. (Yes one could do it in the terminal; however this is a €500 phone that ought to be able to perform as its competitors.)

Now having disabled my mail within the ActiveSync sccount I added a general mail account as IMAP and now I have two mail accounts , this is just stupid. If I disable mail it should not still show as an available account. In addition now I have two huge mail icons in the first mail screen. This should be closer to how iOS handles a unified inbox. This wastes huge amounts of space and is a poor design.

Notes: There is no notes app to work with an ActiveSync service.

Contacts: If one deletes an ActiveSync account the contacts are abandoned on the phone. The only way to delete these is a complete phone reset. There is an option to delete all contacts; however this does not work.

[Update 150201 This is now fixed]

Camera and software: Light balance is poor, focus is slow, videos are not automatically compressed to be sent, photos can only be sent one by one. (Yes, really one can only select one photo at a time). The photo gallery software is basic. If photos are taken in landscape they are not rotated when using the camera app in portrait, e.g. when emailing photos.

Applications: There is an App store available by default, with links to other android app stores. Some of the app stores require crazy permissions such as wanting to read your text messages and record audio. It would be great to have app store there by default. There are more and more apps arriving.

Missing applications:

Navigation: TomTom or a sensible navigation app. There is Here (Nokia) maps and Google; however neither of these give audio feedback and lane information, which makes navigation slower and harder.

Mail / Calendar / Contacts: These are not fit for purpose at the moment and mean that I cannot use the phone. My family and I share appointments so that we know what we are doing and when. We share photos over email (not one at a time). I want to be able to delete an account and have all the data removed from the phone.

VoIP: I have yet to find a good VoIP application that comes close to Acrobits app, or even just one that I can depend upon. There are a few proprietary that only work with their own service and a couple of poor android VoIP apps.

Streamtome: Streamtome is the reason why I stick on iPad and would not consider a move to an Android tablet. It is the best media streaming app. (XBMC and Plex both screw up listings when they mis-read or mis-interpret metadata.)


The phone itself is larger that an iPhone 4 and has quite a slippery surface. I do not have small hands and I often struggle to use the phone one-handed, owing to it sliding out of my hand, the controls being out of reach. I am considering painting the edges with rubber glue.

Media: The methods for loading media are rudimentary. One method is to remove the SD card and plug it into a PC. If you don’t have an SD card or don’t have an SD slot in your laptop, then one has to enable developer mode, set a user password and then use an ssh client to copy the files across. Most android devices one plugs it in to a laptop using USB and then copies the files across.

Battery: The Battery lasts about a day, it is difficult to tell as there is so much I cannot do with the phone I often leave it lying around, when other devices I may well be using. The battery is removable but one cannot buy replacements. It would be terrific to have a battery charger and cradle like the Blackberry Q10.

Keyboard / touchscreen: Something odd here, I find it much harder to hit the correct keys than I do on the iPhone 4, which has a smaller display. It might be owing to lack of defined keys, or lack of accuracy in the display.


Responsiveness: Some times the UI is either unresponsive because it is doing something or it does not know where I am clicking. If I click on a link in a Twitter client or email sometimes I can wait for 4 seconds for the browser to launch. As this is the only feedback that the click has worked sometimes it takes 8-15 seconds to launch a link as I am often waiting for a link to launch when the UI has not taken the finger impact.

Orientation: Very sensitive, it is frequently swivelling to the ‘wrong’ orientation when reading lying down. I find myself having to lock orientation much more that on an iOS device. This is 7 screen swipes compared to one swipe and click on iOS.

Light response: The device responds very quickly to light, which makes it uncomfortable watching or reading on the device. Even just moving round a room or moving one’s hand slightly on the phone can result in it almost blacking out.

Status bar: There is no option to have the time or other alerts shown when using apps. As we spend a lot of time looking at our phones and the current generation have stopped wearing watches it seems odd not to have the option of a status bar with time and date.

Zimbra upgrade from 8.0.7 to 8.50

The upgrade went smoothly. The hiccoughs I had were based on the move of the Postfix postfix_transport_maps to LDAP and the decision to stop supporting hash function in the postfix transportfile from 8.50 onwards. This meant that the setting was broken and then migrated to LDAP.

The error message printed in zimbra.log is:

postfix/trivial-rewrite[22832]: warning: hash:/opt/zimbra/postfix/conf/transportfile is unavailable. unsupported dictionary type: hash

I could see the setting, which had the default setting and the server specific setting. The first output is the global setting that has been migrated, the second is the server specific setting:

zmprov getConfig zimbraMtaTransportMaps

The original result provided two results:

zimbraMtaTransportMaps: proxy:ldap:/opt/zimbra/conf/
zimbraMtaTransportMaps: hash:/opt/zimbra/postfix/conf/transportfile proxy:ldap:/opt/zimbra/conf/

What I want in the end result is:

zimbraMtaTransportMaps: lmdb:/opt/zimbra/postfix/conf/transportfile proxy:ldap:/opt/zimbra/conf/

To change this setting I used to be able to use zmprov; however the new setting is set in LDAP, which will require the use of        .

To start there is a very useful page here: that gives some great tips to be able to do queries on the Zimbra LDAP database.  Changing to the zimbra user and sourcing the correct variables allows us to do very easy queries. We can do:

su – zimbra source ~/bin/zmshutil zmsetvars ldapsearch -x -H $ldap_master_url -D $zimbra_ldap_userdn -w $zimbra_ldap_password

We are now given the full LDAP dump, which we can pipe through grep to find the transport settings:

ldapsearch -x -H $ldap_master_url -D $zimbra_ldap_userdn -w $zimbra_ldap_password | grep transport

I found two entries here as I mentioned, I want to change both of them.

I ought to be able to do this using zmprov and the zimbraMtaTransportMaps key. There is no example that I could find on the Internet and rather than experiment on the server I cheated and used a graphical LDAP editor to change the setting from hash to LDAP.

I browsed through config and then servers to find the global setting and then the server specific setting respectively.

Now when I run:

zmprov getConfig zimbraMtaTransportMaps

I get the correct result and Zimbra starts accpeting email again.

LDAP Zimbra login screen

LDAP Zimbra login screen

Zimbra LDAP browser

Zimbra LDAP browser

Comments Off on Zimbra upgrade from 8.0.7 to 8.50 more...

Difficulty with calendar sync on my Q10 – Resolved

Note – This has now been resolved. I found a couple of other people who had had similar issues.

Some long term repeat appointments cause all appointments to disappear in the calendar on the device. It also hides all appointments in other ActiveSync calendars too. The solution was to delete long term repeat appointments until the culprit is found. I will be looking through the logs to try to identify the particular issue so it may be fixed permanently.

When I add a new ActiveSync account on a Blackberry Q10 the calendar appointments appear initially but as I suppose the sync completes all the calendar appointments disappear. They still are held as I get reminders but they do not show.


ActiveSync 1

Initial ActiveSync sync with appointments showing












As the sync continues we see the months filling out:

ActiveSync 2

We can see the dates filling out, the larger the date number the more appointments













As the sync completes the appointments all disappear in the Q10 calendar app.

ActiveSync 3

Q10 appointments disappear as the sync completes


Calendar now blank

Calendar now blank












The appointments must still be present as we can see from the screenshot that they appear as a reminder on the lock screen.

ActiveSync 4

The appointments do not show in the Calendar app but do show in the lock screen.

Failure to change Passwords on SugarCRM

It seems that there is a bug in the default install for SugarCRM version 6.5 The error received is something like:
Please provide a new password. Incorrect current password for user. Re-enter password information.

One can work around this error by going to Admin, then setting:
System-Generated Password Expiration to None.

While this is not ideal, I assume that this will be fixed in the next release.

Create a new sparse KVM virtual disk

qemu-img create -f qcow2 imagename.qcow2 400G

This creates a new 400GB sparse disk that is only about 250kb on disk.

Copyright © 1996-2013 Xander Harkness. All rights reserved.
iDream theme by Templates Next | Powered by WordPress