If you are setting up a new service, system or piece of equipment, you may need to set an outgoing mail (SMTP) server to send automated emails. Examples include:
- Cloud hosted services, eg MailChimp;
- Equipment monitoring software, eg freezer alarms;
- Hosted servers.
We provide three options, depending on your requirements. An explanation of the differences is provided below but please contact the ICT Service Desk if you are unsure which one to use.
Sending mail internally
Use automail.cc.ic.ac.uk to send automated email within the College network, unless you are configuring a Linux mail service, then use smarthost.cc.ic.ac.uk.
automail.cc.ic.ac.uk
- For internal use only. Not suitable for machines used off-site (eg laptops).
- Available only on port 25. Authentication and TLS are not required.
- Errors are not generated at SMTP time.
- Bounces are directed to the owner of the machine.
smarthost.cc.ic.ac.uk
- For use by Linux mail services (eg Exim, Sendmail, etc.) to send machine mail (eg from root, cron, etc).
- For internal use only. Not suitable for machines used off-site (eg laptops).
- Available only on port 25. Authentication and TLS are not required.
- Please be sure to configure aliases appropriately (ie redirect all required aliases to root and then redirect root email to your full College email address).
- Instructions are available for various common message transfer agents in the tabs below
Message transfer agents
- Open exim.conf and locate the TRANSPORTS section. You should find a default SMTP transport that looks like: <name>: driver = smtp
- Edit this section to read: <name> driver = smtp hosts = smarthost.cc.ic.ac.uk hosts_override = true
- Save the config file and restart Exim.
- Check that the machine can resolve smarthost.cc.ic.ac.uk. If it cannot, please check your DNS settings. Then edit the email aliases file (often /etc/aliases) and check that all system aliases redirect to root: postmaster: root mail: root daemon: root ...
- Redirect root email to your full College email address: root: [email protected]
- Add the following line to sendmail.mc: define(`SMART_HOST', `smarthost.cc.ic.ac.uk')
- Compile the Sendmail macro file using either: make -C /etc/mail or m4 sendmail.mc > /etc/mail/sendmail.cf The exact command varies depending on your distribution.
- Restart Sendmail once you have modified the sendmail.cf file.
- Check that the machine can resolve smarthost.cc.ic.ac.uk. If it can't, check your DNS settings.
The send-only version of Sendmail, sSMTP, is sometimes used for automatic mailing, such as Cron job reports. In this case the /etc/ssmtp.conf file should read as follows, where HOSTNAME is your machine's hostname:
[email protected] mailhub=smarthost.cc.ic.ac.uk rewriteDomain=imperial.ac.uk hostname=HOSTNAME FromLineOverride= YES
- Ensure that /etc/postfix/transport is empty.
- Make sure /etc/postfix/main.cf contains relayhost = smarthost.cc.ic.ac.uk
- Restart PostFix.
The majority of IIS installations do not require SMTP service to be installed, but specific web applications may require it. If this is the case, you should set the Smart Host to be smarthost.cc.ic.ac.uk.
1. Open the Internet Information Services Management Console.
2. Right click on the SMTP Service.
3. Click Properties.
4. Select the Delivery tab and click on the Advanced button.
5. Enter smarthost.cc.ic.ac.uk into the Smart Host section.
Sending mail externally
Use smtp.cc.ic.ac.uk if you need to send email outside College and are able to authenticate to do so.
smtp.cc.ic.ac.uk
- Requires authentication with a valid College account. A role account is required for use by externally hosted systems.
- Clients should be configured to use TLS and authentication.
- Available on submission port (587) as well as the standard SMTP port (25).
- Also available on port 465 (TLS-on-connect) for clients which don't support STARTTLS.
- May be accessed externally without need for VPN connection.