- /usr/exim – distribution installation directory
- /usr/exim/configure – main configuration file (same across all hubs)
- /usr/exim/configure.local – local server specific configuration
- /etc/exim – directory containing utility lists and databases
The master copy of the main configuration file /usr/exim/configure is held on mailhub mx1.qub.ac.uk. The file is rsync’d to the other three mailhubs every 5 minutes using the root cron job –
This means that you only have to make configuration changes to the file on mx1.qub.ac.uk but Exim needs to be restarted on each mailhub to effect any changes. Restart Exim using the command –
# systemctl restart exim
The file /usr/exim/configure.local is particular to each mailhub and changes must be made on each server. Again, Exim needs to be restarted if any changes are made.
Utility Lists and Databases:
The filenames in /etc/exim fall into two different categories: they are either flat text files or dbm database files. The flat text files all contain addresses, domains or IP addresses. The names should be self-explantory and they are used principally in the ACL section of the Exim configuration for blacklisting or whitelisting. These files are also rsync’d from mx1.qub.ac.uk to the other mailhubs as part of the script referred to above.
The database files are –
- exch_table – list of local Exchange aliases
- o365_table – list of Office 365 aliases
- mlist_table – list of aliases from the Sympa list server
- sm_table – list of St. Mary’s student aliases
- local_domains – list of local domains
These database files are principally used for routing mail. They are built separately on each mailhub from correspondingly named text files with the suffix .dat – e.g. exch_table is built from exch_table.dat.
The first 2 tables are generated on each mailhub by the script /root/scripts/hub_tables.sh that utilises perl subscripts to extract mail alias information from Active Directory using LDAP. The data for the first two files is initially saved as –
These files are first checked by the script to see if they are larger than the previous data files. If they are equal or smaller, the database files are not updated. This is a safety feature to avoid the possibility of missing data from the database files. You need to check these files, particularly when numbers of accounts are being removed. If you are sure that the smaller temporary file is valid then copy it to the main data file and build the database file from it e.g.
# cp exch_table_tmp.dat exch_table.dat
# exim_dbmbuild exch_table.dat exch_table
The mlist_table database file is built from the mlist_table.dat file that is pulled across from cmc-mlist.qub.ac.uk using scp.
The local_domains file is built from local_domains.dat and that file should be updated as required.
The sm_table file is built from sm_table.dat. The information for that file should come from St. Mary’s or QSIS and usually only requires attention annually.