Steve’s Ubuntu Weblog

Mainly (but not only) about Ubuntu

Working Mailserver. Postfix, Fetchmail, Procmail, Dovecot with Ubuntu 9.10

Today I set up the mail server on my new server running Ubuntu 9.10. The Original mail server was running on Ubuntu 7.04 for many years, the configuration blog is here

The first difference I noticed was that Ubuntu have been working on a mail server stack that should work out of the box. You can download this with the package dovecot-postfix. I am sure this is the best bet for anyone starting from scratch and I will try it out when I get time but for now I wanted to install the stack and configuration I knew worked for me.

So I downloaded Postfix, Fetchmail, Procmail, Dovecot.Postfix and copied my configuration files from the old server. The only differences were in the file /etc/dovecot/dovecot.conf and were:

mail_extra_groups has been deprecated and you should now use mail_access_groups or mail_privileged_group instead if you need this. As it happens I commented it out and haven’t had a problem. I think it is only relevant when you use mboxes and I don’t.

default_mail_env = maildir:/home/%u/Maildir/ has also been deprecated and you should use
mail-location = maildir:/home/%u/Maildir/ instead.

IMPORTANT the configuration file /etc/dovecot/dovecot-postfix.conf has precedence over /etc/dovecot/dovecot.conf so if you want to use /etc/dovecot/dovecot.conf you have to rename /etc/dovecot/dovecot-postfix.conf.

For problems after upgrading to 10.04 please look here

17 January, 2010 Posted by | Ubuntu | , , , , , , | 2 Comments

Remote Desktop Without A Monitor

After the initial installation of Ubuntu 9.1 I did not want to have a monitor connected to the server but wanted to be able to reach the servers X session remotely. This is easy to do with xvncviewer on my controlling PC and on the server I set System – Preferences – “Gnome Remote Desktop” to “Allow other users to control your desktop”

The first problem came after rebooting the server which refused to login because it hadn’t detected a monitor. I tried to use the trick I used with Ubuntu 7.04, see here but there is no /etx/X11/xorg.conf in Ubuntu 9.10. I created one anyway and lo and behold it works.

16 January, 2010 Posted by | Ubuntu | , , , , | Leave a comment

New Server

I have bought a really small (250mm x 170mm x 25mm) PC for use as a new server. It has an Intel Diamondville 1.6GHz CPU wit 2GB memory and a 250GB harddrive. I have installed Ubuntu Desktop 9.10 and will add comments here as I install the various servers that I have working on my old server running Ubuntu 7.04. Where there is a difference to how I set up the old server I will also add a comment to the old entry in this blog.

So here goes…………

16 January, 2010 Posted by | Ubuntu | Leave a comment

Ubuntu 8.04 Gnome logout hangs system

After the upgrade from 7.10 to 8.04 I have hit the first small bug. I couldn’t use the “System – Quit” or the Log Out Button in Gnome to logout as they caused the session to hang. Also “gnome-session-save –kill” in a terminal caused the same fault. The only way out was a Control-Alt-Backspace. The forum is down today so I have struggled to find a solution and I have succeeded. Here it is:

Go to “System – Preferences – Sessions” and either activate or add and activate “gnome-power-manager”. and restart Gnome. That’s it, the usual logout box now appears as soon as you click the Log Out Button.

21 September, 2008 Posted by | Ubuntu | 1 Comment

Ubuntu upgrade from 7.10 to 8.04.1

As you may have noticed I have been busy with javascript and Gmaps API topics recently and have delayed upgrading the Hardy Heron to avoid being distracted.

However yesterday I bit the bullet and upgraded via the update manager and everything seems to have worked well. One thing bugs me about the update manager is that it stops and asks if you want to keep your configuration files for certain applications such as Privoxy or replace them. Of course I want to keep them, why would I want to delete this information and then re-enter it, so really the question is stupid. But what bugs me is that the upgrade stops until these useless questions are answered and so you can’t start the update and then go out for a beer and expect the update to be finished when you get back.

I will keep you informed of issues as and when they occur.

