Mail Configuration Reference

From Sympl Wiki
Revision as of 11:44, 15 July 2019 by Kelduum (talk | contribs)
Jump to navigation Jump to search

This page has a breakdown of the configuration options and files used when handling email for a domain.

Accepting Email

To accept email for a domain, a user in the /srv/example.com/mailboxes/ directory, /srv/example.com/config/default_forward or /srv/example.com/config/aliases must be present. Any email sent to an address not covered by one of these will be rejected.

Individual Mailboxes

The /srv/example.com/mailboxes/ directory contains the user mailboxes, so the existence of the directory /srv/example.com/mailboxes/alice would accept mail for the email address alice@example.com, /srv/example.com/mailboxes/bob would accept mail for bob@example.com and so on. Once these directories have been created, the mailbox can be accessed via IMAP, POP3 or Webmail.

Mailbox Aliases

In some cases you may want to have multiple email addresses attached to the same mailbox. This is done using /srv/example.com/config/aliases, which is a file containing the local part (the part of the email before the '@') followed by a comma separated list of email addresses. For example:

webmaster         charlie@example.com
info              bob@example.com, alice@example.com
alice.smith       alice@example.dom
bob.jones         bob@example.com
charlie.williams  charlie@example.com
staff             alice@example.com, bob@example.com, charlie@example.com
dave              dave@some-other-email.net

Accepting All Mail

The /srv/example.com/config/default_forward file acts as a fallback for any mail not covered by an existing mailbox or alias, and should contain a comma separated list of email addresses. This will then accept all mail, regardless of addressing.

Port Configuration

Mail is configured to use the default ports, with STARTTLS enabled on legacy ports.

Service Port Encryption TLS Enabled by
SMTP 25, 587 TLS Using STARTTLS
SMTP 465 TLS On connection
POP3 110 TLS Using STARTTLS
POP3 995 TLS On connection
IMAP 143 TLS Using STARTTLS
IMAP 993 TLS On connection
Sieve 4190 TLS On connection


Configuration Reference

File or Directory Used For
.../config/ip Contains a list of IP addresses which mail will be sent from for the domain. Defaults to the primary IPs (IPv4 and IPv6) of your server.
.../config/spf Existence of this file will add SPF Records to the automatically generated DNS files. Any content will be used as the SPF record.
.../config/dkim Enables DKIM record generation and along with dkim.key, will enable signing of outgoing mails. The DKIM 'selector' defaults to the short hostname of your server, otherwise any content in this file will be used as the selector in outgoing mails and automatically generated DNS.
.../config/dkim.key This key is used to sign outgoing DKIM mails. Required to be able to sign mails, along with the dkim file.
.../config/dmarc This file will create a DMARC record in generated DNS files. If the file is not empty, the content will be used as the new DMARC record.

See also Configuration Reference for other configuration files.