Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk10 min

How to Send Email From a VPS When Port 25 Is Blocked

A blocked SMTP port 25 does not prevent VPS email. Configure an authenticated relay on port 587 with STARTTLS, use 2525 or 465 when supported, and test DNS, TCP, TLS and sender verification from the VPS.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If outbound SMTP port 25 is blocked on your VPS, send mail through an authenticated relay or email API instead of connecting directly to recipient mail servers. Configure authenticated submission on port 587 with STARTTLS first; use port 2525 when 587 is unreachable, or port 465 with implicit TLS when the provider supports it. Direct delivery requires port 25, while authenticated relay submission does not.

Why VPS providers block port 25

Port 25 is the traditional server-to-server SMTP channel. A self-hosted mail server uses it to connect to the recipient domain’s MX server and deliver messages directly. Because compromised servers can use the same channel for spam, many VPS companies restrict outbound connections on that port.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DigitalOcean’s current Droplet policy says: “SMTP ports 25, 465, and 587 are blocked on Droplets to prevent spam and other abuses on our platform.” AWS also blocks outbound port 25 by default on Lightsail and EC2. The exact restriction depends on the provider, product, account, region and date, so test from the actual instance rather than assuming that a standard SMTP port is available.

A port block is a network-policy problem, not an error in your mail library. Changing the recipient address, adding a password, or retrying indefinitely will not make a direct connection succeed. You must either submit through a reachable relay or obtain an approved exception from the VPS provider.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Relay submission versus direct delivery

Direct delivery

With direct delivery, your application or mail transfer agent opens an SMTP connection to each recipient domain’s MX server. The connection normally uses port 25. You are responsible for queueing, retries, reverse DNS, IP reputation, authentication policy, bounce processing, blocklists and domain authentication. If the VPS filters outbound port 25, this architecture cannot work until the provider removes the restriction.

Authenticated relay submission

A relay accepts a message from your VPS after authenticating your account, then delivers it to the recipient network. Your VPS connects to the relay’s submission port, normally 587 with STARTTLS. The relay handles the server-to-server part of delivery. This avoids a port-25 dependency and usually provides delivery logs, bounce events and suppression handling that would otherwise have to be built and operated yourself.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Email API

An email API is another alternative when a provider offers one. Your application sends a request through the provider’s documented API endpoint, while the provider performs SMTP delivery. Use the API credentials, sender verification process and request format specified by that provider; do not try to use SMTP credentials as API credentials unless the documentation explicitly says they are interchangeable.

Which SMTP port should you use?

Port Typical role TLS mode Authentication When to choose it
25 Server-to-server SMTP delivery Usually negotiated by the mail servers Normally not authenticated between independent servers Only when your provider permits direct delivery and you operate the required mail infrastructure
587 Authenticated message submission STARTTLS Required by most relays Default choice for a VPS-to-relay connection
2525 Alternate authenticated submission Usually STARTTLS when the provider documents it Required by the relay Fallback when 587 is blocked or filtered and the relay supports it
465 Authenticated submission Implicit TLS from the first byte Required by the relay Use only when the provider supports 465 and your client has an implicit-TLS mode

Port numbers do not determine the security mode by themselves. STARTTLS begins with an unencrypted SMTP connection and upgrades it; implicit TLS starts encryption immediately. Selecting STARTTLS on 465, or implicit TLS on 587, commonly produces a TLS handshake failure.

Set up a relay from your VPS

1. Create and verify a sending identity

Open an account with a relay provider and add the domain or sender address that will appear in the From header. Complete the provider’s verification process before troubleshooting SMTP credentials. A relay may accept a connection but reject a message whose sender identity has not been verified.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Domain verification is preferable when you send from multiple addresses on the same domain. If you verify only one address, keep the application’s From value exactly aligned with that verified identity unless the provider documents an approved alternative.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Obtain the relay settings

Record the provider’s SMTP hostname, username, password or API token, supported ports and TLS modes. For example, Postmark documents smtp.postmarkapp.com with ports 25, 2525 and 587; it supports STARTTLS or TLS/SSL, and its Server API Token can be used as both the SMTP username and password. Other providers use different hostnames and credential formats, so copy the values from the account’s SMTP documentation.

3. Keep credentials outside application code

Put the hostname, port, credentials and sender address in environment variables or a secrets manager. Restrict the secret’s permissions to the service account that sends mail, and rotate it if it appears in logs, source control or a support ticket.

SMTP_HOST=relay.example.net
SMTP_PORT=587
SMTP_SECURITY=starttls
SMTP_USERNAME=account-or-token
SMTP_PASSWORD=secret-value
[email protected]

The names above are application settings, not universal variable names. Your framework may call the TLS setting secure, encryption or require_tls. Confirm that the application actually reads the values at startup and that a stale configuration file is not overriding them.

4. Configure authenticated submission

  1. Set the relay hostname supplied by your provider.
  2. Set port 587 and select STARTTLS.
  3. Enable SMTP authentication and provide the username and password or token.
  4. Set the envelope sender and visible From address to a verified identity.
  5. Set a finite connection and response timeout, then allow your application to retry transient failures without sending duplicates.

If port 587 cannot be reached, change only one variable at a time: first try the provider’s port 2525 with STARTTLS, then port 465 with implicit TLS if it is documented. Do not switch to port 465 while leaving the client in STARTTLS mode.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

5. Publish SPF, DKIM and DMARC records

Add the DNS records specified by the relay for your sending domain. SPF identifies permitted sending services, DKIM lets the provider sign messages, and DMARC tells receiving systems how to evaluate alignment and reporting. These records improve authentication and make failures diagnosable; they do not unblock a network port.

6. Send a controlled test

Send one message to an address you control, inspect the relay’s event or delivery log, and check the recipient’s authentication results. Test both a normal message and your application’s failure path so that a temporary relay outage does not silently discard notifications. Continue monitoring bounces and provider suppression events after the initial test.

Provider options

The following services document SMTP relay options relevant to a blocked-port-25 VPS. Reachable ports and account requirements can change, so verify the provider’s current documentation and test from your instance.

Provider Documented ports and TLS Authentication and API Verification and operations Pricing, limits and geography
Postmark Ports 25, 2525 and 587; encrypted SMTP is documented, with STARTTLS or TLS/SSL options. SMTP hostname smtp.postmarkapp.com; the Server API Token is documented as both username and password. API options are also available. Requires a verified sender or domain; use the provider’s delivery and suppression information. Not stated in the available provider details; verify current pricing, limits and regional availability.
Twilio SendGrid STARTTLS on 587; implicit TLS on 465; port 2525 is documented as a fallback when 25 or 587 is blocked. SMTP authentication and API options are available; use the credential format assigned to your account. Verify the sender or domain and use the service’s logs, bounce data and suppression controls. Not stated in the available provider details; verify current pricing, limits and regional availability.
Amazon SES AWS provides an SMTP hostname and credentials. AWS examples use port 587 to avoid EC2 port-25 timeouts. Use the SMTP credentials generated for SES; API access is also available through AWS. Complete the identity-verification and account requirements shown in your AWS region, then monitor bounces and complaints using the service’s controls. Not stated in the available provider details; verify current pricing, limits and regional availability.

Choose by the port that your VPS can reach, the TLS modes your mail library supports, the verification workflow your team can maintain, and the quality of logs and bounce controls you need. There is no universal guarantee that 587 is open: a provider can block several SMTP ports, and a security group, firewall or egress policy can add another restriction.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When AWS direct delivery is worth requesting

AWS users who have a legitimate reason to deliver directly can request removal of the default port-25 restriction instead of using a relay. AWS says the request can apply to Lightsail or EC2, but approval is not immediate.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

What to submit

  1. Sign in as the account root user and open AWS’s email-sending-limitations request process.
  2. Describe the exact use case, expected traffic and recipients.
  3. Explain how you will prevent abuse, handle compromised credentials and process bounces.
  4. Provide the instance and region details requested by AWS.
  5. Include a static IP and reverse-DNS information if available; these details are optional in the request but important for direct delivery.

AWS says processing may take up to 48 hours. Until the request is processed, configure an authenticated relay so application mail does not depend on an unapproved port-25 path.

Prepare DNS before sending directly

Configure reverse DNS for the sending IP and create a matching forward A record before attempting direct SMTP. The forward and reverse names should identify the same mail host. You will still need correct SPF, DKIM and DMARC policy, queue management, retry behavior and reputation monitoring; opening port 25 alone does not make a self-hosted mail server deliverable.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test whether outbound SMTP is blocked

