Monday, June 01, 2009

Zotero style

I’ve just been writing a zotero style for radiopaedia.org where I’m an editor. I didn’t have a seamless start to the process and found it pretty difficult to work out exactly what I should be writing, but after taking one of the other styles as a starting point and mashing it about, I finally got to our working copy.

The styles are writtin in CSL and have to validate against the RELAX_NG XML schema. Long story short, use this online tool:

  • validator.nu
  • encoding and parser can be left of auto
  • schemas: http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/trunk/csl.rnc
  • check “Be lax about HTTP Content-Type”

And, after uploading and hitting validate you should be on your way.

As for getting the new style into firefox, just File->Open File from within Firefox.

And then, once happy, the task of getting it up to zotero rears it’s head. All the csl files are held in an SVN repository. So, we need to checkout the csl repro, We also need to have a zotero trac account to be able to submit our style.

Once the repro is checked out, we can add our style with an “svn add file.csl” and “svn commit”.

A couple of helpful pages:

Sunday, December 14, 2008

Amason S3 cloud backup

I’m looking at the S3 service from amazon as a solution for backing up all data from our Plesk servers. We already have backups saved to each server using totalbackup from 4psa, and to another server. However, they are all in the same datacentre, and it wouldbe nice to have another layer of redundancy.

  1. sign up to S3
  2. get the accesskey and secretkey
  3. use a service like s3browse.com to look at your space and create a “bucket”
  4. use something like duplicity to backup the entire system

S3 uses the concept of buckets to refer to a collection of all the data that is backed up. Each bucket has a name: however, each name is unique across all users. So, the ‘testing’ bucket won’t be available for anybody else.

Installing duplicity on ubuntu and setting up the backup

sudo apt-get install duplicity python-boto

Saturday, December 13, 2008

Spamassassin upgrade (Debain etch)

I needed to install the latest version of spamassassin on one of the servers because of the bug that flags false positive results for MS Outlook (http://wiki.apache.org/spamassassin/FORGED_MUA_OUTLOOK):

apt-get install debian-backports-keyring

Edit /etc/apt/sources.list

deb http://www.backports.org/debian etch-backports main contrib non-free

Do an apt-get update

apt-get -t etch-backports install spamassassin

Confirm whether you want to keep the old config files and the latest backport will be installed. You can check that latest version of all packages using:

dpkg -l

Friday, November 28, 2008

Plesk and qmail

I spent several hours this evening tying down a problem with the qmail server on one of our machines. Eventually, I found that 77000 messages had been sent from an auto-emailer function triggered by a malformed piece of MySQL on another server.

However, it has allowed me to find a use a couple of command line functions that I’ve not really used all that much before

/etc/init.d/qmail stop | start | restart

/var/qmail/bin/qmail=qstat

qmHandle -l

qmHandle -h’Subject: blah’

qmHandle is a helpful command line tool that allows you to manipulate the qmail queue (remembering that you need to edit the perl script once downloaded to set the user config)

# Set this to your qmail queue directory (be sure to include the final slash!)
my ($queue) = ‘/var/qmail/queue/’;
my ($bigtodo) = (-d “${queue}todo/0″) ? 0 : 1; # 1 means no big-todo

# While this is if you have a Debian GNU/Linux with its qmail package
my ($stopqmail) = ‘/etc/init.d/qmail stop’;
my ($startqmail) = ‘/etc/init.d/qmail start’;

# Enter here the system command which returns qmail PID.
my ($pidcmd) = ‘pidof qmail-send’;

Sunday, November 09, 2008

NautilusSVN

This is an absolute dream... like many who use SVN and have used Windows in the past, TortoiseSVN was it. There wasn't anything like it for Ubuntu... or at least that's what I thought until I took a look around and finally found: NautilusSVN on GoogleCode.

It's not as feature-rich as TortoiseSVN, but it does what it needs to do and has icon overlays which prettily tell you when files are out of sync with the repro.

Thanks guys!

Tuesday, October 14, 2008

Continued PCI Plesk issues

I thought I'd fixed the problems that related to PCI compliance, but it would appear that I was wrong.

The most recent PCI check flagged SSL2 errors on the imaps and pops ports. Thanks to a helpful site, the solution wasn't that far away though:
sudo -s
joe /etc/courier-imap/imapd-ssl
TLS_CIPHER_LIST="HIGH:MEDIUM:!SSLv2:!LOW:!EXP:!aNULL:@STRENGTH"

sudo -s
joe /etc/courier-imap/pop3d-ssl
TLS_CIPHER_LIST="HIGH:MEDIUM:!SSLv2:!LOW:!EXP:!aNULL:@STRENGTH"
Then restart courier:
/etc/init.d/courier restart
You can test the connection with the following:
openssl s_client -connect localhost:995 -ssl2
openssl s_client -connect localhost:995 -cipher EXP:LOW

Loading SSL certificates in Plesk

Recently had an issue with the SSL certificates on our Plesk servers. After some playing around, it turned out to be an issue with the way IE and Firefox handle the certificates differently and the way in which they are loaded into the Plesk GUI.

Our certificates are purchased through UK2 and uploaded to Plesk > 8.1
  • Alter the domain to run on an exclusive IP address
    • update dns settings for domain appropriately.
    • plesk -> select domain -> settings -> select IP from 'IP address' drop down
  • Get a new SSL certificate for the domain.
    • Plesk -> select domain -> certificates -> add new certificate
    • complete form.
    • copy resulting CSR to clip board
    • request free SSL cert from uk2 control panel for the related server
  • Once it's issued, manipulate supplied SSL certificate files
    • From the supplied zip file, open UTNAddTrustServerCA.crt and AddTrustExternalCARoot.crt PositiveSSLCA.crt within a text editor.
    • Create a NEW file with the content of each of the above files (in same order) with no spaces between them and save it as chain.crt (concatenate the files)
  • Upload the www_domain_name_com.crt file and chain.crt file to the server.
    • Plesk -> select domain -> certificates -> the new certificate
    • Under 'upload certificate files', browse for www_domain_name_com.crt under 'certicate' and chain.crt under 'CA certificate' and then click send file.
  • Alter the domain to use the new certificate
    • Plesk -> select domain -> settings -> select new certificate from the certificate drop down