SMTP relay with mandatory TLS
Change the server, port, username and password in your application's settings and your email goes out through FrontEngine. No code has to change.
Connection settings
- Server
smtp-out.frontengine.net- STARTTLS port
- 587
- Implicit TLS port
- 465
- Encryption
- Required, TLS 1.2 or later. The server accepts authentication only after the connection is encrypted.
- Authentication
- AUTH PLAIN or AUTH LOGIN, with the username and password of your credential
- Maximum message size
- 50 MB, attachments included
- Recipients per message
- Up to 100
What happens after you send
When the server replies that it accepted the message, the message is already stored in the FrontEngine queue. From there:
- the message is signed with your domain's DKIM key and delivered straight to the recipient's server, over TLS whenever the destination offers it;
- temporary failures are retried at increasing intervals;
- permanent failures produce a delivery status notification (DSN) and a webhook event;
- the outcome is recorded per recipient: a message with several recipients can end differently for each of them.
The SMTP relay is a transactional email service. It does not accept marketing campaigns or newsletters.
Configuration example
Keep the username and password in environment variables or a secrets manager, never in code.
# /etc/postfix/main.cf
relayhost = [smtp-out.frontengine.net]:587
smtp_tls_security_level = encrypt
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
# /etc/postfix/sasl_passwd (chmod 600, then: postmap /etc/postfix/sasl_passwd)
[smtp-out.frontengine.net]:587 USERNAME:PASSWORD
import os
import smtplib
from email.message import EmailMessage
msg = EmailMessage()
msg["From"] = "[email protected]"
msg["To"] = "[email protected]"
msg["Subject"] = "Your order is confirmed"
msg.set_content("We received your order 1234.")
with smtplib.SMTP("smtp-out.frontengine.net", 587) as smtp:
smtp.starttls()
smtp.login(os.environ["SMTP_USER"], os.environ["SMTP_PASSWORD"])
smtp.send_message(msg)
swaks --server smtp-out.frontengine.net --port 587 --tls \
--auth LOGIN --auth-user "$SMTP_USER" --auth-password "$SMTP_PASSWORD" \
--from [email protected] --to [email protected] \
--header "Subject: Test message"
Smart host for Postfix and Exchange
If your company already runs a mail server, it can forward the messages generated by your systems to FrontEngine. The server keeps accepting mail from your internal applications and uses FrontEngine as its way out.
- Postfix: set
relayhostwith SASL authentication and mandatory TLS, as in the example above. - Exchange: create a send connector that routes through a smart host to
smtp-out.frontengine.neton port 587, with basic authentication over TLS.
Smart host use is available on every plan. Before you send, verify the sender domain and publish the SPF and DKIM records, or your messages go out without an aligned signature.
Frequently asked questions
Can I connect without encryption?
No. Authentication is accepted only on an encrypted connection, with TLS 1.2 or later. Use port 587 with STARTTLS or port 465 with implicit TLS.
Which authentication mechanisms are accepted?
AUTH PLAIN and AUTH LOGIN. CRAM-MD5 is not accepted.
What happens if I get the password wrong several times?
Repeated failed authentication attempts from the same IP address cause a temporary block of that address. See abuse prevention.
Can I send over SMTP and the API at the same time?
Yes. Both entry points feed the same delivery queue and produce the same webhook events. See the sending API.
Set up SMTP in a few minutes
Choose a plan, verify your domain and point your system at FrontEngine.