Johannesburg
I’ve been very busy at work lately. On Tuesday 23rd January I flew to Joburg, prepared a presentation for a maor GSM network there. On Friday I made the presentation and flew back on Saturday. The venue for the presentation was unusual, it consisted of several typical African thatched huts arrange around an outdoor reception area. We made our presentations in the main hut, which I guess could hold about 100-150 people. Here is a picture of the venue taken with my mobile phone and also one of the “guard-dogs” which are ostriches in a run surrounding the huts.


Working Mailserver. Postfix, Fetchmail, Procmail, Dovecot
To clarify the aim of this project, I was trying to set up a mailserver which will retrieve my emails from the ISP and then distribute them locally according to the name in the To: header. My ISP allows me to use several “aliases” therefore mail for me has stephen.young@ISP.com and mail for my wife has barbara.young@ISP.com in the To: header even though my account is fred.young@ISP.com. This little project turned out to be very difficult because the configuration information for the various components was scattered about and there is also a lot of wrong configuration info out there. After a few days googling I managed to get the server to filter Barbara’s emails and put them in a directory that was reachable by her Outlook client.
I used Postfix, Fetchmail, Procmail and Dovecot to make this work.
Postfix: This was the easiest part, I installed Postfix, added the line home_mailbox = Maildir/ in /etc/postfix/main.cf to make postfix use Maildir as opposed to Mbox and added the LAN address to “mydestination” and it just worked. Here is my Postfix config file.
# appending .domain is the MUA's job.
append_dot_mydomain = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost.localdomain, localhost
relayhost = smtp.isp.com
mynetworks = 127.0.0.0/8, 192.168.0.0/24
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir/
inet_protocols = all
Fetchmail: I added lines to .fetchmailrc make fetchmail send its output to Procmail. The .fetchmailrc resides in my $HOME directory, here is a copy.
server pop.isp.com
proto pop3
user fred.smith
password nottelling
mda 'procmail -f-'
mda "/usr/bin/procmail -d %s" # tell fetchmail which MDA to use
Procmail: The .procmailrc file also lives in my $HOME directory. There are two important points here:
1) don’t forget the trailing “/” in the directory names as it informs Procmail to use Maildir format.
2) The UMASK=007 is essential in order to make the moved mails readable by the group. Procmail automatically makes the owner the user using Procmail and sets the permission to owner only! The .procmailrc is here.
UMASK=007
PATH=/usr/bin:/usr/local/bin
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/steve/
LOGFILE=$HOME/procmail.log
SHELL=/bin/sh
# Put mail for barbara into mailbox barbara
:0:
* ^To:.*barbara.young
/home/barbara/Maildir/barbara/
Dovecot: There is some good information at the Dovecot WiKi http://wiki.dovecot.org/ but unfortunately it is hard to find as the site seems more interested in showing you how to use a Wiki than making it easy to navigate through the Dovecot information. In the Dovecot configuration file /etc/dovecot/dovecot.conf make sure that:
1) listen = * or the IP address of your LAN, ie “listen = 192.168.0.0/24, localhost”.
2) ssl_disable = yes at least for the setup phase. I intend to set up ssl etc now that I have everything working but getting it working was my first priority. Here is the confiuration file
protocols = pop3 pop3s
listen = *
ssl_disable = yes
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_extra_groups = steve
default_mail_env = maildir:/home/%u/Maildir/%u
protocol pop3 {
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
pop3_enable_last = no
pop3_uidl_format = %08Xu%08Xv
}
auth default {
mechanisms = plain
passdb pam {
}
userdb passwd {
}
user = root
}
plugin {
}
Now it’s working but I will have to study the SSL features to make it really safe.
Mail Server / Postfix, Fetchmail, Dovecot
I’m busy at the moment trying to build a small mailserver so that I can seperate Barbaras emails from my own and make hers available to Outlook on her M$ Laptop. I will report how I got it working when I get it working.
Jumbled up letters
Bivelee it or not, rcesrhaeers at Cmabrigde hvae dirvoseced taht the oredr of ltteers in a wrod deson’t rlaley matter. The olny iprmoetnt tihng is taht the frist and lsat ltteer are in the rghit pclae. Eevn if the rset are tolatly julebmd up you can sitll raed it. Tihs is bcuseae the huamn barin deos not raed ecah lteter invuddilialy, but inesatd renisgoecs the wrod as a wlohe.
Cobblers
What make people who repair shoes so good at cutting keys?
Around the world
Our daughter and son-in-law are at present making a round the world trip. You can read all about and see their pictures at www.kresi.de
They are presently in Australia after spending time in China and Tibet. Next up is New Zealand.
Setting up WordPress on a Ubuntu server
This is meant to give an easy to understand description of how I got WordPress working under Ubuntu Dapper Drake. It is not meant to be an in-depth explanation of how to set up WordPress, it is just how I got things running and I hope it will help others who have the same problems that I had.
First check that Apache and PHP5 are working by typing the following in a terminal
sudo sh -c "echo '<?php phpinfo(); ?>' > /var/www/info.php"
and then pointing your browser at http://localhost/info.php to see a page showing your installed PHP version.
If PHP is working then install WordPress with Synaptic, if it isn’t you need to set up your server correctly.
After installing WordPress make a backup of your Apache configuration file with
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak
Now you need to edit your Apache configuration file with
gksudo gedit /etc/apache2/apache2.conf
and paste the following block of code directly after where Alias/icons is defined.
Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
</Directory>
Restart Apache with -
sudo /etc/init.d/apache2 restart
Now you are ready to run the configuration script to make a database and set up connection with -
sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost
Where wordpress is the name of the user and the database. If your server has a virtual host name you should use that instead of localhost. In either case there will be an error message saying that a symbolic link could not be made because no such file or direcrory exists but this message can be ignored.
Now point your browser at http://localhost/blog and WordPress will walk you throgh the rest of the setup.
Hello world!
I am an Englishman who has spent most of his adult life working in other countries. I have been living in Vienna, Austria since 1998 but that is all another story. This blog is (mainly) about Ubuntu, so here I will simply explain how I came to be an Ubuntu enthusiast.
When I first moved to Vienna I happened to buy a book called “Linux for Dummies” which contained an installation CD for SuSE Linux 5.3. This was my first introduction to Linux and I have never looked back.
I faithfully remained a SuSE aficionado until SuSE -10 when Novell took over and totally wrecked the backup system I had been using for years (I was using Mondo by Hugo Rabson). Dispite several emails to Novell they never had the courtesy to reply, so in 2005 I moved to Fedora Core 4. Fedora Core is an excellent distibution and I found many things to be much easier than with SuSE. It was only after reading an article in Linux Magazine about Ubuntu that I decided to install Ubuntu on a second partition and try it out. I was absolutely smitten! Every thing just works and the few problems I have had have been quickly resolved by searching the Ubuntu Forums
All I want to do on this blog is to offer links to some of the Ubuntu resources that I find useful, some tips, tricks and tweaks I have found out about and to blog any “problems ” I have encountered while playing around with Ubuntu, together with the solutions I used to solve the problems.
I just hope that the blog will be useful to someone
