Exim on RedBrick

All RedBrick machines run exim for mail sending. With the exception of the mail servers, all the machines should just forward all their mail to Redbrick's MX records.

The mail servers do the actual delivery to user home directories, receive mail from the internet etc.

Mail Setup

Please document this properly.

Mail Aliases

Aliases need to be set on the primary mailhost.

The aliases are stored in /etc/mail.

  • aliases - system aliases, stuff like admins, committee
  • personal_aliases - aliases for user accounts
  • user_disusered_aliases
  • user_rename_aliases - put aliases in here when you rename users.
  • lists_aliases - aliases that forward mail from mailing lists to the boards. Depends on mail2nntp
  • virtuals

All these files are under git. Be sure to check them in and out when editing. After making changes just make exim_aliases to rebuild the aliases. This doesn't require a restart of exim to take affect.

The exim_aliases.txt file is generated by the makefile. It should always reflect the aliases currently live. You should not edit this file by hand, it won't do anything anyway.

Other machines

Basic exim setup to just forward all mail...

I have debian/ubuntu \o/

Lucky you. Despite debian's best efforts to make configuring exim a massive pain your job is fairly easy. Just dkpg-reconfigure exim-config and tell it that you have a smarthost which is mailhost.redbrick.dcu.ie

In its infinite wisdom, debian get's the bit of the email address after the @ by reading /etc/mailname, and chopping off everything before the first dot. So you should have the server's FQDN in here not redbrick.dcu.ie, since that'll make everyone send mail as dcu.ie.

I don't have debian :(

  • Install Exim from somewhere.
  • Go through the config file and fill out primary_hostname & qualify_domain (should be redbrick.dcu.ie) along with whatever else takes your fancy.
  • Unless you know what you're doing don't touch the acl section.
  • Delete the Routers & Transports section
  • Put this in it's place:
######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################

begin routers

send_to_gateway:
  driver = manualroute
  domains = !+local_domains
  transport = remote_smtp
  route_list = "* mailhost.ipv4.redbrick.dcu.ie "
  fallback_hosts =  mailhost2.ipv4.redbrick.dcu.ie : mailhost.ipv6.redbrick.dcu.ie : mailhost2.ipv6.redbrick.dcu.ie

#
# Just send all mail to a proper mailhost. Don't do any local delivery shite.
#
######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################
# A transport is used only when referenced from a router that successfully
# handles an address.
begin transports
# This transport is used for delivering messages over SMTP connections.
remote_smtp:
  driver = smtp
  • Don't touch anything else, unless you want to ;)
  • If you're scripting this to run as a service the options you probably want are: /path/to/exim -bd -q10m