Archive

Archive for the ‘ubuntu’ Category

Install Digikam 4.14 on Ubuntu 14.04

December 6, 2015 Leave a comment

Digikam 14.04

I love Digikam to manage my pictures. I want to install the latest stable release on Ubuntu 14.04.

Thanks to Philip Johnsson that maintains the ppa for Ubuntu:

https://launchpad.net/~philip5

First of all, add his ppa:

sudo add-apt-repository ppa:philip5/extra
sudo apt-get update

Now you can install digikam:

$ sudo apt-get install digikam
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 digikam : Depends: kdepim-runtime but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Trying to upgrade and reinstall digikam…

sudo apt-get upgrade
[...]
sudo apt-get install digikam

with no luck. apt-get is not able to resolve the unmet dependencies. In this situations, it’s better to use aptitude instead of apt-get:

$ sudo aptitude install digikam
The following NEW packages will be installed:
  akonadi-backend-mysql{a} akonadi-server{a} consolekit{a} digikam digikam-data{a} docbook-xml{a} docbook-xsl{a} enblend{a} enfuse{a} ffmpegthumbs{a} freeglut3{a} hugin{a} hugin-data{a} hugin-tools{a} 
  icoutils{a} kate-data{a} katepart{a} kde-runtime{a} kde-runtime-data{a} kdelibs-bin{a} kdelibs5-data{a} kdelibs5-plugins{a} kdepim-runtime{a} kdepimlibs-kio-plugins{a} kdoctools{a} kipi-plugins{a} 
  kipi-plugins-common{a} kubuntu-debug-installer{a} libaccounts-qt1{a} libakonadi-calendar4{a} libakonadi-contact4{a} libakonadi-kabc4{a} libakonadi-kcal4{a} libakonadi-kde4{a} libakonadi-kmime4{a} 
  libakonadi-notes4{a} libakonadi-socialutils4{a} libakonadiprotocolinternals1{a} libastro1{a} libattica0.4{a} libbaloocore4{a} libbaloofiles4{a} libbalooxapian4{a} libboost-filesystem1.54.0{a} 
  libboost-program-options1.54.0{a} libboost-regex1.54.0{a} libboost-signals1.54.0{a} libboost-thread1.54.0{a} libdbusmenu-qt2{a} libdlrestrictions1{a} libdmtx0a{a} libepub0{a} libexiv2-14{a} libglew1.10{a} 
  libgps20{a} libgsl0ldbl{a} libimage-exiftool-perl{a} libkabc4{a} libkactivities-bin{a} libkactivities-models1{a} libkactivities6{a} libkalarmcal2{a} libkatepartinterfaces4{a} libkcal4{a} libkcalcore4{a} 
  libkcalutils4{a} libkcmutils4{a} libkdcraw-data{a} libkdcraw23{a} libkde3support4{a} libkdeclarative5{a} libkdecore5{a} libkdesu5{a} libkdeui5{a} libkdewebkit5{a} libkdnssd4{a} libkemoticons4{a} 
  libkexiv2-11{a} libkexiv2-data{a} libkface-data{a} libkface3{a} libkfbapi1{a} libkfile4{a} libkgapi2-2{a} libkgeomap-data{a} libkgeomap2{a} libkholidays4{a} libkhtml5{a} libkidletime4{a} libkimap4{a} 
  libkio5{a} libkipi-data{a} libkipi11{a} libkjsapi4{a} libkjsembed4{a} libkldap4{a} libkmbox4{a} libkmediaplayer4{a} libkmime4{a} libknewstuff3-4{a} libknotifyconfig4{a} libkntlm4{a} libkolab0{a} 
  libkolabxml1{a} libkparts4{a} libkpimidentities4{a} libkpimtextedit4{a} libkpimutils4{a} libkpty4{a} libkqoauth0{a} libkresources4{a} libkrosscore4{a} libksane-data{a} libksane0{a} libktexteditor4{a} 
  libkubuntu0{a} libkvkontakte1{a} libkxmlrpcclient4{a} liblensfun-data{a} liblensfun0{a} libmailtransport4{a} libmarblewidget18{a} libmediawiki1{a} libmicroblog4{a} libnepomuk4{a} libnepomukcleaner4{a} 
  libnepomukcore4abi1{a} libnepomukquery4a{a} libnepomukutils4{a} libntrack-qt4-1{a} libntrack0{a} libopencv-photo2.4{a} libpam-ck-connector{a} libpano13-2{a} libpano13-bin{a} libpgf6{a} libphonon4{a} 
  libplasma3{a} libpolkit-qt-1-1{a} libpoppler-qt4-4{a} libprison0{a} libqapt2{a} libqapt2-runtime{a} libqca2{a} libqextserialport1{a} libqjson0{a} libqmobipocket1{a} libqrencode3{a} libqt4-designer{a} 
  libqt4-qt3support{a} libqt4-svg{a} libqtglib-2.0-0{a} libqtgstreamer-0.10-0{a} libqtgstreamerutils-0.10-0{a} libqtlocation1{a} libqtsolutions-soap-head1{a} libqtwebkit4{a} libquazip0{a} libraw10{a} 
  libshp1{a} libsignon-qt1{a} libsolid4{a} libsoprano4{a} libsqlite0{a} libstreamanalyzer0{a} libstreams0{a} libthreadweaver4{a} libvigraimpex5{a} libvirtodbc0{a} libwlocate0{a} libzthread-2.3-2{a} 
  marble-data{a} marble-plugins{a} mysql-client-core-5.5{a} mysql-server-core-5.5{a} nepomuk-core-data{a} nepomuk-core-runtime{a} ntrack-module-libnl-0{a} oxygen-icon-theme{a} phonon{a} 
  phonon-backend-gstreamer{a} phonon-backend-gstreamer-common{a} phonon-backend-gstreamer1.0{a} plasma-scriptengine-javascript{a} qapt-batch{a} sgml-data{a} shared-desktop-ontologies{a} soprano-daemon{a} 
  virtuoso-minimal{a} virtuoso-opensource-6.1-bin{a} virtuoso-opensource-6.1-common{a} 
