unix miscellanea

Exim organisation and configuration plan

The Exim configuration follows this outline:

We accept mail for two classes of local domains. The ilrt is one; we accept email addressed to *@mail.ilrt.bris.ac.uk or *@ilrt.bris.ac.uk from the mailhubs at Bristol.

The other domains are those we host an MX for; we accept email addressed to recipients in those domains from anywhere.

In this latter case, we use per-domain alias files (with defaults) to direct email to local users.

Outgoing email is accepted only from local hosts (those on appropriate subnets) - although I might look at SMTP-AUTH or an IMAP-during-SMTP hack that's tied into the cyrus config at a later date.

For that outgoing email, if any of the envelope sender, From:, or Sender: are *@mail.ilrt.bris.ac.uk or *@ilrt.bris.ac.uk, we do a smarthost-style forward to the central Bristol mailhubs for address rewriting.

Otherwise, we handle the outgoing email delivery directly.

In summary:

	DIRECT_LOCAL = ilrt.bris.ac.uk, mail.ilrt.bristol.ac.uk and the ilk;
	OTHER_LOCAL = sosig.ac.uk, etc. (from /usr/local/exim/etc/other-local)
	RELAY_VIA_SMARTHOST = bris.ac.uk, bristol.ac.uk

	INCOMING_HUB = bristol hub(s)
	OUTGOING_SMARTHOST = Bristol hub(s)

	RELAYABLE_HOSTS = 34 subnet, localhost, etc.

	On mail arrival:

	if for DIRECT_LOCAL (and from INCOMING_HUB or RELAYABLE_HOSTS)
		deliver locally (generally via cyrus)
		- alias file is /usr/local/exim/etc/aliases
		(with optional forwardfile)
	if for DIRECT_LOCAL
		reject.	# We only accept mail to this if it's been cleaned
	if for OTHER_LOCAL use otherdomain alias file /usr/local/exim/etc/aliases.domain
		(with *@domain default),
		then continue as per normal for local delivery
	otherwise, if not from RELAYABLE_HOSTS, reject.

	# Mail from RELAYABLE_HOSTS going outwards:

	If any of: Envelope sender, From:, Sender: are in
		DIRECT_LOCAL or RELAY_VIA_SMARTHOST then relay through OUTGOING_SMARTHOST
		# We check all mail with bristol addresses for validity via the central hubs
	Otherwise, send directly.