What Is an SMTP Relay?
What an SMTP relay does
An SMTP relay is a mail server that accepts outgoing messages from another server or application and forwards them toward their final destination. Instead of delivering each message directly, the sender hands it to the relay, which takes responsibility for getting it to the recipient.
The term is used in two closely related ways. In general, any server that passes mail onward acts as a relay. In everyday use, the word usually means a smarthost: a server that a mail system is set up to send all its outgoing mail through, rather than contacting recipients' servers directly. For background on the protocol, see what SMTP is.
Why hosts and businesses use relays
- Reputation. A relay run by a larger provider may have a stronger sending reputation than a small server's own address. Mailbox providers judge mail partly by the reputation of the sending infrastructure, so a well-managed relay can help delivery.
- Blocked ports. Networks that block outgoing port 25 stop a server from reaching remote mail servers directly. Sending through a relay on an allowed port solves this.
- Queues and retries. Relays are built to hold messages, retry failed deliveries and report bounces. A busy application server may not handle these well on its own.
- Central control. Routing all outgoing mail through one point makes logging, filtering and changing providers easier.
Open relays and the role of authentication
A relay that accepts mail from anyone and forwards it to anywhere is called an open relay. Spammers have used open relays to hide where their messages came from, so they are a serious problem. Modern mail servers are configured not to act as open relays. A relay accepts mail for forwarding only from authenticated users or from trusted networks.
When you use a third-party sending service, you usually connect with credentials issued by that service, and it delivers messages for you. Mail sent this way still needs authentication records for your own domain, so recipients can confirm it is genuine. Sending volume and limits are covered in the article on email sending limits.
Frequently asked questions
Do I need an SMTP relay for my website?
Not always. A small site that sends only a few messages may work with its host's own outgoing server. If messages are often filtered as spam, or the host blocks port 25, a relay through a dedicated sending service is a common fix. Automated messages have their own considerations, covered in transactional email.
Is an open relay dangerous?
Yes. An open relay lets anyone send mail through your server, and spammers exploit that. The server quickly ends up on blocklists, and legitimate mail from your domain is then rejected or filtered. Relays should always require authentication.