Key points
- A relay receives mail over SMTP and hands it to the next server instead of storing it in a mailbox.
- Relays should only accept mail from authenticated users or from known IP addresses.
- An open relay accepts mail from anyone and is quickly abused to send spam.
- The reputation of the relay IP affects whether your messages reach the inbox.
How does an SMTP relay work?
When a user or an application sends a message, it connects to a relay on port 587 or port 25 and delivers the message with the usual SMTP commands. The relay looks up the MX record of the recipient domain and opens a new SMTP session with that server.
Along the way the relay can add a DKIM signature, apply sending limits, scan the content and queue the message if the destination is temporarily unavailable.
What is an open relay and why is it a problem?
An open relay forwards mail for any sender to any destination without asking who is connecting. Spammers scan the internet for these servers and use them to push large volumes of junk.
Within hours the IP address of an open relay can end up on blocklists, and then legitimate mail from the same server starts to bounce.
Who should use a relay?
Hosting providers, mail resellers and companies that send from many servers or applications benefit from a single controlled exit point. Centralizing outgoing mail makes it easier to watch volume, keep IP reputation clean and react fast when an account is compromised.
Relay accepting mail from an authenticated client
S: 220 relay.example.com ESMTP
C: EHLO app.example.com
S: 250-relay.example.com
S: 250 AUTH PLAIN LOGIN
C: AUTH PLAIN dXNlcgB1c2VyAHNlY3JldA==
S: 235 2.7.0 Authentication successful
C: MAIL FROM:<[email protected]>
S: 250 2.1.0 OkHow AHSU 360 handles this
AHSU 360 includes outbound filtering with per-account limits and DKIM signing, which works once the partner's mail server sends through the UNODATA relay.