0 packages upgraded, 191 newly installed, 0 to remove and 5 not upgraded.
Need to get 26.0 MB/157 MB of archives. After unpacking 516 MB will be used.
The following packages have unmet dependencies:
 mysql-server-core-5.6 : Breaks: mysql-server-core-5.5 but 5.5.46-0ubuntu0.14.04.2 is to be installed.
 mysql-client-core-5.6 : Breaks: mysql-client-core-5.5 but 5.5.46-0ubuntu0.14.04.2 is to be installed.
The following actions will resolve these dependencies:

     Remove the following packages:
1)     mysql-client-5.6            
2)     mysql-client-core-5.6       
3)     mysql-server-5.6            
4)     mysql-server-core-5.6       



Accept this solution? [Y/n/q/?] 
The following NEW packages will be installed:
  akonadi-backend-mysql{a} akonadi-server{a} consolekit{a} digikam digikam-data{a} docbook-xml{a} docbook-xsl{a} enblend{a} enfuse{a} ffmpegthumbs{a} freeglut3{a} hugin{a} hugin-data{a} hugin-tools{a} 
  icoutils{a} kate-data{a} katepart{a} kde-runtime{a} kde-runtime-data{a} kdelibs-bin{a} kdelibs5-data{a} kdelibs5-plugins{a} kdepim-runtime{a} kdepimlibs-kio-plugins{a} kdoctools{a} kipi-plugins{a} 
  kipi-plugins-common{a} kubuntu-debug-installer{a} libaccounts-qt1{a} libakonadi-calendar4{a} libakonadi-contact4{a} libakonadi-kabc4{a} libakonadi-kcal4{a} libakonadi-kde4{a} libakonadi-kmime4{a} 
  libakonadi-notes4{a} libakonadi-socialutils4{a} libakonadiprotocolinternals1{a} libastro1{a} libattica0.4{a} libbaloocore4{a} libbaloofiles4{a} libbalooxapian4{a} libboost-filesystem1.54.0{a} 
  libboost-program-options1.54.0{a} libboost-regex1.54.0{a} libboost-signals1.54.0{a} libboost-thread1.54.0{a} libdbusmenu-qt2{a} libdlrestrictions1{a} libdmtx0a{a} libepub0{a} libexiv2-14{a} libglew1.10{a} 
  libgps20{a} libgsl0ldbl{a} libimage-exiftool-perl{a} libkabc4{a} libkactivities-bin{a} libkactivities-models1{a} libkactivities6{a} libkalarmcal2{a} libkatepartinterfaces4{a} libkcal4{a} libkcalcore4{a} 
  libkcalutils4{a} libkcmutils4{a} libkdcraw-data{a} libkdcraw23{a} libkde3support4{a} libkdeclarative5{a} libkdecore5{a} libkdesu5{a} libkdeui5{a} libkdewebkit5{a} libkdnssd4{a} libkemoticons4{a} 
  libkexiv2-11{a} libkexiv2-data{a} libkface-data{a} libkface3{a} libkfbapi1{a} libkfile4{a} libkgapi2-2{a} libkgeomap-data{a} libkgeomap2{a} libkholidays4{a} libkhtml5{a} libkidletime4{a} libkimap4{a} 
  libkio5{a} libkipi-data{a} libkipi11{a} libkjsapi4{a} libkjsembed4{a} libkldap4{a} libkmbox4{a} libkmediaplayer4{a} libkmime4{a} libknewstuff3-4{a} libknotifyconfig4{a} libkntlm4{a} libkolab0{a} 
  libkolabxml1{a} libkparts4{a} libkpimidentities4{a} libkpimtextedit4{a} libkpimutils4{a} libkpty4{a} libkqoauth0{a} libkresources4{a} libkrosscore4{a} libksane-data{a} libksane0{a} libktexteditor4{a} 
  libkubuntu0{a} libkvkontakte1{a} libkxmlrpcclient4{a} liblensfun-data{a} liblensfun0{a} libmailtransport4{a} libmarblewidget18{a} libmediawiki1{a} libmicroblog4{a} libnepomuk4{a} libnepomukcleaner4{a} 
  libnepomukcore4abi1{a} libnepomukquery4a{a} libnepomukutils4{a} libntrack-qt4-1{a} libntrack0{a} libopencv-photo2.4{a} libpam-ck-connector{a} libpano13-2{a} libpano13-bin{a} libpgf6{a} libphonon4{a} 
  libplasma3{a} libpolkit-qt-1-1{a} libpoppler-qt4-4{a} libprison0{a} libqapt2{a} libqapt2-runtime{a} libqca2{a} libqextserialport1{a} libqjson0{a} libqmobipocket1{a} libqrencode3{a} libqt4-designer{a} 
  libqt4-qt3support{a} libqt4-svg{a} libqtglib-2.0-0{a} libqtgstreamer-0.10-0{a} libqtgstreamerutils-0.10-0{a} libqtlocation1{a} libqtsolutions-soap-head1{a} libqtwebkit4{a} libquazip0{a} libraw10{a} 
  libshp1{a} libsignon-qt1{a} libsolid4{a} libsoprano4{a} libsqlite0{a} libstreamanalyzer0{a} libstreams0{a} libthreadweaver4{a} libvigraimpex5{a} libvirtodbc0{a} libwlocate0{a} libzthread-2.3-2{a} 
  marble-data{a} marble-plugins{a} mysql-client-core-5.5{a} mysql-server-core-5.5{a} nepomuk-core-data{a} nepomuk-core-runtime{a} ntrack-module-libnl-0{a} oxygen-icon-theme{a} phonon{a} 
  phonon-backend-gstreamer{a} phonon-backend-gstreamer-common{a} phonon-backend-gstreamer1.0{a} plasma-scriptengine-javascript{a} qapt-batch{a} sgml-data{a} shared-desktop-ontologies{a} soprano-daemon{a} 
  virtuoso-minimal{a} virtuoso-opensource-6.1-bin{a} virtuoso-opensource-6.1-common{a} 
