Joyent

Installing basic mail

Managing a mail server is a significantly bigger undertaking than hosting a web site particularly when it comes to dealing with spam and the problems it causes. It is therefore not recommended that you run a mail server on your Accelerator. You are instead advised to use external services such as Joyent’s own Connector (see instructions for setting this up at http://forum.joyent.com/viewtopic.php?id=9) or Shared Hosting. If, however, you do decide to run your own mail server, read on for instructions on how to get started.

DNS

In order to direct mail sent to your e-mail addresses to your Accelerator, you will need to set up an MX record in your DNS zone file (see “Setting Up Your Domain Name” above if you don’t know what a DNS zone file is). You should add the following lines (where domain.name is your domain and 1.2.3.4 is your Accelerator’s public IP):

domain.name. 1200 IN MX 10 mail.domain.name.
mail.domain.name. 1200 IN A 1.2.3.4

the full-stop (or period) after the domain name. As MX records should not point directly at an IP address, we instead use a sub-domain which, in turn, points to your Accelerator’s public IP.

Once these changes to your DNS have propagated to servers, you should begin receiving mail on your Accelerator.

If you followed the instructions above for setting up a web site and Subversion then you will have already done most of the work necessary for setting up your e-mail accounts when creating your Virtual Server. To add accounts and aliases, simply use the Virtualmin interface to do so. The only extra bit of work you need to do is to enable Courier so that you can use your mail client of choice to connect to your Accelerator’s mail server.

Enabling POP3

If you want POP access, you will need to SSH into your machine and edit the /opt/csw/etc/courier-imap/pop3d file. You can do this with the following command:

sudo nano /opt/csw/etc/courier-imap/pop3d

Enter your admin password when you are prompted to do so. Then scroll down until you see the line near the bottom reading

POP3DSTART=NO

. Change this to read

POP3DSTART=YES

and save the file by pressing Ctrl+O and then Ctrl+X.

Enable IMAP

If you wish to enable IMAP support, SSH into your machine and edit the file /opt/csw/etc/courier-imap/imapd.

sudo nano /opt/csw/etc/courier-imap/imapd

You are looking for

IMAPDSTART=NO

and change to

IMAPDSTART=YES

Starting Courier

Once you have done that, you must bring the Courier services online with the following two commands (the order is important as the second depends on the first):

sudo svcadm enable svc:/application/cswcourier:authlib
sudo svcadm enable svc:/application/cswcourier:imap

You can then check to see that both of these are online by running svcs -a | grep -i courier to which you should get a response like the following:

online         21:22:58 svc:/application/cswcourier:authlib
online         21:35:49 svc:/application/cswcourier:imap

Proving that it works

You should now be able to connect to your mail server from your mail client of choice.

Original Author credits go to mudge for there fine “getting started with a Joyent Accelerator

 
accelerators/kb/courier.txt · Last modified: 2007/10/02 15:51 by lderezinski
 
Recent changes RSS feed Creative Commons License Driven by DokuWiki