<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title><![CDATA[Rob Thompson]]></title><description><![CDATA[Articles]]></description><link>http://rob.sun3.org/</link><copyright><![CDATA[Copyright Rob Thompson]]></copyright><generator>sNews CMS</generator><item><title><![CDATA[More on High Resolution Security Cameras]]></title><description><![CDATA[If you read my   previous article   on high resolution security cameras and are interested in more options, you may want to look at "Trail Cameras".  These devices are designed for hunters, something which I am not into at all, but hunting does (rather symbolically) describe what I was trying to accomplish.  
  
These cameras are designed from the ground up to be:
  
  
  &nbsp;&nbsp;&bull;&nbsp;Independent (no connections needed)
  &nbsp;&nbsp;&bull;&nbsp;Provide high resolution photographs
  &nbsp;&nbsp;&bull;&nbsp;Triggered by motion
  
As far as the manufacturers of these cameras are concerned, their customers consist of people who get excited by images of roaming "bucks" and other wildlife that may happen to pass by their trail camera.  I'm not yet sure what hunters intend to do with these photographs, but some of the images captured by these trail cameras are very cool.  I won't pretend to understand the market at all, but I do understand what these devices are intended to do and it fits the application of "high resolution security" perfectly.
  
There are several manufacturers of these cameras (among quite a few):
  
  
  &nbsp;&nbsp;&bull;&nbsp;  Moultrie Feeders  
  &nbsp;&nbsp;&bull;&nbsp;  Bushnell  
  &nbsp;&nbsp;&bull;&nbsp;  Cuddeback  
  
I am currently playing with one made by Moultrie and have found it to be fairly reliable.  The addition of an "  Eye-Fi  " card makes it so that the captured images can be automatically transferred to a either an online destination of your choice such as a web-based photo sharing service or your PC.  I'll be sure to update with more information soon.
    ]]></description><pubDate>Sun, 22 Jun 2008 13:14:11 +0000</pubDate><link>http://rob.sun3.org/home/more-on-high-resolution-security-cameras/</link><guid>http://rob.sun3.org/home/more-on-high-resolution-security-cameras/</guid></item><item><title><![CDATA[Bash Shell: Find Nano or Pico]]></title><description><![CDATA[  
It's amazing how little things make all the difference when doing your day-to-day sysadmin tasks.  I tend to use the same .profile on lots of *NIX boxes, but have always found it frustrating to find a sane editor in different environments.  My editor of choice in Nano/Pico (I'm not ashamed), but this is not always in the path.  I finally got around to adding functionality in my default bash .profile that looks in different places for Nano or Pico and adds an alias to the full-path binary, sets my EDITOR and VISUAL env variables and aliases one to the other if it can find one.  I've tested this script on Solaris, Darwin and Linux platforms.  If you like Nano/Pico and are frustrated with not having a consistent editor on different machines, you may find this useful to add to your .profile.     You should just be able to cut-n-paste this into your .profile.  The only thing you may need to change is the EDITOR_LOCATIONS array, to add locations to where these binaries are commonly found on different systems that you work with.
  
  
  
  

#######
#######
### Begin: Nano/Pico search: Look for NANO or PICO in common locations, add a full path location as an alias to both or one-of them.
###                          Also, make my environment variable EDITOR and VISUAL equal to the pico/nano binary if one exists
#######
#######

PROFILE_VERSION=0.1
PROFILE_STRING="[Bash Profile v$PROFILE_VERSION]"

NANO_LOCATION=`which nano 2> &1`
PICO_LOCATION=`which pico 2> &1`

NANO_LOC_FIRSTCHAR=${NANO_LOCATION:0:1}
PICO_LOC_FIRSTCHAR=${PICO_LOCATION:0:1}

if [[ "$NANO_LOC_FIRSTCHAR" != "/" && "$PICO_LOC_FIRSTCHAR" != "/"  ]]; then
   EDITOR_LOCATIONS=(/bin/ /var/ /usr/bin/ /usr/local/bin/ /opt/bin/ /opt/local/bin/ /sbin/)
   EDITOR_DIR=""

   for ((i=0;i  &2
      fi
   done

   for ((i=0;i  &2
      fi
   done
fi

if [[ "$NANO_LOC_FIRSTCHAR" != "/" && "$PICO_LOC_FIRSTCHAR" == "/"  ]]; then
   echo "$PROFILE_STRING Only pico found ($PICO_LOCATION), adding alias for nano."
        alias pico=$PICO_LOCATION
        alias nano=$PICO_LOCATION
        export EDITOR=$PICO_LOCATION
        export VISUAL=$PICO_LOCATION
fi
if [[ "$NANO_LOC_FIRSTCHAR" == "/" && "$PICO_LOC_FIRSTCHAR" != "/"  ]]; then
        echo "$PROFILE_STRING Only nano found ($NANO_LOCATION), adding alias for pico."
        alias pico=$NANO_LOCATION
        alias nano=$NANO_LOCATION
        export EDITOR=$NANO_LOCATION
        export VISUAL=$NANO_LOCATION
fi
if [[ "$NANO_LOC_FIRSTCHAR" == "/" && "$PICO_LOC_FIRSTCHAR" == "/"  ]]; then
        echo "$PROFILE_STRING Nano and Pico already in path (nano in $NANO_LOCATION; pico in $PICO_LOCATION)."
        alias pico=$NANO_LOCATION
        alias nano=$PICO_LOCATION
        export EDITOR=$NANO_LOCATION
        export VISUAL=$NANO_LOCATION
fi
if [[ "$NANO_LOC_FIRSTCHAR" != "/" && "$PICO_LOC_FIRSTCHAR" != "/"  ]]; then
        echo "Nano or pico not found. Yuck."
        export EDITOR=vi
        export VISUAL=vi
fi

#######
#######
### End: Nano/pico search
#######
#######
  
  
  Output  
  
  
  
[0931][rob@machine:~]$ source ./.profile
[Bash Profile v0.1] Found pico in /opt/bin/ !
[Bash Profile v0.1] Only pico found (/opt/bin/pico), adding alias for nano.
[0931][rob@machine:~]$
  
  ]]></description><pubDate>Fri, 02 May 2008 09:07:56 +0000</pubDate><link>http://rob.sun3.org/misc/bash-shell-find-nano-or-pico/</link><guid>http://rob.sun3.org/misc/bash-shell-find-nano-or-pico/</guid></item><item><title><![CDATA[Zimbra on a VPS: Tuning]]></title><description><![CDATA[  Out of the box, Zimbra is tuned for a fairly beefy machine.  Zimbra will easily consume 1.5GB of ram with default settings.  Some of these changes mean turning off a few Zimbra features and there are quite a few ways to do this, so you will need to evaluate memory usage given your own situation.  If you simply can't live without *all* the Zimbra features or intend to support a larger (>  15) number of users, my only suggestion is to get more ram ;).  But if you are willing to make some compromises, please read on.
    The changes below are ones that I found to be a reasonable compromise.  With a few easy changes, you can bring the memory consumption way down, so that it will hum along just fine on a server with ~512MB of ram.  Of course this reduces the amount of users that your server can support, but I've found that for a small installation of around 15 users, these settings will work just fine and give you the same performance as the out-of-the-box config with gobs of RAM.  The server I have been testing with has 560MB of ram, and after tuning consumes all the ram and only about 80MB of swap on average.  You will find that if you don't make changes similar to the ones suggested below with ~512MB of ram, your Zimbra install will slowly creep up its consumption of swap and your Zimbra install will start to crawl.  Also, >  512MB seems to be about the minimum amount of ram to get a useful/zippy server.
    
  After tuning: Typical memory usage  
  
  
  
Mem:    553160k total,   538580k used,    14580k free,    14616k buffers
Swap:  1023992k total,    83484k used,   940508k free,    98672k cached
  
  
  Tuning Steps      
&nbsp;&nbsp;&nbsp;&bull;&nbsp;Turn off anti-virus  
&nbsp;&nbsp;&nbsp;&bull;&nbsp;Turn off spell checking service  
&nbsp;&nbsp;&nbsp;&bull;&nbsp;Reduce the # of 'amavisd' (spam/virus) daemons  
&nbsp;&nbsp;&nbsp;&bull;&nbsp;Turn off unused services  
  
  Turning off Anti-virus      
Although anti-virus checking is a "nice-to-have" feature, it is one of the largest consumers of ram on your Zimbra install. IMHO, virus checking (clamav) is necessary with a large number of users, but I've found that I can easily live without this feature given it's cost to memory and the size of my installation.    

  Turning off spell checking service      
For me, spell checking is another service that I've found to be unncessary. As an avid Firefox user, I already rely on the built-in real-time spellchecking services of Firefox.  The Zimbra spellchecker is a submit-n-check style system, which relies on a PHP service to be run in the backend to handle to the submission.  Turning this off will free up a bit more ram and your browser may already give you an easier interface to work with anyways.    
  Turning off anti-virus and spell checking in the admin interface      
    
    Reducing the # of amavisd processes      
The last step that will really reduce the amount of ram consumed by your Zimbra install is to limit the number of 'amavisd' processes.  This daemon stays in memory and waits for both anti-spam and anti-virus jobs.  The default number of processes is 10 and each process consumes about 40MB of memory, so, by default amavisd will consume around 400MB of ram!  To reduce this, make the following change in /opt/zimbra/conf/amavisd.conf.in and restart your server.  There are two files, amavisd.conf and amavisd.conf.in.  Make your changes to the amavisd.conf.in file as this is replicated when zimbra starts up.  Note that you cannot reduce this to less than 2 as you will sorrily miss anti-spam checking and the minimum is 2:
    
  /opt/zimbra/conf/amavisd.conf.in    
  
  
  
$max_servers = 2;            # number of pre-forked children (2..15 is common)
  
  
  Turn off unused services      Lastly, turn off any services that you don't intend to use.  I don't use IMAP(s) or POP(s) services, so for me, it's not worth keeping them on.  This is good practice, both to free up more ram and for security.  These are controlled via their own tabs in the admin area under 'servers'.    
  Conclusion      
So, with a little compromise, you can make your low-ram VPS or server work just fine with Zimbra.  The key is to find those things that you are OK with disabling and reducing the amount of 'amavisd' processes.    ]]></description><pubDate>Thu, 01 May 2008 08:51:33 +0000</pubDate><link>http://rob.sun3.org/misc/zimbra-on-a-vps-tuning/</link><guid>http://rob.sun3.org/misc/zimbra-on-a-vps-tuning/</guid></item><item><title><![CDATA[Zimbra on a VPS:  Step-by-Step]]></title><description><![CDATA[  
Here is a step-by-step how-to for getting   Zimbra Collaboration Suite   installed on a XEN-based virtual machine/virtual private server running on Linux with limited resources.  I am going to use a hosted VPS from   Linode   for this example.  Based on the forum discussions at Zimbra.com, depending on the setup, running Zimbra on a VPS/VM can sometimes cause problems, especially with libc calls.  But, this setup seems to have worked fine for me for about 5 months so far and I figured I share.    
BTW:  I have no relation to Zimbra/Yahoo.  So, it should be noted that neither Zimbra or myself directly support Zimbra in the open source variety.  In short: I hope this helps, and good luck!
    
  Pre-Installation Checklist  
