Luon's Mail Setup

Our mail setup (also for virtual hosting) is based on Exim and Dovecot. This is supplemented by Rspamd for server-side spam filtering.

For accessing mail via IMAP, webmail, or for changing the server-side filters, you will need to use the same login credentials, namely your (UNIX) account user and password.

We also support virtual mail accounts/boxes. In this case the user name used for access is youruser@yourdomain.tld. If you would like to have (more) virtual mail boxes/addresses, just let our postmaster know!

Accessing mail

Retrieving mail

If you have not specified a forwarding e-mail address in ~/.forward, mail is stored in ~/Mail of your (UNIX) account. Under this directory there is a nested tree of directories where cur, new and tmp are special Maildir format specific directories.

The preferred way to access the email, even on the host itself, is via IMAP. You can use the following settings.

  • server: imap.luon.net
  • port: 143 (imap2)
  • security: (START)TLS

Optionally, IMAP-SSL (using port 993) is also supported but not preferred.

Sending email

Email can be sent using our mail server wherever your are (especially useful for mobile devices). Use the following settings:

  • server: smtp.luon.net
  • port: 587 (submission) or 25 (smtp)
  • security: (START)TLS

The Submission port (587) is preferred as it is usually not blocked by a firewall, while the SMTP port (25) often is.

The same remarks concerning the guest system and virtual email accounts hold as written above.

Webmail

The Luon webmail service is available at: https://webmail.luon.net/. For the login details, see above.

Spam-filtering

We support server-side spam filtering by default; this is done using Rspamd. Note that it requires some initial training before it starts working properly. Incoming mail is stored in the Inbox (i.e. ~/Mail) unless Rspamd thinks it is spam (or: junk) based on a score. Either, this score is very high (≥ 15) and the mail is plainly rejected, or the score is just high (≥ 6 and 15) and it will be stored in ~/Mail/Junk, corresponding to the Junk mail folder when accessed via IMAP.

Spam training is done by moving spam to the Junk mail folder (which must be called this for it to work) and moving ham from the Junk mail folder to another folder. For the training to have effect, this has to be done via IMAP. Our IMAP server tracks the moves and trains accordingly. Moving them from maildir to maildir on the system will have no effect.

Server-side mail filtering

Server-side filtering is done using Sieve. Some email clients support configuring the sieve. The Luon Webmail is such a client, but there is also an add-on for Thunderbird. Evolution unfortunately has no support at all.

Configuring sieve can be done using our Webmail or via the manage-sieve protocol.

... via webmail

Login on the Luon Webmail, go to "Personal Settings" and then select the tab "Filters". On the left side you can add, remove and reorder rules, on the right side you can edit or temporarily disable the rules. By default there should already be a "Spam Filter" rule, ensure that you keep it and keep it at the top.

... via a manage-sieve client

Use the following settings for a manage-sieve client:

  • server: imap.luon.net
  • port: 4190 (N.B. This used to be 2000 before!)
  • security: (START)TLS
  • login: email account user/password

The filters are stored in ~/.sieves and the active filter is linked from ~/.dovecot.sieve. So, it is also possible to edit the filters via shell and an editor. However, be sure to make no syntax errors ;)

Warning! When manually editing filters, the default system filter will be overridden, thus losing spam filter support. There are two solutions:

  1. Add the following to your sieve:

    require ["include"];
    
    include :global "spam_filter";
    
  2. Copy the contents of /etc/dovecot/sieve.default, as not all clients support the "include" module yet.

If you prefer procmail, exim filter, or to forward your email, you can always create a ~/.procmailrc or ~/.forward, thus overriding the system filtering, including sieve.

Virtual domains

Besides the luon.net mail domain, we also host other virtual domains and virtual mail accounts. Setting up or tearing down virtual domains or accounts has to be done by the postmaster.

Managing virtual domains

Once a virtual domain is created, you can manage it by editing the aliases file /srv/mail/aliases/mydomain.tld. An example aliases file:

# Aliases for mydomain.tld
abuse: hostmaster
hostmaster: hostmaster@localhost
info: virtualuser
mailer-daemon: postmaster
postmaster: postmaster@localhost
webmaster: virtualuser

someuser: someuser@localhost

In the above virtual mail domain, mail to abuse@mydomain.tld and hostmaster@mydomain.tld is redirected to the hostmaster listed by the system aliases (in /etc/aliases). Mail to info@mymaildomain.tld and webmaster@mydomain.tld is redirected to the virtual mail account virtualuser@mydomain.tld (if it exists).
Finally, mail to someuser@mydomain.tld is redirected to the (UNIX) account someuser if it exists and is not an alias in the system aliases.

Note that adding @localhost is required to redirect mail to UNIX accounts, possibly via system aliases. Leaving the domain suffix out signifies that the mail needs to go to a virtual mail account, if not aliased first.