Squeezebox Setup

Install Mail Part 1 – Dovecot

Dovecot is a pop3 / imap server. Normally do do a full mail setup you would install dovecot (or equiavelent) to serve mail as pop3 or imap, sendmail (or equivalent) to deliver mail, and fetchmail (or equivalent) to suck in mail from upstream. My install will differ in a couple of ways:

  1. No sendmail – you can use procmail to deliver mail and just hook that straight into fetchmail. Sendmail is a bit overkill for our needs, so this is what we will be doing
  2. No pop3. Eventually the server will be acting as a web mail client – if people download all the mail through pop3 that’s not much use. So not having pop3 solves that issue.
  3. You could setup an smtp service, but again to reduce complexity I am not. This means that clients (web mail or dekstop) will have the imap config pointing at this server, but the smtp config pointing at the ISP’s smtp server. In other words this box is only used for receiving, not sending email.

One other thing to note is that you can store your mail in a couple of formats – mbox and maildir. Mbox is one huge file for everything, Maildir is a file per email. This guide will use Maildir.

So the first step is to install dovecot.

[root@tranquilpc ~]# yum install dovecot
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.sov.uk.goscomb.net
* updates: mirror.sov.uk.goscomb.net
* addons: mirror.sov.uk.goscomb.net
* extras: mirror.sov.uk.goscomb.net
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package dovecot.i386 0:1.0.7-7.el5 set to be updated
--> Processing Dependency: libpq.so.4 for package: dovecot
--> Running transaction check
---> Package postgresql-libs.i386 0:8.1.11-1.el5_1.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size
dovecot i386 1.0.7-7.el5 base 1.6 M
Installing for dependencies:
postgresql-libs i386 8.1.11-1.el5_1.1 base 196 k

Transaction Summary
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.8 M
Is this ok [y/N]: y

Next we need to edit the /etc/dovecot.conf file to make 2 changes. Firstly we need to setup the service as imap, not pop3, secondly we need to configure the Maildir area for each user. To do this first find this line:

#protocols = imap imaps pop3 pop3s

and change it to:

protocols = imap imaps

Next find this line:

#mail_location =

and change it to:

mail_location = maildir:~/Maildir

Now we just need to set up a user to log in as – this creates a user called james with a home directory (which will be auto created) of /home/james:

[root@tranquilpc james]# useradd -c "FULL NAME" -d /home/james -m james

Next set a password for this user:

root@tranquilpc ~]# passwd james
Changing password for user james.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Finally enable and start dovecot:

[root@tranquilpc ~]# chkconfig dovecot on
[root@tranquilpc ~]# service dovecot start
Starting Dovecot Imap: [ OK ]


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: