Posted: 2014-07-25 10:46:27 by Alasdair Keyes
I'm in the middle of migrating systems at the moment, part of which involves migrating mailboxes between seperate systems, the source system is using Maildir format mailbox and the destination is using Cyrus, so I'm unable to just copy the files from the filesystem.
Both have IMAP access so I can use the fantastic imapsync util to help http://imapsync.lamiral.info/. I hadn't come across it before, but if you want a basic sync of mailboxes, the following will do what you want. Obviously, use IMAPS as there's no reason not to..
imapsync
--host1 srchost.com --port1 993 --user1 dstuser --password1 pass1
--host2 dsthost.com --port2 993 --user2 srcuser --password2 pass2
--pidfile '/tmp/email@domain.com-imapsync.pid'
--nofoldersizes
--noreleasecheck
--subscribe_all
--delete2
--ssl1
--ssl2
--addheader
If you every need to perform any kind of migration, this will make your life a lot easier.
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-07-17 10:49:38 by Alasdair Keyes
The day will be here soon, appreciate your sysadmins for the hard work they do to make sure you can keep doing your work.
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-07-07 17:20:41 by Alasdair Keyes
Viewing Hacker News today, I saw a new project called JSON Resume.
JSON Resume is community driven open source initiative to create a JSON based standard for résumés. This is something I'd never thought about before, but is something that is in drastic need of standardisation.
Before the days of online recruitment and Digital CVs, a non-standard CV was a good thing. It let you stand out from the crown in a big pile of paper, drawing the eye of the recruiter.
Nowdays the opposite is almost true, you want your CV online and searchable by the largest amount of people, a complex or fancy CV might do you more harm than good. Many agencies will auto convert Word Document or PDF files into text that they can send out to prospective employers, but this would be even better if there were an overall standard format that could be used for everyone and easily searchable by recruiters and employers.
It has the benefit that the style can be separated from the content. Similar to the idea of CSS and HTML.
The project is in it's infancy and the specification is still a work in progress and will most definitely change in the near future, but I think it's worth supporting. To that end, please see my CV in JSON format
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-06-11 13:24:29 by Alasdair Keyes
Over the past few months many more TLDs have been released (Such as .wtf .ninja etc) and today the new UK TLD .uk was released.
This seems to have taken off in a big way, much more interest from customers than I'd expected. So, make sure you buy your .uk domain!
If you own the .co.uk, the .uk version has been reserved for you for 5 years, if you don't know where to register your domains, try Daily.co.uk
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-05-09 09:34:29 by Alasdair Keyes
Useful tool if you're starting out with Git Version Control
https://try.github.io/levels/1/challenges/1
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-04-08 16:31:03 by Alasdair Keyes
I was merging in code changes to my Dev VM this afternoon and I hit a rather nasty issue; I ran out of space on the virtual disk....
It wasn't difficult to sort the space issue, I created another disk in vmware and added it into the VM and used LVM/resizefs to increase the space available to the filesystem at which point I had plenty of space left to play with (I love LVM!).
Git status showed a list of modified files under the "Changes not staged for commit" section and a git diff off these files showed that they all had their content removed.
Not knowing what to do with my repo, I reversed the changed files with
$ git checkout -- file1 file2 ...
And then just merged in the chages again, this appeared to work but I wanted to be sure that nothing else had broken deeper in git.
I discovered the 'git fsck' command which took about 5 minutes to run and didn't show up any errors.
$ git fsck --full --strict
$
All looks good. A useful command to remember.
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-04-07 20:34:35 by Alasdair Keyes
If you're a sysad, you have no doubt already heard of the recent Heartbleed OpenSSL vulnerability. I won't rehash the details, but they can be seen on the links below. Just a reminder to make sure you update your systems, I can imagine that in a short period of time, people will be scanning systems to try and abuse it.
www.openssl.org/news/secadv_20140407.txt
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-04-03 23:52:22 by Alasdair Keyes
Digital Ocean seem to be the new darlings of the Cloud world, and for good reason, their servers are great value for money with good performance. I'm looking to upgrade my VPS soon and I will be strongly considering one of their VMs.
One other thing that have made me respect them are their incredibly useful tech articles. I've recently been looking at MySQL clustering for a project I'm working on that could grow and need to scale. I came across MariaDB's Galera tool, which looks to be a good starting point for me.
The next question was how to set it up... never fear Digital Ocean had a clear and concise article on how to do it https://www.digitalocean.com/community/articles/how-to-configure-a-galera-cluster-with-mariadb-on-ubuntu-12-04-servers, what more could you want?
Have a read through their articles, you'll probably learn stuff you didn't even know you wanted to learn.
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-03-28 16:18:08 by Alasdair Keyes
Sometimes an often overlooked source of poor system performance is the database. Developers and sysads can often become complacent and just continue piling data into a database without a second thought and assume that it will always carry on performing the way we'd like.
We had a mail server in our cluster at work performing poorly, and it appeared to be MySQL not keeping up with the amount of queries it was performing due to a high number of SMTP connections.
When checking the setup, I was surprised to see that no tuning had been done, even simple things like thread/table/query cache weren't enabled. Apparently these servers had slipped through the net as we'd not experienced any trouble with them before.
I broke out the trusty Mysql-Tuner http://mysqltuner.com/ tool, which should be at hand for any MySQL admin. It's an incredibly useful and easy way to diagnose simple and quick performance tweaks for your database.
It's a read-only script, so doesn't change your configuration, just alerts you to potential problems, so even if your DB is running perfectly, it's always worth running it just to see if you can improve something even further.
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
Posted: 2014-01-03 16:05:49 by Alasdair Keyes
NFS callbacks are a feature introduced in NFS v4 to prevent deadlocks. If two clients try to access the same file, the server can recall the delegation via an asynchronous callback to one client should there be a conflicting request for access to the file from a different client.
Unlike other NFS services such as lockd or statd the callbacks are setup on the client and not the server.
This sounds good but it doesn't seem to have been implemented very well and no real documentation on exactly how to use it or the correct way to set this up. There's no default NFS callback port, it's up to the sysadmin to choose a port and set it.
There are many pages on the net explaining how you can echo a port number into a /proc path (Which doesn't work if the NFS file is auto-mounted before this port is set) Or by setting /proc values in /etc/sysctl.conf, which doesn't seem to work at all.
I did stumble across this solution, however...
Choose a port This is entirely up to you, for this example, we'll set port 10000
Open the firewall on the NFS client
iptables -A INPUT -p tcp -m tcp --dport 10000 -m iprange --src-range x.x.x.x-x.x.x.y -m comment --comment "NFS TCP callback" -j ACCEPT
Set the callback port with modprobe Create a file called /etc/modprobe.d/nfscallback.conf with the following text
options nfs callback_tcpport=10000
Restart your NFS client and then check netstat to see if it's listening
# netstat -antp | grep 10000
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN -
That's it all setup!
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
© Alasdair Keyes
I'm now available for IT consultancy and software development services - Cloudee LTD.
Happy user of Digital Ocean (Affiliate link)