&nbsp;&bull;&nbsp;$30  
&nbsp;&bull;&nbsp;A few hours  
&nbsp;&bull;&nbsp;Some familiarity with UNIX  
&nbsp;&bull;&nbsp;A domain name, for which you have control of an 'A' and MX DNS record.
    

  Step 1: Set your DNS forward records  
Before getting too into the VM setup, you will need to establish a domain name to use both as your web front-end and as your mail delivery host (MX).  First, modify a forward DNS record for your domain to point toward your Linode IP.  This step is accomplished at the site of whoever either manages your DNS or at the DNS server that serves your domain name.  This forward DNS record will become the DNS name of your Zimbra front-end.  The A record can be anything you like, such as mail.mydomain.com.  Create an 'A' DNS record for your domain to point toward the IP address of your new Linode.  Then, also modify the MX record for your domain to also point toward this IP.  Point your MX record toward the name you chose for the A record.  I.e. A=mail.mydomain.com=[your linode ip], MX=mail.mydomain.com.    In this example, I have used the domain name 'mail.develo.com' for both my 'A' and 'MX' DNS records.    

  Step 2: Setting up your Linode  

The   Linode 540   seems to be sized just right for a minimum install.  Once you have completed the VPS purchase, and have a login to the linode site, you should see a screen in your account called 'dashboard' that looks like:  

        

Select a Debian 4.0 distribution, then provision your disk so that you have a 1000MB swap, and use the rest for the main root partition.  Zimbra will certainly eat all of your 540MB of ram (even with scaling down) and may potentially eat up some swap space too, so it is good to have this a bit big.  Next set the password that will be become your root password.  

        

Wait for your installation to be built (a few minutes), then click 'Boot'  

        

  Step 3: Set a reverse DNS pointer for your new IP  
In the Linode 'members' area, there is a tab called 'utilities'.  Click on the reverse DNS manager and put in the host name that matches your A/MX record that you set above.  The linode.com site needs to see a forward record that is pointing to your IP for this step to work, so it may take a while for your DNS changes made above to propagate and for the Linode to pick up the changes.  Until the forward DNS changes are viewable by the Linode.com DNS servers, Linode will not allow you to complete this step.
  
        

  Step 4: Connect to your Linode  

