Server configuration

Creating email addresses and mailboxes

Addresses and mailboxes

You can configure email for your domain using the control panel for your hosting account.

Creating a mailbox

Before you can receive any email at all, you will need to create a mailbox where it will be stored. To do so, log into the control panel, and follow the link Manage email accounts / mailboxes. Under the heading New mailbox, you will need to enter the username of the mailbox you wish to create, and the password.

This will create the new mailbox, and it will also create an email address configured to deliver to that mailbox. For example, suppose your domain name is and you create a mailbox with the username alice. You now have two things:

  • a mailbox which you can configure your client to access via the name; and
  • the email address, which will deliver to the mailbox.

You might find it helpful to think of the mailbox as a pigeon hole—a place where messages can be delivered. The email address is the label on that pigeon hole.

Creating another email address

Suppose you also want to receive email to the address From the main menu on the control panel, follow the link Manage email addresses and aliases. At the bottom of the page, enter just alice.liddell in the box, and on the next page select Mailbox: Now people can send email to either address, or, and it will all be delivered to the same mailbox.

You still have a single pigeon hole, but it now has two labels on it.

Suppose Alice is the sales manager, you might want to create a third email address, that also delivers to her mailbox. Generally speaking, you will want one mailbox per person who is using email at your domain, and many email addresses per mailbox.

Multiple domains

You can have multiple email domains hosted on your account. If so, then it's up to you whether to treat them all individually, or to group some or all of them together. By default, all domains are in a single group (with no name). So suppose you added email hosting for to your account. Because there are no domain groups yet, all the email addresses you've created automatically exist on the new domain. So, for example, email to will be accepted and delivered to Alice's mailbox.

If you want the new domain to be treated separately, you will need to move it into a new domain group. From the main menu on the control panel, follow the link Manage email domains. Here you will see a list of all your domains. Click the newly added domain,, and on the next page enter something in the Domain group box. Since this will be a new domain group, it doesn't really matter what we call it: lglass will do.

Note that setting the domain group to a new value like this will remove all email addresses from that domain. You will need to go back to the Manage email addresses page to create new addresses. You will now find that you can choose which domain a new address will be for.

Suppose you now add email hosting for to your account. To add this into a domain group with, visit the Manage email domains and set the domain group to lglass. Because this is an existing group, any addresses you already defined for will also work at immediately.

Advanced usage

The web interface described above manipulates standard Exim .forward files in your home directory. You can of course create and edit these files directly, if you prefer. (You might find it simplest to use the web interface to create an initial file in the right format, then edit it from there.)

Each email address is controlled by the file named .forward-domaingroup-localpart, for example .forward-lglass-alice. (If you've used the default null domaingroup, then it's just .forward-localpart.)

At the simplest level you can configure all your email to be forwarded to a single email address by creating a .forward-default file in your home directory containing the address you want your email forwarded to. (Note that your .forward files need to be world readable so that Exim can verify valid email addresses before accepting mail.) Note that creating a default .forward file is not recommended as spammers often make up random local-parts to send mail to such as common first names

For example, if your domain is, username foobar and you create a ".forward-default" file containing "" then all mail to will be forwarded to

If instead you'd prefer to forward email to different places depending on whom it's addressed to then you can create a .forward-<local-part> file containing the email address to forward to.

Taking the above example, if we added a ".forward-sales" file containing "" then any email to would be forwarded to, while all other email to would go to

By removing the .forward-default file you can make us only accept mail for addresses at your domain you have specified with .forward-<user> files.

So, again taking our above example, if we delete the .forward-default file mail to will be forwarded to while all other mail to will be bounced with a message saying that the email address doesn't exist. This means that if you have no .forward-<local-part> files and no .forward-default file then no email address at your domain will work.

If you wish to have mail end up in your POP3/IMAP mailbox then instead of putting an email address in the .forward files above you simply create a file containing /home/<username>/Maildir/. You can create more POP/IMAP mailboxes through the web interface mentioned above. If you have configured additional POP3/IMAP mailboxes then you can specify these by putting /home/<username>/popboxes/<popusername>/Maildir/ into the .forward file, with popusername being the username that you use to access the mailbox you wish the mail to go into but with the @ in the username replaced by a %.

Thus, with the above example in mind, if we recreate the .forward-default file but put /home/<username>/Maildir/ in it mail to will be forwarded to while all other mail to will end up in foobar's POP3/IMAP mailbox.

Or for Alice's mail if you create a new mailbox with the popusername then to forward mail to this box you would place /home/<username>/popboxes/ in the appropriate .forward file.

If you want to have all email for <local-part>-anything treated in a particular way you can create a .forward-<local-part>-default which will forward <local-part>-anything in that particular way.

All messages in your POP3/IMAP mailbox (and indeed even those forwarded through Black Cat) contain an "X-BlackCat-To:" header allowing you to tell who the message was actually to at your domain. This is useful if you're using something like fetchmail to pick up mail from your POP3/IMAP mailbox or are forwarding all your email to one address.

The format of the "X-BlackCat-To:" header is <username>-<local-part>@<domain>. For example, an email to would be forwarded to including a header "X-BlackCat-To:".

Multiple domains

If you have multiple domains, the way they are handled depends on whether the domain has a subuser associated with it, and if so, what it is. All domains with the same subuser have the same alias files applied to it.

If the subuser is blank (the default) then the domain's alias configuration will be handled as above. Otherwise, you will need to add the subuser into the filenames. Example: .forward-mysubuser-myalias or .forward-mysubuser-default.

The subuser will initially be set when ordering a domain pointing. You can change it later - see "Manage mail domain subusers" in the control panel described above

Exim filters

We also allow exim filter files to be uploaded as any of your .forward-blah files. Please create a normal Exim filter and then upload it in place of the relevant alias you wish to filter.

The pipe command is restricted and we would urge people not to use it but rather use alternatives in the filter language itself. We do allow fail and defer in user filters.

The filter files should follow the Exim 4 filter specification

As you cannot run exim -bf to test your filter files on yali you have to use the filter file test script from Yali's control panel.

If you can't find what you're looking for feel free to contact us