Skip to content
June 5, 2012 / Kyle

Setting up a SMTP mail server on an Ubuntu Server – (Amazon EC2 Specifically!)


Want more about Amazon EC2 & Ubuntu? Check out my new blog at:

weekly posts about all things Amazon EC2, Ubuntu & Moodle development.



I have been working on Moodle plugins for a number of years and never had any issues with my hosting companies. When Moodle 2.0 came onto the scene, things were a little different. A higher version of PHP was needed than my hosting company could offer.

So what did I do? I hopped over to my Amazon EC2 instance that is running a Moodle 2.0 installation.

Everything was working really well until I needed a mail server. Which I did not have set up. Needing to test some mail related libraries, this posed a bit of a problem!

So here is a little guide in getting a mail server setup for Moodle when using Ubuntu.

First thing we need to do is install postfix. Open up a command line to your EC2 instance and run the following command:

sudo apt-get install postfix

Next we need to tell PHP that we now have a mail server, navigate into the conf.d folder by typing:

cd /etc/php5/conf.d/

Next we need to create an ini file, simply type:
touch mailconfig.ini

To finish all we need to do is open up this file using a text editor (vim in this case):

vim mailconfig.ini

and  then finally add these lines:

sendmail_from =
sendmail_path = /usr/sbin/sendmail -t -i -f

Replace the email address with your default email address.

And that’s it! You now have a simple mail server set up. Before you get caught up in the details of the application that you are working on, we need to test this server to check that is everything is going ok.

On a directory of your web server, create a testmail.php file, and stick in the following lines:

$to = “”;
$subject = “Test mail”;
$message = “Hello! This is a simple email message.”;
$from = “”;
$headers = “From:” . $from;
echo “Mail Sent.”;

Make sure to add your details into this little blob of code!

Mail being marked as spam

One little thing to keep in mind before you finish. Make sure that you check your spam folder for the emails that are being sent. Sometimes the I.P addresses of EC2 servers have previously been identified as spam, or the domain names don’t match to where you are sending the mail from. Because of this, the mail may end up in your spam folder!

Amazon EC2 Firewall

It is important to remember that the Amazon EC2 firewall has ports locked down by default. To allow the mail server to work correctly you will need to open the mail port 25. You will notice that amazon will have port 25 as one of the default options available when creating new access rules.

To open port 25, follow these steps:

Navigate to your AWS console.

On the bottom left corner, you will see Security Groups. This will list all of the security plans you currently have set up and assigned to different instances.

Click the security group you wish to edit

Then under the “Inbound” tab you will see a list of ports currently open.

Beside “Create a new rule” select SMTP (Not SMTPS!).

To finish click “Add Rule” and then “Apply Rule Changes” and you are finished!

For security groups to work, they need to be applied to individual instances. So make sure the security group you are working with is assigned to an instance!


May 18, 2012 / Kyle

Allowing MySQL on Amazon’s EC2 to accept remote connections

Hello, This blog is moving over to More Amazon EC2 articles to come!

Hopefully see you there!

Amazon’s EC2 is a really great platform for well, everything!

I recently got a LAMP server setup some development, instead of having a LAMP server running locally. It is always a nice idea to see your code in an actual production environment, not local setting.

One little hitch people will come across after setting up a LAMP server on the EC2, is how do you allow remote connections to your mysql database. 

It is actually really simple, just a few small extra steps are needed!

Ok, it’s get started…

  1. Head over to your myself configuration. file. located at /etc/mysql/my.cnf and look for the “bind-address” this should have a value of
  2. Restart your mysql server
  3. Next we need to open the port on the EC2. Log into your user account and on the left hand side, head down to “Security Groups“. Look for the security group that is associated with your EC2 instance. (You can find the name of the security group for your instance to the right hand side of the instance name on main instance listing page). Once you have found the security group, click on it and under the “Inbound” tab you will see a list of port rules for the inbound traffic.Here you can open the MySQL Port (3306 by default unless you changed it). You will see a list of predefined ports for services that you can select to quickly add. Once of these is for MySQL (Others include HTTP, SSH etc).Don’t forget to click “Apply Rule Option” at the bottom when you are finished.
  4. Finally, we need to make a non “root” user account that will be used to access the database remotely. To access mysql from the terminal type: mysql -u root -pAnd you will then be prompted for your password. Once you have opened MySQL run the following command: GRANT ALL PRIVILEGES ON *.* TO bob@’%’ identified by “yourpasswordhere”;By running this command, you will be giving access to a user called bob, with the password yourpasswordhere and it will be accessable from any location.

And your done!

November 20, 2011 / Kyle

Thinking of starting your own Moodle for your school or college? [Part 1]

If you have recently been thinking of getting your own Moodle installation for your school or college congratulations, you have made the first step! It’s a slippery slope from here and you will day-by-day, see how you can save even more time and deliver a course efficiently with Moodle.

So, what do I need?

This post is all about the basics of getting started, assuming you are an educator who has previously had no experience at all with the virtual learning world, this is a great starting point.

If you have no experience with Moodle at all, don’t worry Moodle is without a doubt one of the simplest and most user-friendly systems you could ever work with, no prior knowledge needed!

The very first thing you need is a basic hosting package.

Hosting is the fancy word we use for the computer equivalent of hosting a party, instead, we need somewhere to host our Moodle. Before you jump into the deep end, here is a little primer about the differences between hosting packages:

All hosting packages do one thing; they host our files (or webpage  / Moodle) for us. Each hosting package offers a little bit more then the other, each with different tools for different tasks.


What we need to make sure is that our hosting package offers us support to run PHP pages, because Moodle was wrote in HTML and PHP. PHP can be considered the “Engine” That runs the code which the Moodle developers wrote. It is used the world over and you should not have any issues finding a hosting package which offers PHP support.

The second thing we need is support for a database. The specific database that we need support for is a MySQL database.

And that’s it! Once you got a hosting package with PHP and MySQL you are ready to go. All the other options available to us don’t matter, if you have them fine, if you don’t then don’t worry because we will not be using them.

Which package should I choose?


Hosting companies generally offer the above in different packages, usually a small, a medium and a large package. As this is your first time setting up a Moodle installation, a good bet is usually to start of with the smaller package. In time if we need a bigger package, we can always upgrade!


You will notice that each of the hosting packages tells you how many MySQL databases it offers, we only need one and basic packages usually come with 10 or more.

Ok now what?


Next you need a Moodle 2.0 installation package, which can be downloaded from the download section of The package will be zipped up in a .zip file. (If you have never used zip files before Google “How to unzip a file”).

And that’s it you’re ready to start the installation process of your new Moodle. Check back next week for the second half of this tutorial!


November 20, 2011 / Kyle

Getting everyone on board for Moodle 2.0 – Looking back at the last semester.

Coming to the end of the semester it is now time to sit back and reflect on how everything went. Did people use Moodle? What did they think of it? What was the over all opinion?

More times than not, the over all opinion is one that we really don’t want to hear… Academics didn’t take two it. Nothing makes a Moodelers heart drop like seeing a blank course page, just the way you left it before you handed it over for someone to take control for the semester. And they didn’t do anything, with the course page, and with any attempt to go online with their course.

How can we face the dragon? Do we run back to the academics with our swords in tract and put them on trial asking why?! WHY! This approach usually returns the same answers that we are all used to hearing:

“By the time the course got started” … “I couldn’t figure out how to… so I didn’t …” The thoughts of these comments make our skin bump up. We need a solution and we need it quick!

Like students, educators who are about to adopt an online course page need a little bit of hand holding to get going. We all know that and do our best to ensure we do all the hand holding that we need to do in the form of how-to guides, videos and even by preparing one to one tuition if they really need it. But what else do they need?

We are all students are heart

Looking back to the time when we were all one students, we all had one thing in common, if we didn’t understand something instead of making an abrupt scene, we would sit back wait for the class to end and when we got the time look up our own answer. Because nobody likes being the spotlight for a question which they know they can get quite easily from the web or a book. – It’s a bad good sometimes, but generally the student forgets or doesn’t get the time and the task at hand goes on the log finger until it gets forgotten..

What happens with a lot of forgotten questions? No answers! Exactly what we were trying to prevent from happening all along. As a result of this, the course page never gets made, and the learning environment never adopted. A sad ending to something that could have went so well!


So, what can we do?

This problem is obviously a little harder to address, and doesn’t have one straight up quick fix, it is almost a change of strategy and approach on how we encourage the level of adoption of a virtual learning environment.

When you consider all the possible reasons for not getting a course online, the list can be endless (and even more endless when you think about the different level of computer literacy that people may have).

During the original conversation with a potential academic who is interested in going Moodle, they were originally full of great thoughts as to where everything could go, and how much time they are really going to save in the long run (not to forget the amount of trees which can be saved instead of handing every students a brick of notes at the start of the semester which generally get lost!).


  • Students can see what they are covering and what has to be covered in the future.
  • No time printing all the notes out for the students.
  • No answering emails asking for notes.
  • No asking what time and date the assessment will be at

The list goes on!


These are the core values of Moodle that we need to keep in are arsenal whenever anyone says they don’t have the time to Moodle. Because, after all, when they Moodle they get time.


The feedback loop between administrator and academics needs to be tightened. Remember that academics were students once, and we don’t want the good ones forgetting their problems and the shy ones shying away from asking a question.

With whatever resources you have available, tighten your feedback loop and make an access route to solving problems quicker than letting the problems fade away over time.


August 26, 2011 / Kyle

Starting The New Semester – A new batch of teachers to educate.. Before we educate the students!


September is looming closer and closer. And with that, comes a new semester. New books, new classes and a new online learning environment being tested and teachers to be educated in how it’s the answer to some of their problems.

Once all upgrades and plug-ins have been tested and now it’s time for the real test, how it will all perform in the real world.

One thing though, that we can’t really test is how the teachers will actually cope with the new environment or more importantly how they will actually adopt the new learning environment. Will they take the chance and go “all online” or will they just use it as a repository for course notes?

How each individual teacher takes it, is really up to personal choice. If they like it, they may explore a little deeper and check out some of the other features the environment has to offer, or if you are lucky they may end up suggesting some plug-ins to add which they found… sounds good doesn’t it?!

But how can we prepare the teachers and give them the best opportunity possible for maximum uptake? In short, we can’t but all we can do is provide them with a firm grounding in the basics and then point them in the direction they need to be looking to further their knowledge whenever they feel like doing so.

We need to remember that learning (especially in working world) doesn’t happen in a formal setting anymore and time is not on our side. In the real world, learning happens at 11:55pm on a Thursday night when we can’t sleep or 2pm on a Sunday while waiting for our other half to come out of a shop. When we don’t have time for learning, we wait for something to spark out interest and that is when we decide to dig a little deeper and find out more.

When we hit a brick wall during a usual working day, we don’t have the time to go searching for the answer. We usually just look for another way of doing it and in the case of e-learning this means a paper multiple choice questions not an online test which self grades. Why? Time!

To make this coming semester easier on teachers, we need to make the path to learn more as simple as possible. Although books are great, they aren’t an on-the-go solution. Simple step based approaches for common tasks should be widely available for teachers, not through an email exchange. The effort of even that can sometime be off putting to some.

If time is on your side, a really simple web page, with clearly defined tasks on the left hand side could save them and you time in the long run. Remember that information is good, but when you are busy information is the enemy and bullet lists and single sentences are your friends.

Usually teachers don’t care why, they just want to know how!

May 17, 2011 / Kyle

The learning curve of e-Learning – How students think and work.


At the end of every semester, we think of all the students which have just finished the course, but what about all the students which are just about to take the course?.

Chances are the students which just finished, have a pretty good grasp on learning, (usually college students are straight out of high school / secondary school) and they would also have a good grasp on technology.

Great, we don’t need to worry!

But, what about the other students? The students who don’t have a good grasp on technology. How do we break them in? How do we get them up to speed?

The online learning curve: Electronic notes

Students which come from a more “paper based” background, will always find electronic notes a little difficult to get their head around. To read in a little deeper we have to really understand what they are trying to get their head around.

The single answer

Usually when student gets notes they automatically presume that is all they have to learn. No ambiguity exists and they will never need to look any further. With elearning this is taken away, the student is taken out of their comfort zone.

When student are not  given the “single answer” to their problem, some do not cope well. Students can quickly find themselves in a spiral of self doubt when forced to find their own answers and usually think along the following lines:

  • Is the answer I found correct?
  • I have really research this enough
  • Are the answer sources reputable?
  • Will this cause grade deductions if this is incorrect?
The move to an online learning environment somtimes needs a little more thought than orginally antisipated, especially when non technical students. The added pressure of searching for their own answers can quickly become overwhelming if the students are batteling the basics of navigation and diving in and out of notes online.
The main concept to always convey to students is that: No matter what, their approach will never go agaist them during greating. The reinforment of good use of online facilities and environments should always be rewarded!
~ Kyle
April 26, 2011 / Kyle

The future of e-Learning – (It’s now time to get talking and get these wheels moving!)


The main focus of this blog has always been about the future of e-Learning and what is the next big idea.

Now it’s your turn

So many people have so many great ideas or thoughts and usually these great ideas or thoughts turn into great pieces of software which can help people. Usually if someone has a great idea they keep it to themselves because, well,  sometimes they don’t want to look like the idiot if they think it’s not that great of an idea.

We need to remember that all great ideas come from thoughts and that is what I want to get started.

Yes it’s that simple, thoughts…….

I have started a discussion group over at and I encourage you to post your ideas or thoughts on the future of e-Learning.

Here’s a few pointers to get you started:

  • It doesn’t have to be constructive, or even a big point your trying to make, just let get it all out!.
  • Even if you think it’s not that great of an idea, get it out!
  • Even if it’s not an idea and it’s just some small group of people who you feel is not being catered for.
The main idea here is that, no matter how small your idea or thought is, it could be the fuel to spark of a greater idea. And it’s from these great ideas we can really get things moving!
You really never do know who is reading your ideas.
And if you see a good idea, why not post a message on the group to show what your view on it is.
This is your chance to shine. Let it all out. No matter how unqualified you may think you are, your experience will speak for you.

~ Kyle.