Run these checks from the VPS itself, not from a laptop on a different network. Replace the hostname with the relay’s documented SMTP hostname.

Check DNS resolution

dig +short relay.example.net

A blank result or a DNS error means the host cannot be resolved. Fix the VPS resolver or hostname before investigating a port.

Check TCP reachability

nc -vz relay.example.net 587
nc -vz relay.example.net 2525
nc -vz relay.example.net 465

Run only the ports your relay supports. A successful connection proves that TCP reached the service; it does not prove that TLS negotiation or authentication will succeed. A timeout usually indicates an egress firewall, VPS policy, security group or provider-side filtering. An immediate refusal means the destination is reachable but is not accepting that port or address.

Check the TLS mode

For STARTTLS on 587 or 2525, use:

openssl s_client -starttls smtp -connect relay.example.net:587 -crlf

For implicit TLS on 465, use:

openssl s_client -connect relay.example.net:465 -crlf

A certificate exchange and SMTP banner indicate that the basic TLS path is working. Do not treat a successful OpenSSL handshake as proof that your credentials or sender identity are valid; complete a real authenticated send through the application or provider test tool.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot by the failure symptom

Connection timeout

Confirm the hostname resolves, then test 587, 2525 and 465 individually. Check the VPS firewall, cloud security-group egress rules and provider policy. If all supported ports time out, use the provider’s API or a relay reachable over the network path your application is allowed to use. Do not keep retrying a blocked port, because retries only delay the message and can fill your queue.

TLS handshake failure

Match the client setting to the port: STARTTLS for 587 or 2525, and implicit TLS for 465. A proxy or traffic-inspection device can also interrupt negotiation. Compare the hostname in the TLS connection with the provider’s hostname so certificate validation is performed against the correct name.

Authentication failure

Check the username, password or token for hidden whitespace, expiration and account scope. Some services require a generated SMTP credential rather than the account login. For Postmark, the documented Server API Token is used as both SMTP username and password. Never assume another provider uses the same arrangement.

Sender or identity rejected

Verify the exact address or domain in the From header. A valid SMTP login does not necessarily authorize every sender. Complete domain verification, publish the requested DNS records and remove unverified aliases from the application’s configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Message accepted but not delivered

Inspect the relay’s event log for a bounce, suppression or recipient rejection. Check SPF, DKIM and DMARC alignment and confirm that your application is not sending from an address that differs from the verified identity. Suppressed recipients may require remediation in the provider console before another message can be delivered.

Security and operational practices

  • Use authenticated submission and encrypted transport whenever the relay supports it.
  • Keep SMTP passwords and API tokens in environment variables or a secrets manager, never in a public repository.
  • Limit which application components can send and validate recipient input to prevent abuse of your relay account.
  • Log message IDs, response classes and provider event IDs, but redact credentials and message bodies that contain personal data.
  • Handle temporary failures with bounded retries and exponential backoff; route permanent bounces to a review process.
  • Monitor provider suppression events so repeated sends do not damage deliverability.
  • Document the selected port and TLS mode beside the deployment configuration so a future change does not pair 465 with STARTTLS or 587 with implicit TLS.

Which approach should you choose?

Use an authenticated relay when

  • Your VPS provider blocks port 25 or several SMTP ports.
  • You need dependable application notifications without operating a complete mail server.
  • You want provider-managed logs, bounce processing and suppression controls.
  • You can verify a sender or domain and publish DNS authentication records.

Use an email API when

  • Your application already integrates with HTTP APIs more easily than SMTP libraries.
  • The provider’s API offers the events, templates or delivery controls you need.
  • SMTP egress is restricted but the documented API endpoint is reachable.

Request AWS port-25 removal when

  • You specifically need direct server-to-server delivery.
  • You can explain your traffic and abuse-prevention controls to AWS.
  • You are prepared to manage reverse DNS, forward DNS, queueing, retries, reputation and recipient feedback yourself.

For most VPS-hosted applications, the practical default is an authenticated relay on port 587 with STARTTLS, followed by 2525 when supported and reachable. Port 465 is a valid alternative only with implicit TLS, while direct port-25 delivery should be treated as a separate, operationally demanding design rather than a quick configuration change.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.