Send mail from Postfix on a BT Home broadband connection
How to send mail from Postfix on a BT Home broadband connection via their smarthost
In order to send email out from a BT Home Broadband connection, you must use the smarthost that BT provide. Failure to use this usually means that mail is rejected on the receiving mail server(s) as BT’s dynamic IP address ranges are blacklisted.
Postfix is my MTA of choice and I recently needed to setup a new box to send email out from my broadband connection. Unfortunately, it took longer than necessary to piece together all the bits of info I needed to successfully send email out, so I thought I would document it here.
First, you need to ensure that you have setup a BT Email account. Click here and create yourself an email address, if you’ve not already got one in your BT account. You need to make sure that you record a copy of the email and password that you create as this will be used by Postfix to authenticate with the BT smarthost.
The following steps have been tested on CentOS 7 and Ubuntu 14.04 LTS so they should be pretty portable. I will assume that you have Postfix installed on your system. If you need to install Postfix, Google it
NOTE: Run all of the following commands as root
(sudo -i
)
- Let’s export some variables that will be used in the config. Replace the values below with the email address and password you just created above:
- Next we configure Postfix to use the BT smarthost and how it should authenticate with it:
- Next up, we create or append to a password file which we will contain the credentials needed to authenticate with the smart host:
- Optional: Running CentOS? You will need to install an additional package:
- Apply the changes to Postfix:
- Test! (Replace with your email at the end)
If you don’t receive the test email, check mailq
and the mail log file: