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
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.
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.
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
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
You should now be able to connect to your mail server from your mail client of choice.