May 152017
 




What is Claws mail?

Claws mail logo

Claws Mail is an email client aiming at being fast, easy-to-use and powerful. It is mostly desktop-independent, but tries to integrate with your desktop as best as possible. The Claws Mail developers try hard to keep it lightweight, so that it should be usable on low-end computers without much memory or CPU power, which is great when running it on a Raspberry Pi embedded SOC computer.

What is Claws mail not?

Claws Mail is not a full-featured Personal Information Manager like Evolution or Outlook, although external plugins provide these functionalities. Claws Mail will not let you write and send HTML emails or other kind of annoyances, hence it may not be the software you need in some business environments.

Google mail icon

Gmail Configuration

The first thing you have to do is set up Google Mail to allow IMAP connections.

Step 1: Check that IMAP is turned on in your g-mail account:

  1. On your computer, open Gmail.
  2. In the top right, click Settings Settings.
  3. Click Settings.
  4. Click the Forwarding and POP/IMAP tab.
  5. In the “IMAP Access” section, select Enable IMAP.
  6. Click Save Changes.
NOTE!
Gmail denies access to desktop email clients such as Claws Mail by default. Any sign-in attempt fails as if you had used an incorrect password for smtp authentication. To allow access, you need to modify an option in your account’s security settings.

1. Log in to the Google Accounts homepage.
2. Under Signing in, click Access for less secure apps
3. Select Turn on

 

Step 2: Configure Claws Mail on the Raspberry Pi:

Start the Claw mail application on your Raspberry Pi and go to the Configuration menu and select Create New Account. Use the table below to update your client with the correct information.

Incoming Mail (IMAP4 protocol) Server imap.gmail.com
Requires SSL: Yes
Port: 993
Outgoing Mail (SMTP) Server smtp.gmail.com
Requires SSL: Yes
Requires TLS: Yes (if available)
Requires Authentication: Yes
Port for SSL: 465
Port for TLS/STARTTLS: 587
Full Name or Display Name Your name
Account Name, User name, or Email address Your full email address
Password Your Gmail password

Step 3: The final step

Go back to the main Claws Mail window. If you right click on the Gmail main folder you will see an entry for Subscriptions. Under that entry there are three sub entries. Click the Subscribe entry to subscribe to your Gmail mail. Once you have done that, you can click Get Mail to download all of your Gmail mail. You are ready to go.

 

Step by step…..

For reference, your Raspberry Pi Claw Mail Account preferences should be setup like below when configured for your Gmail imap account:

  1. Select Configurations – “Create new account”

Select Claw configurations

2.Basic Claw mail settings:

Claw mail basic settings

 

3. Receive configuration:

Claw mail receive configuration

4. Send configuration:

Claw mail send configuration

 

5. Compose configuration:

Claw mail compose settings

6. Privacy configuration:

Claw mail privacy settings

7. SSL configuration:

Claw mail SSL configuration

8. Advanced settings:

Claw mail advanced settings

May 142017
 




InfluxDB is an easy to use open-source time series database developed by InfluxData. It is written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics. It also has support for processing data from Graphite. A time series database have the series records always associated with a timestamp. You can provide the timestamp with the measurement data or the Influx database will generate it itself.

Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB.

Combining Influxdb+Grafana makes an easy to use database and a very flexible and good-looking dashboard for your next Raspberry Pi datalogger project.


TCP port 8086 is used for client-server communication over InfluxDB’s HTTP API.
TCP port 8088 is used for the RPC service for backup and restore.
In addition to the ports above, InfluxDB also offers multiple plugins that may require custom ports. All port mappings can be modified through the configuration file, which is located at /etc/influxdb/influxdb.conf for default installations.

InfluxDB installation instructions on Raspberry Pi:

#1. Add the InfluxData repository configuration by using the following commands:

Note: After hitting enter on some commands, a new prompt appears and nothing else is displayed. In the Command Line Interface, CLI, this means the statement was executed and there were no errors to display. There will always be an error displayed if something went wrong. No news is good news!

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -source /etc/os-release

test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

#2.Install InfluxDB from the repository prevuously added in /etc/apt/sources.list.d/influxdb.list
sudo apt-get update && sudo apt-get install influxdb
#3. Start the InfluxDB service:
sudo service influxdb start
InfluxDB configuration

The system has internal defaults for every configuration file setting. View the default configuration settings with the influxd config command. Most of the settings in the local configuration file (/etc/influxdb/influxdb.conf) are commented out. All commented-out settings will be determined by the internal defaults. Any uncommented settings in the local configuration file override the internal defaults. Note that the local configuration file does not need to include every configuration setting. There are two ways to launch InfluxDB with your configuration file:
Point the process to the correct configuration file by using the -config option:

influxd -config /etc/influxdb/influxdb.conf
Set the environment variable INFLUXDB_CONFIG_PATH to the path of your configuration file and start the process.
For example:
echo $INFLUXDB_CONFIG_PATH /etc/influxdb/influxdb.conf

influxd

InfluxDB first checks for the -config option and then for the environment variable. See the Configuration documentation for more information.

To configure the InfluxDB first open the config file in the text editor nano:

sudo nano /etc/influxdb/influxdb.conf

I did the following configuration in the /etc/influxdb/influxdb.conf file:

#1. Configure the web-based Admin user interface, if admin through http web interface is desired:
 Please note that the Influxdb web-based admin interface will be deprecated as of version 1.1.0 and will be removed in a future release.  (Edit the following rows by removing the “#” tag.)
InfluxDB config admin access

#2.Configure the HTTP endpoint to get data in and out of InfluxDB:
(Edit the following rows by removing the “#” tag.)

InfluxDB http configuration file edit

Restart InfluxDB after modifying the file: ​sudo service influxdb restart

Test the InfluxDB installation

Open the Raspberry web browser and type:

localhost:8086
Instead of writing “localhost” in the address field you could enter the real IP address of your raspberry Pi: Example: 192.168.1.101:8086. If you don’t know the IP address you, can easily find if by using the bash command sudo hostname -I
If it works,you should see the following html page:
404 page not found
Yes, that’s right, on port 8086 you will see a 404 page. The browser will complain: “This site could not be reached” if the database is not found.

You could also try to run the Influxdb command shell by typing influx in the terminal.
When you see this response you know that it is working:
influxdb shell

Type exit to get out of the Influx shell.

You can login to the web-based admin interface if you have enabled it in the config file:

Before you dive into InfluxDB it’s good to get acquainted with some of the key concepts of the database. This document provides a gentle introduction to those concepts and common InfluxDB terminology. With InfluxDB installed, you’re ready to start doing some awesome things. Getting started guide here.

Grafana installation instructions on RaspberryPi:

I have decided to install using apt From Bintray Debian Repository at Github.

#1. Install some packages and add the bintray pubkey to the apt keyring:
sudo apt-get install apt-transport-https curl
curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
#2. Update your apt source

For Raspberry pi 1, and Raspberry Pi Zero W, use:

echo "deb https://dl.bintray.com/fg2it/deb-rpi-1b jessie main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

For Raspberry pi 2, and Raspberry Pi 3, use:

echo "deb https://dl.bintray.com/fg2it/deb jessie main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
#3. Install
sudo apt-get update
sudo apt-get install grafana
Test the Grafana installation

Open the Raspberry Chromium web browser and type:

localhost:3000
You will then see the Grafana login page:
Grafana login html image

You made it!

You’ve sucessfully installed Influxdb and Grafana on your Raspberry Pi supercomputer. If you’re just starting out, we recommend taking a look at Grafana well made documentation for Basic Concept and Getting Started guides.