Archive for September, 2008

Exim on CentOs 4/5

Monday, September 29th, 2008 by The BCM Team

This is a quick guide (by jervis) on how to do an install and basic setup of exim on CentOS. This is not meant as a fully inclusive guide but it will get you on the way. Following this you should get a working exim install.

I will assume you have built a CentOS 4 / 5 Server, have yum working and have logged in as root.


yum update

Install exim and mail switching tools


yum install exim
yum install system-switch-mail

Switch your MTA & set exim to start on boot
system-switch-mail
service sendmail stop
service exim start
chkconfig exim on
chkconfig sendmail off

Add a root alias, eg:  “root: me@example.com”
vi /etc/aliases

You may also wish to add some config to your routers section like this, if you want to relay through a smart host.


vi /etc/exim/exim.conf

Then add this before the “dnslookup:” section.


to_smart_host:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = “* mail1.example.com:mail2.example.com;”


Restart exim
service exim restart

To test, send an email


echo “test” |mail -s “$HOSTNAME” me@example.com

Then you can flush the Exim Que and watch the log like this


exim -qff ; tail -f /var/log/exim/main.log

Good luck!

“===” compare operator and strcmp() or stricmp() in PHP

Thursday, September 4th, 2008 by The BCM Team

Have you ever run into trouble when using strcmp() function and the match found at position 0 ? strcmp() returns either an index of the first match or FALSE, if the match is not found. It is easy to see that FALSE and 0 can sometimes be interpreted by PHP as the same thing (when clearly they are not).

To avoid this hiccup from happening use “===” operator which means “equals and is of the same type”.


$str = "Look inside me";
$findMe = "Loo";
if (strcmp($str, $findMe) === 0) { ... match found at position 0 ... }

Digital Distribution Seminar Here We Come

Tuesday, September 2nd, 2008 by The BCM Team

We are pleased to announce that we have been invited to present a training session at the Erich Pommer Institut’s Digital Content Distribution seminar.

When: September 24 – 28, 2008
Where: Baden, Austria

The seminar will cover legal, regulatory and commercial developments in new media. Our slot, Producing and Distributing Audiovisual Content Online, will be held on Saturday 27th.

Our aim is to provide participants with an overview of:

  • the emerging and future trends concerning online audience behaviour, content development and the monetisation strategies of independent content producers and distributors
  • tips on developing, budgeting, shooting and casting for the web
  • how to maintain your production values – the art of encoding
  • the distribution options available and how to choose the right ones for your primary audience
  • how to estimate your return on investment and measure your success online

We are really looking forward to this, and would like to thank Nadja from the EPI and Jennifer from Insight Out for making this opportunity possible.

To Blog, Or Not To Blog

Monday, September 1st, 2008 by The BCM Team

A cartoon on blogging

Hi there, and welcome to our new blog.

When we were planning the update of our website having a company blog was pretty high up on the list of requirements.

At first this seemed like a small and natural addition to the site but the more we discussed it amongst each other the more we realised how divisive a feature this was.

In fact we were split pretty much down the middle.

Half the team thought it was absurd not to add one because:

  • we want to share our company news and views
  • we want to share the technical knowledge and tips we come across
  • we are repeatedly asked/told to start one by collaborators as well as clients
  • we really should start one
  • and just because everyone else is doing it – does not mean we should not

And the other half of the team thought it was absurd to even consider adding one because:

  • everyone’s doing it, and hardly anyone’s getting it right
  • do we really need to
  • do we really have enough time to commit to it
  • do we really have anything interesting to say
  • and even if we do have something interesting to say, do we have the skills to get it across interestingly

Truth be told we are still arguing internally but we have at least decided to give it a shot.

So here it is – our first blog post on the brief history of how we decided, or rather didn’t decide to develop and start blogging on a regular basis.

We hope this was the right way to go – and to be honest we can not wait to see if it works or not. Bragging rights are at stake, and they only increase in value when you work in an office as small as ours!!!

Now let’s see if this shows up as it should – here’s hoping!