Now connect to your Linode IP address using an SSH client.  If you do not have an SSH client, here is a good one for Windows:  

  http://www.chiark.greenend.org.uk/~sgtatham/putty/      

Connect as user 'root', using the password that you specified while creating your Debian distribution.    

  Step 5: Change your Linode hostname  

After you are connected via SSH, the first order of business will be to change the hostname to match your DNS record, here, I'm using the example domain 'mail.develo.com'.  To change your host name, simple do the 2 command below.  The first writes the name of the machine to a file, the second sets the name.


  
  
  
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# echo 'mail.develo.com' >  /etc/hostname
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# /etc/init.d/hostname.sh start
Setting hostname to 'mail.develo.com'...done.
  
  

  Step 6: Reboot your Linode  
Now, let's reboot the Linode to verify that the hostname change is in-place at boot-up.  You may need to go back to your linode.com dashboard to start your linode if it does not come back automatically.
  
  
  
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# sync
li11-170:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# reboot
  
  

  Step 7: Update your package sources  
Update your Debian package sources with the command 'apt-get update'
  
  
  
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/util# apt-get update
Get:1 http://ftp.us.debian.org stable Release.gpg [378B]
Get:2 http://ftp.us.debian.org stable Release [58.2kB]
Get:3 http://security.debian.org stable/updates Release.gpg [189B]
Get:4 http://security.debian.org stable/updates Release [37.6kB]
Ign http://ftp.us.debian.org stable/main Packages/DiffIndex
Ign http://ftp.us.debian.org stable/main Sources/DiffIndex
Get:5 http://ftp.us.debian.org stable/main Packages [4280kB]
Ign http://security.debian.org stable/updates/main Packages/DiffIndex
Get:6 http://security.debian.org stable/updates/main Packages [257kB]
Get:7 http://ftp.us.debian.org stable/main Sources [1214kB]
Fetched 5848kB in 6s (959kB/s)
Reading package lists... Done
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/util#
  
  

  Step 8: Upgrade your packages  
This command will upgrade your Linux distribution to have current versions of all libraries and programs.  You may be asked to restart a few daemons such as ssh, continue with the defaults if asked.
  
  
  
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/util# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
  bsdutils cpio debconf debconf-i18n debian-archive-keyring e2fslibs e2fsprogs findutils libblkid1 libcomerr2 libkrb53 libpam-modules
  libpam-runtime libpam0g libpcre3 libss2 libssl0.9.7 libssl0.9.8 libuuid1 lsb-base mount nano tar tzdata util-linux
25 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.1MB of archives.
After unpacking 1163kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://ftp.us.debian.org stable/main bsdutils 1:2.12r-19etch1 [68.5kB]
Get:2 http://ftp.us.debian.org stable/main e2fslibs 1.39+1.40-WIP-2006.11.14+dfsg-2etch1 [87.2kB]
Get:3 http://security.debian.org stable/updates/main libkrb53 1.4.4-7etch5 [408kB]
...
...
  
  

  Step 9: Install packages required by Zimbra  
Install these packages (with libc6-xen last) using the apt-get command as follows:
  
  
  
mail:~# apt-get install file
...
mail:~# apt-get install sudo
...
mail:~# apt-get install fetchmail
...
mail:~# apt-get install libgmp3c2
...
mail:~# apt-get install libxml2
...
mail:~# apt-get install libexpat1
...
mail:~# apt-get install openssl
...
mail:~# apt-get install libltdl3
...
mail:~# apt-get install perl5
...
mail:~# apt-get install libc6-xen
...
  
  

  Step 10: Stop the default Debian email daemon  
The Debian package at Linode.com comes with a default email daemon (exim).  This runs by default and will conflict with Zimbra unless disabled before installation.  To disable exim, comment out the the line that starts with 'smtp' in /etc/inetd.conf using an editor such as vi or pico (i.e.: 'pico -w /etc/inetd.conf'). 
  
  
  
#:MAIL: Mail, news and uucp services.
#smtp            stream  tcp     nowait  mail    /usr/sbin/exim exim -bs
  
  
Now, restart the inetd daemon by issuing the command below:
  
  
  
mail:~# /etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd.
  
  

  Step 11: Download Zimbra to your Linode  
Find the HTTP link for 'Debian 4 x86' version of Open Source Zimbra at:   http://www.zimbra.com/community/downloads.html  .  Save the link location, SSH into your Linode as root and use wget to grab the distribution using the link that you copied.  Then 'gunzip' the distribution and 'untar' the tarball as shown.
  
  
  
