Category Archives: Linux Servers and Software

General Linux server and software information.

Synology installation of ipkg DSM yum or apt-get equivalent

The reference for the first part is at http://swwiki.e-dschungel.de/synology but is in German.

First up we need a package installer, ipkg

Check the Synology device for which cpu it has,

[text]
#cat /proc/cpuinfo | grep cpu
[/text]

Then select the appropriate script

CPU Bootstrap Script
ARM (armv5tejl) http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh
PowerPC (ppc_6xx) http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/ds101-bootstrap_1.0-4_powerpc.xsh
PowerPC (ppc_85xx, e500v?) http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-7_powerpc.xsh
Marvell Kirkwood 88F6281, 88F6282, 88FR131 (ARMv5TE Feroceon) http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/syno-mvkw-bootstrap_1.2-7_arm.xsh
Intel Atom http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh

and get it with

[text]
#wget http://your_selected_cpu_bootstrap_script_here
[/text]

then run it with

[text]
#sh your_selected_cpu_bootstrap_script_here
[/text]

This install ipkg, but it is not in the path for the Synology system. To add it to the path:

1. check the path

[text]
#cat /etc/profile
[/text]

and this should be there

[text]
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin export PATH
[/text]

extend the path to include our /opt directories with two command lines

[text]
# PATH=/opt/bin:/opt/sbin:$PATH
# export PATH
[/text]

Then we can test that ipkg is installed and will run from anywhere with

[text]
# ipkg -v
[/text]

Should respond with something like

[text]
# ipkg version 0.99.163
[/text]

If you now try to install a package, you will get an error

[text]
#ipkg install mc
Nothing to be done
An error ocurred, return value: 4.
[/text]

Which is ok, this is expected because the new install does not yet know where to look for ‘mc’

Note: ‘mc’ is just a favourite package of mine, (midnight commander, with the excellent mcedit editor) but you could try any packge you want like ‘nano’, etc.

The final step for installing ipkg is to update the repositories

[text]
# ipkg update
[/text]

Then try again and as ipkg now has a repository to call on, it should find the install package and install it.

Much Later: Corrected a couple of text errors, thanks to all who pointed them out!

Outlook 2013 error 552 SME Server

Outlook 2013 perpetuates an issue with the Test email that is sent when creating a new email account or profile.

The issue has been there since much older versions of Outlook (like Office 97) but was always allowed to error gracefully, report, and be ignored.

The issue is that the Test Email does not have a date in the header. After all why would we want a date on a test email? (dripping with sarcasm!) other than to make it compliant with internet standards (which apparently in the RFC the date is optional, common sense says that adding todays date cannot be that hard, but I digress.

So, Outlook 2013 now has no option to accept the failure becuase ‘the server must be faulty’.

The error is 552 no date in header or similar depending on which flavour of server is reporting it.

For SME Server this could be remedied by allowing no header emails from within the local network, which should not present an issue for spam (which assumes that spammers do not worry about dates either) as it is on the local interface and not opening it up to the public.

This is documented in the SME Server Wiki but it is a simple snippet for a custom template created like this:

mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local
cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local
echo “# 17check_basicheaders disabled by custom template” > 17check_basicheaders
signal-event email-update

The last command resets the mail handling and you should be ok to run the test from the local network. Remote connections, unless on the VPN, will not work as the external interface will continue to reject the message without the date.

Which WordPress Contact Form Plugin to use?

Reviewing the plethora of Contact Form plugins for WordPress is daunting.  I have looked at dozens of possible options.

This review is relatively brief and focuses on obvious contenders. The rest can be summarily dismissed:

Contact Form by ContactMe.com reads very well, with all the common features. The catch is that it requires registration at yet another software as a service provider that wants your name and email address and offers ‘features’ that are totally unneccessary for the purpose of a contact form. Not for me.

Custom Contact Forms is another that sounds promising when reading the blurb and it installs smoothly, but then the top line is “Are you looking for a more customizable, reliable, and secure contact form solution for WordPress? Try Gravity Forms” which says to me that this plugin is not reliable or secure or customisable? Just a weird approach to marketing. Did not go further as Gravity Forms is one I am also looking at and if this one promotes Gravity then who am I to argue?

Fast Secure Contact Form is anything but fast with screen after screen of options, fields, and settings in one very long page. While I started to trawl down the list, I was overwhelmed within 30 seconds and decided that it would require far too much thinking and effort when all I want is a simple ‘Contact Us’ page.

BotDetect CAPTCHA is not a contact form tool but a method of adding Captcha processes to an entire WordPress site. The issue is that the plugin install does not include the native Captcha library, which must be downloaded separately and only after registering your email address with the service provider, etc. I had hoped to build a contact form and add this, but it just gave me headaches trying to get it configured.

Contact Form With Captcha is a nice contact form but the Recaptcha process is difficult for some users as the distortion of the words can be too much. In fact I have deployed this one on a number of sites and this review is simply to find an alternative that provides flexibility in the Captcha options.

Contact Form 7 is the one I eventually went with as it provided an easier Captcha option.

 

DeltaCopy, Rsync, Cygwin and Windows to Linux backups

I wrote a while back regarding Rsync backups from Windows servers to Linux using DeltaCopy.

It’s all been working ok but I’ve had some files failing with a “file has vanished’ message.

At first I tried searching for a solution based on the failures being any file with a special accent character.

The log email that I get sent by DeltaCopy contained something like this:

[text]
Profile datafiles failed to execute.
Execution log
————-
sending incremental file list
file has vanished: "/cygdrive/D/datfiles/A standard Windows type file?.jpg"
file has vanished: "/cygdrive/D/datfiles/Another file with two questionmarks ??.docx
….
[/text]

Investigating the Windows server the files did exist and they were not “in use” during the backup. However, some (note: not all)  some, files had special non-standard English characters in the file names. So characters with umlauts etc, like È, É, Ê  were giving issues alongside some punctuation characters that appeared normal but I suspect have been prepared from a non-English keyboard or system with a different character set.

So assuming that the character set was the issue I went searching.

I had narrowed it to the Cygwin toolkit rather than Rsync itself and came across this old message thread that included a link to a modified cygwin1.dll as http://www.okisoft.co.jp/esc/utf8-cygwin/  except that the link was broken. So I chased a modified cygwin1.dll and found what appears to be the updated link at http://www.oki-osk.jp/esc/utf8-cygwin/.

Downloading the compiled library file cygwin1-dll-20-11-18.tar.bz2 and extracting it to my Windows server using 7-Zip I renamed the old dll as cygwin1.dll.orig and copied the modified cygwin1.dll into the DeltaCopy directory.

Then I re-ran a data file backup that had given me “file vanished” errors and it seemed to work. But the next time it ran, it gave errors again.

So I delved deeper and found that the version of Rsync that is distributed with DeltaCopy is quite old, replacing the Rsync toolkit that supports DeltaCopy was the next thing to try and it worked a treat. I will document that process shortly.