The following packages will be REMOVED:
  mysql-client-5.6{a} mysql-client-core-5.6{a} mysql-server-5.6{a} mysql-server-core-5.6{a} 
0 packages upgraded, 191 newly installed, 4 to remove and 5 not upgraded.
Need to get 26.0 MB/157 MB of archives. After unpacking 357 MB will be used.
Do you want to continue? [Y/n/?] 

And I finally got digikam 4.14 installed on my system.

Now, enjoy and leave any comments below.

Categories: digikam, linux, ubuntu Tags: ,

Apache file negotiation error: Negotiation: discovered file(s) matching request: /var/www/mysite/mypage (None could be negotiated).

December 4, 2015 1 comment

I rescued this post from my Drafts, I forgot to post it on time! Here is the original post.

Today I’ve been struggling with an annoying message in Apache’s error log:


[Wed Oct 02 19:18:36 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.9-4ubuntu2.3 configured -- resuming normal operations
[Wed Oct 02 19:18:43 2013] [error] [client 127.0.0.1] Negotiation: discovered file(s) matching request: /var/www/mysite/view (None could be negotiated).
[Wed Oct 02 19:18:43 2013] [error] [client 127.0.0.1] Negotiation: discovered file(s) matching request: /var/www/mysite/404 (None could be negotiated).

I have two Ubuntu boxes, one with Ubuntu 12.04 LTS 64 bits  and another with Ubuntu 13.04 64 bits recently installed. I usually export projects from one box to another, and when I imported the project to my Ubuntu 13.04 box I got this problem. The website works fine in my 12.04 machine, so, I pressumed it’s an Apache configuration issue between my two boxes.

I want to redirect http://www.mysite.local/home to http://www.mysite.local/view.php?page=home.

My .htaccess works right on the other machine, so I’ve checked for mod_rewrite status and it’s also enabled in the 13.04 box.

This is my VirtualHost :


<Directory /var/www/myotragus.net>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
 </Directory>

I adjusted the RewriteLogLevel to 9 but I can’t understand the final redirection from view to -> view:


127.0.0.1 - - [02/Oct/2013:19:00:54 +0200] [www.mysite.local/sid#7f10f7002670][rid#7f10f143c880/initial/redir#3] (2) [perdir /var/www/mysite/] rewrite 'view' -> 'view?page=view'

After googling a while, I tried different things, but none worked:

  • Disabling Multiviews in my VirtualHost did’nt worked
  • Disabling mod_negotiation neither worked for me.

Finally, I found this post at serverfault.com that hit the nail on the head: I have to edit the /etc/apache2/mods-available/mime.conf to add this line:

AddType application/x-httpd-php .php

As Lorenzo said in his answer, the negotiation was failing because mod_negotiation only looks for known file types.

Just restarted apache and all worked again as intended.

Please, leave your comments below.

Categories: apache, linux, php, ubuntu Tags: ,

Use different color for root terminal on Linux

December 4, 2015 Leave a comment

Looking for a way to distinguish the different terminals i usually have opened, I found this post:

http://lifehacker.com/5195951/use-a-different-color-for-the-root-shell-prompt

It just changes the prompt color, red if you’re root, adding this line at the end of /root/.bashrc:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

and green for normal users, adding this to your ~/.bashrc

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

and restarting the terminals.

Now it’s easier to know if you’re root or not!

Please, feel free to leave your comments

Categories: linux, ubuntu Tags: ,

Ubuntu Recovery mode with internet connection and read write filesystem

December 2, 2014 Leave a comment

I’ve upgraded my box to a fresh Gnome Ubuntu 14.10 install. After installing some packages, and rebooting several times, I faced an error when rebooting and I cannot start the system.

I tryed the recovery option, but my system was unable to start in graphics mode, I can only get into a sudo console.

I was pretty sure that is a package recently installed that crashed my system. So I entered in a sudo console in recovery mode.

This console mounts the / filesystem in read-only mode. I needed to update the packages installed, so I also need a network connection in recovery mode. Here’s how I get it done:


mount -o remount, rw /

ifconfig eth0 up

dhclient eth0

First command is to mount the / filesystem in read write option (obviously). The second command raises up the ethernet device, and the third one sets an IP to the eth0 device using DHCP.
Then, I was able to recover my system with a dist-upgrade:


apt-get dist-upgrade

Do you have the same problem? Please, leave your comments below.

 

 

Ubuntu 12.04: Your current Hardware Enablement Stack (HWE) is going out of support on 2014-08-07

July 26, 2014 3 comments

A few days ago I received a message in the update manager saying that New hardware support is available.

Your current Hardware Enablement Stack (HWE) is going out of support
on 2014-08-07. After this date security updates for critical parts (kernel
and graphics stack) of your system will no longer be available.

For more information, please see:
http://wiki.ubuntu.com/1204_HWE_EOL

But when I try to install, I get an error regarding unmet dependencies.

I tried to update with command-line, as pointed in http://wiki.ubuntu.com/1204_HWE_EOL:


miquel@l3-ubuntu-12:~$ hwe-support-status --verbose

Your current Hardware Enablement Stack (HWE) is going out of support
on 2014-08-07. After this date security updates for critical parts (kernel
and graphics stack) of your system will no longer be available.

For more information, please see:
http://wiki.ubuntu.com/1204_HWE_EOL

To upgrade to a supported (or longer supported) configuration:

* Upgrade from Ubuntu 12.04 LTS to Ubuntu 14.04 LTS by running:
sudo do-release-upgrade

OR

* Install a newer HWE version by running:
sudo apt-get install linux-generic-lts-trusty libgl1-mesa-glx-lts-trusty xserver-xorg-lts-trusty linux-image-generic-lts-trusty

and reboot your system.

As my hardware is very old, I decided to install a new HWE version, rather than upgrading to 14.04 LTS, but I’m getting this errors:


$ sudo apt-get install linux-generic-lts-trusty libgl1-mesa-glx-lts-trusty xserver-xorg-lts-trusty linux-image-generic-lts-trusty
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libgl1-mesa-glx-lts-trusty : Depends: libglapi-mesa-lts-trusty (= 10.1.3-0ubuntu0.1~precise1) but it is not going to be installed
Recommends: libgl1-mesa-dri-lts-trusty (>= 7.2) but it is not going to be installed
xserver-xorg-lts-trusty : Recommends: libgl1-mesa-dri-lts-trusty but it is not going to be installed
Recommends: xserver-xorg-input-all-lts-trusty but it is not going to be installed
Recommends: xserver-xorg-video-all-lts-trusty but it is not going to be installed
Recommends: x11-xserver-utils-lts-trusty but it is not going to be installed
Conflicts: libglapi-mesa:i386 (>= 0~)
E: Unable to correct problems, you have held broken packages.
miquel@l3-ubuntu-12:~$ lsb_release -d
Description: Ubuntu 12.04.4 LTS
miquel@l3-ubuntu-12:~$ uname -a
Linux l3-ubuntu-12 3.5.0-54-generic #81~precise1-Ubuntu SMP Tue Jul 15 04:02:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

As posted in http://wiki.ubuntu.com/1204_HWE_EOL:

End-of-life (EOL) for 12.04, 12.04.1, and 12.04.5 HWE is April 2017 but for the other HWE stacks it is roughly when 14.04.1 is released: Aug 8, 2014.

After googling for a while, I found this post in Ubuntu forums: http://ubuntuforums.org/showthread.php?t=2234693. It’s seems safe to stay with the old HWE stack if you are not planning to use new hardware. Security fixes for the kernel will still be released. So, until the update procedure is being more mature, I will stay with the old HWE stack.

Updated 2014-08-11

Thanks to @Michael.Ford comment, I managed to install the new HWE stack following his instructions. I needed a dist-upgrade to finish the installation process.


$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get dist-upgrade

$ sudo apt-get install linux-generic-lts-trusty linux-image-generic-lts-trusty

I was on 3.5.x kernel and now I’m on 3.13.x kernel, and I’m on 12.04.5 LTS release:


$ uname -a
Linux l3-ubuntu-12 3.13.0-33-generic #58~precise1-Ubuntu SMP Wed Jul 30 21:46:30 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"

And now the output of hwe-support-status is different:

$ hwe-support-status --verbose

Your current Hardware Enablement Stack (HWE) is no longer supported
since 2014-08-07. Security updates for critical parts (kernel
and graphics stack) of your system are no longer available.

For more information, please see:
http://wiki.ubuntu.com/1204_HWE_EOL

There is a graphics stack installed on this system. An upgrade to a 
supported (or longer supported) configuration will become available
on 2014-07-16 and can be invoked by running 'update-manager' in the
Dash.


Thanks again to @Michael.Ford. What’s your opinion about the HWE end of support on Ubuntu 12.04? Have you decided to update to 14.04 LTS? Feel free to comment below.

 

 

 

Categories: ubuntu Tags: , ,

How to install and configure Postfix on Ubuntu?

I’m trying to configure an incoming email service for receiving issues via email in a Redmine server for a company.

The company uses Lotus Notes and for security reasons, I cannot read email using POP3 or IMAP, only with notes client or notes iWeb. I need an account (redmine@foocompany.org) but the company does not generate generic accounts. I neither can use a Gmail account, because they use an authenticated proxy and it’s not possible to check the gmail account (neither I can check another user’s account in the same company). Crazy!

I don’t need to send mails from this account. At least I can use their SMTP server to send the redmine’s mails.

The solution is to create a local mail transfer agent (I’ll use Postfix) in the server where redmine is installed, create a local mail account (redmine@redmineserver.foocompany.org), and then redirect all the mail from the user account that administers the redmine to this local account. A bit convoluted, I know, but I have no other choice.

Hands on!

Postfix is a well known Mail Transfer Agent (MTA), and it’s an alternative to the also widely used Sendmail MTA. We’ll use also Courier IMAP and Courier POP3 to retrieve emails. If you want a more detailed explanation, have a look at this Ubuntu HowTo:

https://help.ubuntu.com/community/PostfixBasicSetupHowto

In this post I will focus only on the installation and configuration process. This is a schema of our final result (taken from the Ubuntu HowTo):

 

Postfix schema

Postfix schema

 

Install Postfix

The first step is to install postfix:

$ sudo apt-get install postfix

You’ll be prompted for your server type. Choose “Internet site”:

Postfix - Internet site

And then enter your domain name (example.org, or in my case l3-ubuntu-12.com):

Postfix - Domain name

Once installed, edit the /etc/postfix/main.cf file and add this lines at the end of the file:


inet_protocols = ipv4
home_mailbox = Maildir/

We are telling postfix to use IPv4 protocol, and that the folder where the mail will be saved (home/username/Maildir). Extract from the Ubuntu HowTo:

Maildir is a format for an e-mail spool that does not require file locking to maintain message integrity because the messages are kept in separate files with unique names. A Maildir is a directory (often named Maildir) with three subdirectories named tmp, new, and cur. The subdirectories should all reside on the same filesystem.

Another reason to use Maildir format is that Courier IMAP/POP3 servers only work with Maildir format of mailboxes.

Restart postfix to get the new configuration:

 $ sudo service postfix restart 
* Stopping Postfix Mail Transport Agent postfix [ OK ] 
* Starting Postfix Mail Transport Agent postfix [ OK ]

Install Courer POP3 and Courier IMAP

To retrieve the emails from our MailBox, we’ll to install Courier POP3 and Courier IMAP:


$ sudo apt-get install courier-pop

When prompted for creating web-based administration directories, answer No:

 

courier-pop administration directories

Then install Courier IMAP:

 
$ sudo apt-get install courier-imap 

Install bsd-mailx

To make some tests sending emails, we need a mail client. Bsd-mailx is a simple command-line mail client:

 
$ sudo apt-get install bsd-mailx 

Install Mozilla Thunderbird

Finally, to make the final tests, we’ll install Mozilla Thunderbird. If you haven’t already installed, just type:

 
$ sudo apt-get install thunderbird

Testing the installation

First of all, test your mail server:


$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 l3-ubuntu-12 ESMTP Postfix (Ubuntu)
quit
221 2.0.0 Bye
Connection closed by foreign host.

Lets create some users to test our mail server. Answer the questions to create the users:

 
$ sudo adduser user1
$ sudo adduser user2

Now change to user1 and send an email to user2:

  • To send a mail to user2, type mail user2
  • Write the subject of the email and press [Enter]
  • Write the body of the email and press [Enter]
  • To send the mail, write a dot (.) and press [Enter]
$ su user1
Password: 
user1@l3-ubuntu-12:/home/user1$ mail user2
Subject: test mail from user1
This is a test mail from user1
.
EOT

Now check if the email has arrived to user2. To avoid the “Cannot open display” message:

$ su user2
Contrasenya: 
user2@l3-ubuntu-12:/home/user2$ thunderbird 
No protocol specified
No protocol specified
No protocol specified
No protocol specified
Error: cannot open display: :0

switch to user2 with sux. Sux is a wrapper around su to transfer your X credentials, thus you can open Thunderbird with user2 (install with sudo apt-get install sux):

$ sux user2
Password: 
xauth: file /home/user2/.Xauthority does not exist
user2@l3-ubuntu-12:/home/user2$ thunderbird

Open Thunderbird and create a new account:

Press Skip this and use my existing email:

Thunderbird-New account

Enter the user2 account settings:

Thunderbird - user2 account settings

Press Continue. If you get this error:

Thunderbird failed to find the settings for your email account

Thunderbird - Error

 

Then restart postfix and try again:

$ sudo service postfix restart

Now the configuration must be retrieved. I choose the POP3 configuration for my email account:

Thunderbird - correct settings
And press Done. You get this warning screen because we are not using encryption (maybe in a later post, for the purpose of testing the email it’s enough with this). Check I understand the risks and press Done.

Thunderbird - warning screen

And now you can retrieve the email for user2.

Thunderbird - Inbox

If you try to send a message you’ll get this error:

 

Thunderbird - Error sending mail

 

You have to get the local certificate and confirm the security exception to send mails:

Thunderbird - Confirm ecurity exception

 

And now just pray for this to work in the foo company!

Do you liked this HowTo? PLease leave your comments below.

How to download all files from Ubuntu One?

As you may know, UbuntuOne file services will be shutting down as of 1st of June (http://blog.canonical.com/2014/04/02/shutting-down-ubuntu-one-file-services/).

You can download now all the files loggin in to your account. This welcome screen is displayed:

 

UbuntuOne - shutdown

 

And you can download all your stuff in. Just get the downloader for your OS, uncompress it and execute the u1_downloader. You’ll be prompted for your username/password and then the download begins:


$ ./u1_downloader 
U1 email: ubuntuoneusername
U1 password: ubuntuonepassword
Total: 2164761533 bytes
[...]

Hurry up, you only have until 31 July 2014.  After that date, all remaining content will be deleted!

Please, leave your comments below.