mail:~# wget http://files.zimbra.com/downloads/5.0.4_GA/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307.tgz
...
...
mail:~# gunzip ./zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307.tgz
mail:~# tar -xvf ./zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307.tar
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/packages/
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/packages/zimbra-mta_5.0.4_GA_2101.DEBIAN4.0_i386.deb
zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307/packages/zimbra-spell_5.0.4_GA_2101.DEBIAN4.0_i386.deb
...
...
  
  

  Step 12: Start the installer  
The Zimbra installer is very easy, but has alot of output, so I've only included the steps that require input:
  
  
  
mail:~# cd zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307# ./install.sh
...
...
Install zimbra-ldap [Y]
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-proxy [N]
...
...
The system will be modified.  Continue? [N] y
...
...
Address unconfigured (**) items  (? - help) 3
...
...
Select, or 'r' for previous menu [r] 4
...
Password for admin@mail.develo.com (min 6 characters): [Kj77DUf9]
...
...
Select, or 'r' for previous menu [r] r
...
...
*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.5961]
...
...
The system will be modified - continue? [No] yes
...
...
Notify Zimbra of your installation? [Yes]
...
...
Configuration complete - press return to exit
mail:~/zcs-5.0.4_GA_2101.DEBIAN4.0.20080321134307#
  
  

  Step 13: Congrats!: Zimbra should now be running!  

http://yourdomain.com  

        

To get to the administration URL goto:  

https://yourdomain.com:7071    

There are tons of great people and lots of reference material here:   http://www.zimbra.com/forums/      

  Next see:   Zimbra on a VPS: Tuning   to reduce the memory footprint consumed by your Zimbra install  
  ]]></description><pubDate>Wed, 16 Apr 2008 09:10:00 +0000</pubDate><link>http://rob.sun3.org/misc/zimbra-on-a-vps-stepbystep/</link><guid>http://rob.sun3.org/misc/zimbra-on-a-vps-stepbystep/</guid></item><item><title><![CDATA[Zimbra: It&#039;s Going Places]]></title><description><![CDATA[  Zimbra   is a full featured email and collaboration suite that is currently rivaling and surpassing Microsoft Exchange in features.  As a devoted Qmail fan, and avid do-it-yourself emailer, I was at first skeptical about the platform when I first saw it.  To be honest, before I got to know it, I had pinned Zimbra to be yet another hyped-up web 2.0 app without the substance/innovation behind it to make it worthwhile.  Since then, I have learned many thing that have surprised me about Zimbra Collaboration Suite, among these:
    
  First:   Zimbra is a 100% complete email and collaboration solution including MTA, web-based email, spam filtering, anti-virus, etc., i.e. it is not just a web front-end that leaves you to figure out the rest of the stuff.  You start with a basic bare-bones UNIX installation and 20 minutes later you have the whole enchilada.  The installation, soup-to-nuts is easy, well developed and doable by anybody with basic UNIX system administration experience.
    
  Second:   The open source version of Zimbra Collaboration Suite is full featured and has everything and more that most want or expect from an email solution including: unlimited users, multiple domain support, class of service provisioning, intelligent anti-spam/anti-virus system, aliases, calendaring (iCal, CalDav, etc.), email filters, tasks, file sharing and countless other bells and whistles.  The open source version has it all, leaving no gotchas.  This is really quite remarkable as Zimbra is a company that gains profits.  Zimbra's bread and butter is with corporate customers.  Especially the fact that you can literally rip out your exchange server and its mandatory Active Directory servers, etc., and replace them with a pay-for version of the Zimbra Collaboration suite and Outlook/mobile users won't know the difference.
    
  Third:   Zimbra has recently made a   15-user version   of their pay-for Network Edition available to users with small installations for $399/year.  The Network Edition of Zimbra adds full MAPI Outlook connectivity, hot backup, clustering and most everything else that makes their product an Exchange killer.
    
I've been running a Zimbra server for 4 months now on a cheap   Linode   and could not be happier.  I will soon post an article about how to install and tune an open source Zimbra server on a low-cost Virtual Machine with minimal ram.
    
For a demo of the Zimbra front-end, visit:   http://www.zimbra.com/products/hosted_demo.php  
    
    ]]></description><pubDate>Thu, 10 Apr 2008 19:04:03 +0000</pubDate><link>http://rob.sun3.org/misc/zimbra-its-going-places/</link><guid>http://rob.sun3.org/misc/zimbra-its-going-places/</guid></item></channel></rss>