sSMTP, a light alternative to postfix or other SMTP server

Ok, so setting up a full sSMTP service on your server is usually overkill, and completely pointless. Especially if your server is simply sending out notification emails of services etc etc.

An alternative to a full SMTP server like postfix is sSMTP

Super simple to setup on a debian based server, first install it (warning, this will override any existing postfix installations you might have, but if you have not got your server sending out emails yet don’t worry about that).

Now configure sSMTP to use an existing mailbox you already have, in this example we will use gmail:

Replace the contents of the conf file with (NB if you keep getting auth issues from google when testing you might need to increase the strength of your password, as issue i had the other day):

That is it, now for a test, first

Then press enter, on the new line enter your email

Now to send the email, ctrl + d

Simple! Your server can now send emails and should automatically work with php’s mail function and basically most other email sending services on your server. Eg Nagios


Nagios3 on Ubuntu 14 server lts

What we are doing:

1 – Installing the nagios3 core onto a server running Ubunutu 14 lts. The purpose of this server is to monitor other servers.

2 – Install and configure a client server for the monitoring server to monitor.

3 – Setup and define a service

4 – Setup where the nagios monitoring server will send notifications to.

5 – Defining more services for your webserver

1  –  Installing and configuring the nagios3 core on the server used for monitoring others

First you need a full LAMP stack on your monitoring server:  Ubuntu LAMP

Second, unless you want to setup a full smtp server, you might want to quickly set up your server with sSMTP which will use someone elses SMTP server instead (ie gmail or something)

Install nagios3 on your server to monitor other servers

During the installation process you will be asked to configure a mail sever. By default nagios installs postfix, further on in this post we will override this with sSMTP, alternativ.

Choose the internet option:

Enter the mail name (this can be the default as we will override the postfix settings later

The default username for nagios is “nagiosadmin“, choose a password:

And confirm…

After nagios and nagios plugins installation, assign the permissions of www-data directory to nagios user, and set executable permission to the /var/lib/nagios3/ directory:

By default, Nagios won’t check for external commands, just to be on the cautious side.  If you want to be able to use the CGI command interface, you will have to enable this. To do that, edit file /etc/nagios3/nagios.cfg

Find the line,

Change it to

Save and close then restart nagios:


 You should now be able to access the nagios admin login page from:
http://< your ip or domain >/nagios3
username:  nagiosadmin
password:  whatever you set during the setup

Once logged your screen should look like:

You should be able to see the host (ie at the moment the only host will be the the server nagios is installed on) by clicking the host link on the left nav:

You can see more information about the host by click on the host:

2  –  Configuring a client for the nagios core to monitor

ssh into another machine, this machine will be monitored…

Install the nrpe and nagios-plugins packages

Allow the nagios core server access to this server by editing the nrpe.cfg file:

Add your Nagios server ip address (ie the address of the server with nagios core installed). Find the “allowed_hosts=” line, and add your nagios server’s IP (eg in this example I installed the nagios core onto a server with an IP of: at end, eg:

Now just restart


3  –  Link the webserver to the nagios core

Now, go back to your Nagios server to add the clients to be monitored through nagios server. By default, Debian based systems uses a configuration directory called /etc/nagios3/conf.d/ where nagios3-common, other packages and the local admin can dump or link all object configuration files into.

In the object configuration files, you can define hosts, host groups, contacts, contact groups, services, etc. You can split your object definitions across several config files if you wish, or keep them all in a single config file.  EG:
Also, You can tell Nagios to process all config files (with a .cfg extension) in a particular directory by using the cfg_dir directive.
In this tutorial, I will tell Nagios to process client config files in a particular directory.
Edit /etc/nagios3/nagios.cfg file,

and uncomment the following line.

Create a directory called servers under /etc/nagios3/ location.

Create config file to the client to be monitored. In my case, I want to monitor my Ubuntu desktop which has IP address, and hostname as sk.

And add the following:


Save and close the file.  Here, sk is my Ubuntu 14.04 client host name, and is the IP address of my client.  Restart nagios to see the new client in the nagios admin:

Now, open the nagios web console again in the browser and navigate to “Hosts” section in the left pane. You should see the newly added client will be visible there. Click on the host to see if there is anything wrong or alerts. Please note that you have to wait 90 seconds after any changes in your nagios server.

 Click the new host for more info:
Like this way, you can define more clients by creating a separate config files /etc/nagios3/servers directory for each client.

Define services on the nagios server:

We have defined the monitoring host before. Now let us add some services of the monitoring host. For example, to monitor the ssh service, add the following lines shown in red colour in the /etc/nagios3/servers/clients.cfg file.

And add to the end


Save and close the file. Restart Nagios.


Now log in to Nagios web console and check for the added services. Navigate to Services section, you should see the ssh service will be available there.

To know more about object definitions such as Host definitions, service definitions, contact definitions and more please do visit here. This page will describe you the description and format of all nagios object definitions.

4  –  Setting up email notifications from your nagios core server

Postfix is hard work and a little overkill for a nagios server. Instead we can use sSMTP to send the emails via a 3rd party email server.

Install sSMTP which will override postfix:

Configure sSMTP to use your gmail account (for example):


Remove all the contents and replace with:


Basic ntofication setup with Nagios:

The configuration file you will be using is /etc/nagios3/conf.d/contacts_nagios2.cfg. Although we are working with Nagios3, the “2” in the configuration file name is correct.

Within this file you will find a section that looks like:


The USERNAME you see above will be the text you need to configure for your alerts. If you need more than one email address to be alerted, you have to add a defined for each user.  Most of the definitions above will be pretty obvious. The service_notification flags are defined as such:
w = notify on warning states
c = critical states
r = recovery
f = start/stop of flapping
d = notify on down states
u = notify on unreachable states
s = notify on stopped states
You can pick and choose what states you want to be alerted for.
Once you have edited this file, save it, close it, and restart Nagios with the command:


You can go further with this to setup contact groups for different hosts and services etc ect. But for now, you should get an email when you webserver goes down.

5  –  Defining more than just an SSH service on your webservice

Back to your /etc/nagios3/servers/client.cfg file, at the moment we have just got the basic ssh service in there… lets add some more:


Gettting clever with your services:

Ubuntu 14.04 LAMP setup.

Install Apache

apt-get install apache2

Test the install   http://   should look like:

Install MySQL

apt-get install mysql-server mysql-client

Enter the mysql root pword:

And again:

Verify the MySQL server status using command:

service mysql status

Install MariaDB (optional)

First you have to remove existing MySQL packages if any. To completely uninstall MySQL along with its configuration files, enter the following command:

apt-get purge mysql*

Run the following command to remove unwanted packages.

apt-get autoremove

Run the following commands to add PPA. Hence, MariaDB 5.5 repository is not yet updated to 14.04, we can use the repository of Ubuntu 13.10 instead.

apt-get install software-properties-common

apt-key adv –recv-keys –keyserver hkp:// 0xcbcb082a1bb943db

add-apt-repository ‘deb saucy main’

Update the source lists

apt-get update 

Finally, install MariaDB

apt-get install mariadb-server mariadb-client

Enter the root pword

And again:

Check all is good:

service mysql status

Install PHP

apt-get install php5 php5-mysql libapache2-mod-php5

Create a sample “info.php” file in Apache document root folder.
nano /var/www/html/testphp.php  and enter:

Now restart apache to take note of php

service apache2 restart

Now navigate to the file you just created https:///info.php

If you want to install all php modules, enter the command sudo apt-get install php* and restart the apache2 service. To verify the modules, open web browser and navigate to http://server-ip-address/testphp.php. You will able to see all installed php modules.

Manage MySQL Databases (Optional)

A free open-source web interface tool used to manage your MySQL databases: phpMyAdmin. It is available in the Official Debian repositories. So install it with command:

apt-get install phpmyadmin

Select apache:

Select yes

Enter the mysql root password

Enter MySQL application password phpmyadmin.

And again

Access phpmyadmin  http:///phpmyadmin   which should result in:


If you cannot access phpmyadmin from the above path, you might need to add the phpmyadmin config to the apache conf file:

nano /etc/apache2/apache2.conf

Scroll to the end of the file and add and save:

Include /etc/phpmyadmin/apache.conf

Restart apache:

service apache2 restart

 Use the root pword to get in. Which should then look like:

Phpmyadmin security

As a precaution it is best to change the default path to phpmyadmin:
nano /etc/phpmyadmin/apache.conf

The first line should read: 

Alias /phpmyadmin /usr/share/phpmyadmin

Change the “phpmyadmin” bit to something secret:

Alias /somethingsecret /usr/share/phpmyadmin

AJAX File Uploader, small and neat!

After a bit of digging and messing around with alternate options for a simple but robust ajax file uploader, I would recommend lpology:


Their site:

There demo:
Their git repo:

A small and simple ajax form sender.

A small and simple ajax form sender. There are a few fairly big scripts out there to simply send a form via ajax to your server… so here is a very small one:

Salesforce glossary of terms

If your organization uses Salesforce or another CRM system , you probably know that it’s a powerful piece of software that is capable of transforming every aspect of how your sales team works. An effective CRM system can help your reps identify, manage, and close more deals more quickly. But with great power often comes great responsi … err, complexity.
For many of us marketers, our CRM system is like a black box. We know it’s chock full of data that could be useful to us, and we have a sense that we don’t know enough about it, but we still don’t know how to get our bearings. Perhaps you feel like you’re neck deep in CRM terminology every time you have a conversation with your sales manager. Maybe you just don’t feel all that confident navigating through your CRM system, or maybe you know that as a marketer, you could get a lot more out of knowing it better.
That’s why we thought it would be helpful to come out with a guide (written just for marketers) to one of the most popular CRM systems around — Salesforce. The Marketer’s Field Guide to Salesforce , which you can download for free here , will teach you everything you need to know about using Salesforce as a marketer.
While different CRM systems use slightly different terminology, to ease you into a better understanding of CRMs, let’s take a look at some common CRM, and specifically, Salesforce terminology that marketers should know.



A standard object in Salesforce that represents a company or organization (but not necessarily a customer). An account may have contacts (individuals or employees who work there), opportunities (potential sales deals), and other objects associated with it. The contact record stores details about the company like the company name, address, etc.


Records stored on an object that are typically used to represent actions taken on a lead, contact, or account — things like phone calls, emails from a rep, or future tasks that a rep intends to complete. Many marketing software platforms can automatically insert activities into the activity history to give a rep context about key actions marketing is taking with respect to a lead (e.g. email sends, if those emails were opened or clicked, form submissions made by the lead, etc.).

Activity History

A list stored on a record in Salesforce that shows the history of activities that have been carried out on that object. For example, the activity history section on a contact record may contain a list of actions the sales rep has taken in working that lead — emails sent, calls made, etc.


An API (application programming interface) is a system used by a piece of software to talk to other pieces of software. Salesforce offers an API that allows it to be connected to outside systems like a marketing platform or email tool. Some third parties ( like HubSpot ) have standard “connectors” that makes it possible to connect them to Salesforce’s API easily and without any technical knowledge.


A programming language used by developers to build applications that interact with Salesforce. These applications are often hosted on the platform (see below); there are hundreds of generally available applications in the Salesforce AppExchange.


Salesforce’s app marketplace, which contains hundreds of integrations with third-party services that allow users to extend the functionality of their Salesforce instance. HubSpot’s Salesforce integration, for example, is listed in the Salesforce AppExchange.


Bi-Directional Sync

A feature of a third-party tool (like HubSpot) that allows it to both read information from, and write information to, Salesforce. (Example: Because HubSpot’s Salesforce integration features bi-directional sync, it can both add new leads to Salesforce, and pull leads from Salesforce based on a user’s preference.)



An object in Salesforce used to track a marketing effort. The campaign object houses several standard pieces of data — a campaign name, start and end dates, expected revenue, budgeted and actual costs, and more. While Salesforce campaigns have many uses, most marketers use them for reporting purposes. Campaigns are often used in conjunction with closed-loop reporting from a marketing software platform like HubSpot.


A set of collaboration tools that are woven throughout Salesforce, allowing individuals to work together and share information on deals they are working. Users can join different groups, comment on different objects and data, and share details through chatter.

Closed-Loop Reporting

A reporting methodology in which data about which leads/contacts/accounts ultimately convert into sales is passed back to a marketing platform . In the marketing platform, the marketer can then attribute that customer to the various marketing efforts they touched, and better understand the ROI each of those efforts generated.

Closed Won Opportunity

A standard stage in Salesforce that refers to the status of an opportunity. An opportunity is typically set to “closed won” status when a deal is closed and the associated account is now a customer. Systems like HubSpot listen for this “closed won” status in Salesforce to enable closed-loop reporting .


A piece of software that connects another system (like a marketing software platform, or an email tool) to Salesforce.


A standard object in Salesforce that represents an individual person. The contact record contains details like a name, address, email, and phone number. A contact can be attached to an account and opportunity record.

Contact Role

A standard field included on the contact record that can be used to define the role an individual plays in an account or opportunity (e.g. decision maker, influencer, etc.).

Custom Field

A specialized piece of data stored in Salesforce that is unique to the user’s business. (e.g. A dog food manufacturer might create a custom field for “favorite dog breed” in its system to track the favorite breed of each of its contacts.)

Custom Object

A specialized type of record in Salesforce created to meet the needs of an individual business. An example of this might be an “employee” object that contains several details about an employee that is used by an HR department.

Custom Report

A view of data in Salesforce that has been personalized by the user to include exactly the information they want to see. A custom report might use filters to determine which records it includes (e.g. this report should include only lead records in Massachusetts who are CEOs) and will contain a set of individually chosen fields, usually as columns (e.g. the name, email address, and lead score of those Massachusetts CEO leads).



A dashboard in Salesforce is a graphical representation of what you might find in a report. Dashboards might include charts, gauges, or other graphics that represent the metrics that underly them. They make it easy for a team to track progress toward a goal or metric.



A field in Salesforce is a piece of data stored on an object. An example of a field might be the “First Name” or “Email Address” field found on the lead and contact records. Fields are also often referred to as “properties.”

A cloud platform service that allows developers to build and host applications on Salesforce’s servers. is widely used to host applications that work in conjunction with Salesforce, like many of the apps available in the Salesforce AppExchange.


Generally speaking, a forecast is an estimate of revenue that will be brought in during a given time period. In the context of Salesforce, a forecast is a type of report that shows a tally of data from opportunities expected to close in a specified time period. Your sales managers may use Salesforce forecasts to monitor their pipeline throughout the month.

Formula Field

A formula field in Salesforce is similar to a cell in Excel that contains a formula. The field relies on an equation to populate the data it shows. That equation may take other fields or information into consideration. An example of a formula field might be a field that shows the number of days since sales last followed up with a specific lead.



A standard object in Salesforce that represents an individual identity at an early stage in the sales process. A lead record isn’t natively connected to other data in Salesforce, but is “converted” when it represents a valid opportunity (a process which creates a contact in its place, and associates it with account and opportunity records).

Lead Scoring

A process typically carried out in a marketing platform that assigns a numeric value to a lead to represent how qualified he/she is. Every organization typically devises its own scoring criteria based on factors that determine the likelihood that a lead is well qualified.


A field that references the data in another field, possibly on another object. A lookup field can be identified by the clickable magnifying glass icon that appears alongside it. An example of a standard lookup field is the “Account” field that appears on a contact — this field is set to reference the “Account Name” field on the associated account object.


Marketing Cloud

A suite of social analytics tools offered as an add-on to Salesforce that helps large enterprise organizations monitor and leverage social media.



In the context of Salesforce, an “object” is a type of record that Salesforce uses to store your data. There are several standard objects that every Salesforce instance comes with out of the box — an account, a lead, an opportunity, a contact, and many more. It is also possible to set up custom objects to reflect custom pieces of data or custom parts of your process.


A standard object in Salesforce that represents a potential sales deal. An opportunity record typically contains details about the potential deal, like expected deal size (a dollar amount that cascades up to Salesforce forecasts), expected close date, probability, and opportunity stage.

Opportunity Stage

A standard field found on the opportunity object that is used to track the status of an opportunity. The opportunity stage may be set to one of several values such as “Prospecting”, “Negotiation/Review,” or “Closed Won,” which represents that the opportunity is associated with a customer or won business.



A queue in Salesforce is akin to a “holding pen” for objects that aren’t yet assigned to an individual. An example might be a “Recycled Leads Queue” where your sales reps send unqualified leads to if they determine the lead isn’t ready for sales contact.



A report is what it sounds like — a view in Salesforce of a specific subset of records and fields of data. Salesforce comes with several standard report types out of the box (e.g. the Campaign ROI Analysis Report, or the Lead History Report). It is also possible to create custom reports in Salesforce.


Standard Object

A type of record where data is stored that Salesforce uses out of the box. Examples of a standard object might be a lead object, a contact object, an account object, or an opportunity object. Also see the definition for “object.”



Tasks in Salesforce represent an action that has been taken or will be taken with respect to a record in Salesforce. An example of a task might be a phone call to a lead, or a marketing email that was sent to and opened by a contact. Tasks are listed on individual records, and are used by sales reps to manage their day-to-day actions for each lead. Managers can track tasks to measure the activity of a rep via reports.


A piece of Apex code that is used to kick off actions in Salesforce when a change to a record, or creation of a new record, happens in Salesforce. An example use of a trigger might be to change the “company type” field on an account record to “enterprise” if an account is set to have more than 500 employees in its company size field.



Think of a view as a predefined set of filter criteria that can be applied to a list of data from a drop-down menu. Many lists of data come with a preset list of helpful views; for example, you might choose to filter a list of contacts to see only “My Contacts,” which would surface a list of only contacts that you are set as the owner of. You can also create custom views in Salesforce.


Web to Lead

A tool in Salesforce that allows you to create simple forms that you can place on outside websites. When a user fills out the form, a lead is created in Salesforce. Note that most Salesforce Web to Lead forms will only accept up to 500 submissions per day.

Workflow Rule

A tool in Salesforce that allows you to automate certain actions like sending notification emails, updating fields in your database, adding tasks to a record in Salesforce, and more. An example use of workflow rules might be setting up a rule that sends an email to a specific sales manager when a deal comes in that needs their approval, based on the company size (or any other characteristic) of the associated opportunity. 

Don’t Be Overwhelmed!

While there are many terms you’ve probably heard used in reference to your particular CRM system, it’s important to not be overwhelmed. By biting off small bits and learning more and more from this  CRM and Salesforce glossary , you’ll get a better understanding of the system your sales team uses every day, and how you can better leverage its capabilities to improve your marketing and your processes.