Saturday, May 18, 2013

Updates and Notifications

I have been running my own Linux server (debian 6.0.7) running LAMP and Wordpress for some time now servicing www.tonycossey.com , I started running my own server setup as both a learning exercise and as a comparison to using service like Google Blogger, where this article is hosted. First point that struck me was the need to constantly check wordpress and linux for updates, the recent spate of Wordpress security incidents re-enforced the need for this

I started using 'apticron' as I do not trust automatic updating of any OS and prefer to be in control of my own destiny, 'apticron' checks daily via cron scheduled script for outstanding updates and mails a target address with the updates.

To use 'apticron' under Debian

as root
'apt-get install apticron'

you will be prompted to supply parameters for the '/etc/apt/listchanges.conf' file which will include the target email address.

Test by running '/etc/cron.daily/apticron'........

If you lack an SMTP agent (MTA) on your system to send mail, run SSMTP via these instructions

as root
'apt-get install ssmtp'

once installed edit '/etc/ssmtp/ssmtp.conf' and edit the 'mailhub' pamameter with yoyr ISP's outbound smtp server, the file also contains options for SSL connections and credentials for protected SMTP servers. I noticed that as of 2009 ssmtp is no longer being devloped by it's maintainers, if you wish to use an active package see this excellent wiki article at archlinux, it may need some adapting to work with debian. https://wiki.archlinux.org/index.php/MSMTP