21 September, 2008 Posted by | Ubuntu | Leave a comment

Gnome and Logitech iTouch Keyboard

Recently while messing about with xorg.conf I lost my key bindings. There is a simple way to bind the keys if you are using Gnome, simply run the following in a terminal:

gnome-keybinding-properties

A window with a list of actions and shortcuts opens. You can select the action you want and then press the key you want to associate with that action.

17 April, 2008 Posted by | Ubuntu | Leave a comment

Video webcam

I received a wireless webcam for my birthday and this is how I integrated the stream into my webpage. You can see the result here , it is the “Front door webcam”.

First you need a TV card with an RCA Video input, this is a yellow coaxial connector. Connect the yellow male RCA connector from your webcam to the video input of the TV card and then using a tv viewer such as tvtime or Xawtv change the input source to S-Video. You should now see a video stream from the camera. If you are using an nVidia card use the command xawtv -noxv to start Xawtv otherwise you will only see a blue screen.

Using synaptic (or whatever) install “Motion”, which is a pretty powerful motion detecting software which has lots of great features that you can experiment with. For this exercise I will only really be using the built in web-server. Here is a link to the Motion Wiki.

You will now need to place a motion.conf file in your home folder, below is a copy of my basic configuration file. Motion delivers a Motion jpeg or MJPEG which doesn’t work in Internet Explorer although it works fine in the Mozilla browsers. Andy Wilcock has written a nice Java applet called Cambozola that enables MJPEG streams to be viewed in IE. Here is a link to Cambozola.

# Minimal motion example config file for webserver provided by Steve Young
daemon off
quiet on
# You may very well need to change this (check with 'dmesg'
# after plugging in your webcam).
videodevice /dev/video0
# Image size in pixels (valid range is camera dependent).
width 640
height 480
framerate 2
quality 100
#auto_brightness off
# General threshold level and noise threshold
# level (for distinguishing between noise and motion).
#threshold 30000
#noise_level 64
# Initial brightness, contrast, hue (NTSC), and saturation.
# 0 = disabled (valid range 0-255).
brightness 180
contrast 150
saturation 100
hue 0
# Encode movies in real-time (install ffmpeg before enabling).
#ffmpeg_cap_new off
# Codec to be used by ffmpeg for the video compression.
# Supported formats: mpeg4, msmpeg4.
#ffmpeg_video_codec msmpeg4
# Target base directory for pictures and films (you may need
# to change this (or change its permissions) depending on
# which system user runs motion).
#target_dir /home/steve/webcamTest
# Define a port number (e.g. 8000) to enable the mini-http server.
# 0 = disabled.
webcam_port 8081
# Set to 'off' to allow anybody (not just localhost) to view the
# webcam via the mini-http server (http://hostname:port).
webcam_localhost off
webcam_quality 100
webcam_maxrate 1
#Steves Options
text_double on
minimum_gap 100
control_port 8082
snapshot_interval 20000
snapshot_filename snap
output_normal off
#jpeg_filename motionjpg
rotate 90
Text_left "My Street"

29 February, 2008 Posted by | Ubuntu | , , , | 5 Comments

Ubuntu. Adobe Flash Player not working in Firefox

I did an upgrade of the Adobe Flash Player via the update manager and Flash wouldn’t work in Firefox. I got the message that the plugin was missing but when I tried to download it the message was that the plugin was already installed. A quick google found these solutions. I used the second one which worked.

6 February, 2008 Posted by | Ubuntu | 6 Comments

tvtime no sound

I installed tvtime today but I couldn’t get the sound working. The I accidentally hit the right arrow key and the volume control opened up and guess what? The sound was set at zero! just press the right arrow key until you have a comfortable volume.

16 December, 2007 Posted by | Ubuntu | 12 Comments

How to find out your Ubuntu release

If you’ve forgotten what version you’re using 🙂 type the following in a terminal:

lsb_release -a

The following information will be revealed:

Distributor ID: Ubuntu
Description: Ubuntu 7.10
Release: 7.10
Codename: gutsy

22 November, 2007 Posted by | Ubuntu | 2 Comments