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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use an authenticated SMTP relay or an email API instead of connecting directly to recipient mail servers. Configure the relay on port 587 with STARTTLS; use port 2525 if 587 is unreachable, or port 465 with implicit TLS when the provider supports it. Direct delivery requires outbound port 25, which many VPS platforms restrict.

What a blocked port 25 means

SMTP port 25 is the traditional server-to-server route. When your mail server looks up a recipient domain’s MX record and delivers directly, it opens a connection to that recipient’s mail server on TCP 25. A VPS provider may block that connection at the network level, so your application can run normally while every direct delivery attempt times out.

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

A block can exist in either direction: the hosting company may filter outbound traffic from your instance, or a recipient network may refuse connections from your VPS address. Changing your application’s SMTP setting does not remove a provider-level firewall rule.

Providers restrict port 25 primarily to reduce spam, compromised-account abuse and reputation damage. DigitalOcean’s current policy explicitly states: “SMTP ports 25, 465, and 587 are blocked on Droplets to prevent spam and other abuses on our platform.” AWS blocks outbound port 25 by default on Lightsail and EC2, although AWS allows an account holder to request removal of that restriction.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Do not assume that 587 is open merely because it is the standard submission port. Policies differ by provider, product, region and account, and some platforms block 25, 465 and 587 together. Test from the actual VPS before choosing a port.

The practical solution: submit mail to a relay

An SMTP relay accepts authenticated messages from your VPS and then delivers them to recipient MX servers. Your server only needs an outbound connection to the relay’s submission endpoint. The relay handles queueing, retries, TLS to destination servers, bounce processing and reputation management.

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

An email API follows the same principle over HTTPS: your application sends a request to the provider’s API, and the provider performs SMTP delivery. This can work when SMTP egress is restricted but normal HTTPS traffic is allowed. It also avoids maintaining an SMTP client, although you still need sender verification, authentication and bounce monitoring.

Architecture VPS connection What you manage When to use it
Direct SMTP delivery Recipient MX servers on port 25 Mail queue, retries, reputation, DNS, TLS and abuse controls Only when your provider permits port 25 and you can operate a complete mail server
Authenticated SMTP relay Provider submission port, normally 587 Application credentials, sender verification and DNS records Default choice for most VPS applications
Email API HTTPS to the provider API credentials, request handling, sender verification and event processing Useful when SMTP ports are filtered or you want structured delivery events

Which SMTP port should you use?

Port Encryption mode Role Typical action
25 Usually negotiated SMTP encryption where available Server-to-server delivery Avoid for application submission unless your VPS provider has explicitly enabled it
587 STARTTLS (connection begins unencrypted, then upgrades) Authenticated message submission Try first when the provider documents it
2525 Usually STARTTLS; confirm with the relay Alternate authenticated submission port Try when 587 is blocked or filtered
465 Implicit TLS (TLS starts immediately) Authenticated submission where supported Use an SSL/TLS client mode, not STARTTLS

Port and TLS mode must match. Sending STARTTLS commands to an implicit-TLS endpoint produces a handshake error; opening an implicit-TLS connection to a STARTTLS endpoint also fails. A relay may expose several ports but still apply account-level restrictions, so follow its current documentation.

Step-by-step setup with an SMTP relay

1. Create an account and verify your sender

Choose a relay that supports authenticated SMTP or an API. Add the domain you intend to use in the From address, such as example.com, and complete the provider’s verification process. Some services also require verification of an individual sender address.

Do not use an unverified or forged From address. The relay can reject it, and recipients may classify the message as suspicious even when authentication succeeds.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

2. Publish SPF, DKIM and DMARC records

  • SPF: Authorizes the relay’s sending infrastructure for your domain. Add the provider’s prescribed mechanism to the domain’s single SPF policy; do not publish multiple independent SPF records.
  • DKIM: Lets the provider sign each message. Publish the selector record supplied by the relay, usually as a DNS TXT or CNAME record.
  • DMARC: Tells receiving systems how to evaluate SPF and DKIM alignment and what to do when both fail. Start with a monitoring policy if you are still identifying legitimate senders, then tighten it after reviewing reports.

DNS changes can take time to appear at recursive resolvers. The relay dashboard normally shows whether each record is detected; send only after the domain is marked verified.

3. Store credentials outside your source code

Put the relay hostname, port, username and password or token in environment variables or a secrets manager. Restrict file permissions and never commit credentials to a repository or print them in application logs.

SMTP_HOST=smtp.provider.example
SMTP_PORT=587
SMTP_USER=your-smtp-username
SMTP_PASSWORD=your-password-or-token
MAIL_FROM=alerts@example.com

Use the exact hostname and credential type supplied by your provider. For example, Postmark documents smtp.postmarkapp.com, ports 25, 2525 and 587, STARTTLS or TLS/SSL, and its Server API Token used as both the SMTP username and password.

4. Configure STARTTLS on port 587

A typical SMTP client sequence is: connect, issue EHLO, request STARTTLS, perform certificate validation, issue EHLO again, authenticate, submit the message and quit. The second EHLO is required by many servers after TLS negotiation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import os, smtplib, ssl
from email.message import EmailMessage

msg = EmailMessage()
msg["From"] = os.environ["MAIL_FROM"]
msg["To"] = "recipient@example.net"
msg["Subject"] = "VPS delivery test"
msg.set_content("This is a test message.")

host = os.environ["SMTP_HOST"]
port = int(os.environ.get("SMTP_PORT", "587"))
context = ssl.create_default_context()

with smtplib.SMTP(host, port, timeout=20) as smtp:
    smtp.ehlo()
    smtp.starttls(context=context)
    smtp.ehlo()
    smtp.login(os.environ["SMTP_USER"], os.environ["SMTP_PASSWORD"])
    smtp.send_message(msg)

Keep certificate verification enabled. Disabling it hides hostname or interception problems and exposes credentials to an attacker.

5. Switch to port 2525 when necessary

If TCP 587 cannot be reached and the relay documents 2525, change only the port first and keep STARTTLS enabled. Port 2525 is not a universal standard: the relay must listen there, and your VPS provider must permit it.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

6. Use implicit TLS on port 465 when documented

Port 465 requires an SSL/TLS connection from the first byte. In Python, use an SSL client rather than calling starttls() on a plain SMTP connection:

with smtplib.SMTP_SSL(host, 465, context=context, timeout=20) as smtp:
    smtp.login(os.environ["SMTP_USER"], os.environ["SMTP_PASSWORD"])
    smtp.send_message(msg)

Do not combine SMTP_SSL with starttls(); that attempts two different TLS modes.

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.

7. Send a controlled test

Send to an address you control at a different mail provider. Check the relay’s activity or event log, the recipient’s headers, and the application log. Verify that SPF and DKIM pass, the visible From address is the one you verified, and that the message did not enter a suppression or bounce list.

Provider options

The following services document the ports or capabilities listed. Ports, account requirements and program availability can change, so confirm the provider’s current settings before deployment.

Provider Documented ports and TLS Authentication API Verification and operations Pricing and limits
Postmark 25, 2525 and 587; encrypted SMTP with STARTTLS or TLS/SSL Server API Token as both username and password SMTP and API options are documented Requires a verified sender identity; monitor bounces and suppressions in the provider account Not stated here; verify current regional pricing, quotas and retention
Twilio SendGrid 587 with STARTTLS; 465 with implicit TLS; 2525 as a fallback when 25 or 587 is blocked Use the authenticated credentials required by the account Not specified here; verify the current API and event features Verify the sender or domain and review delivery, bounce and suppression events Not stated here; verify current plans, quotas and geography
Amazon SES AWS supplies an SMTP hostname and credentials; AWS examples use 587 to avoid EC2 port-25 timeouts AWS-generated SMTP credentials Verify the current SES API options for your region Verify identities and configure SPF, DKIM and DMARC; monitor bounces and complaints Not stated here; verify regional limits, sandbox status and pricing

Choose based on reachable ports, TLS support, authentication method, API requirements, sender and domain verification, event logs, suppression handling, geographic availability and sending limits. A relay generally gives better operational control than running your own Internet-facing mail server, but it does not remove the need for correct DNS, consent-based sending and bounce handling.

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

Testing whether outbound SMTP is blocked

Run these checks from the VPS, not from your laptop. Replace the hostname with the relay endpoint shown in your account.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
  1. Resolve the hostname.
    getent hosts smtp.provider.example
    dig +short smtp.provider.example

    If both commands return no address, fix DNS or use the provider’s exact hostname.

  2. Test TCP 587.
    nc -vz -w 10 smtp.provider.example 587

    A successful connection proves that the TCP path is open; it does not prove that TLS or authentication will work.

  3. Test STARTTLS.
    openssl s_client -starttls smtp -connect smtp.provider.example:587 -crlf

    Look for a certificate chain and a successful SMTP greeting. Certificate-name or protocol errors indicate a TLS configuration problem rather than a simple port block.

  4. Try the documented fallback.
    nc -vz -w 10 smtp.provider.example 2525
    openssl s_client -starttls smtp -connect smtp.provider.example:2525 -crlf

    Use 2525 only if the relay supports it.

  5. Test implicit TLS on 465.
    openssl s_client -connect smtp.provider.example:465 -crlf

    Do not add -starttls smtp for this test.

A connection timeout usually means a firewall, routing or provider restriction. An immediate connection refusal means the destination is reachable but no service is listening or an intermediate firewall rejected it. A TLS handshake failure points to the wrong mode, certificate validation or traffic interception. An SMTP authentication error means the network and TLS path worked; check credentials, token scope and sender verification.

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

Diagnosing common failures

Every port times out

Check the VPS provider’s outbound-mail policy and any local firewall rules such as iptables, nftables or cloud security-group egress rules. Confirm that ordinary HTTPS works and that the relay hostname resolves. If the provider blocks all documented SMTP ports, use the provider’s HTTPS API or move the sender to a service that permits submission.

587 fails but 2525 works

Leave the TLS mode at STARTTLS, change the port to 2525 and record the choice in deployment configuration. Do not silently fall back to unencrypted SMTP.

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.

465 connects but the client reports a protocol error

You are probably using STARTTLS against an implicit-TLS endpoint. Select an SSL/TLS connection mode from the start, use the provider hostname so certificate validation succeeds, and remove any explicit STARTTLS call.

Authentication is rejected

Check for a copied username, expired password, wrong account region or an API token being used where an SMTP credential is required. For Postmark, the documented Server API Token is used as both username and password. Ensure the account permits the chosen sender and that the domain or address is verified.

The relay accepts mail but recipients do not receive it

Inspect the provider event log for a bounce, suppression or policy rejection. Confirm SPF and DKIM alignment, a sensible DMARC policy, a valid recipient address and a consistent envelope sender. Do not repeatedly retry permanent bounces; remove invalid addresses and investigate complaint or suppression events.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Messages arrive in spam

Use a verified domain, publish DKIM, align SPF and DKIM with the visible From domain, and send only mail that recipients expect. Keep transactional and bulk streams separated when the provider supports separate credentials or streams. Monitor complaint and bounce rates and pause a faulty deployment instead of increasing retries.

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 genuine need to deliver directly can request removal of the port-25 restriction instead of using a relay. AWS instructs the account root user to submit its email-sending-limitations form with a detailed use case, an abuse-prevention plan, instance and region details, and optional static-IP and reverse-DNS information. AWS says processing may take up to 48 hours, so this is not an immediate workaround for a production incident.

Before direct delivery, configure reverse DNS for the sending IP and create a matching forward A record. Without consistent forward and reverse DNS, recipient systems are more likely to reject or distrust the connection. You must also operate queueing, retries, TLS, bounce processing, blocklist monitoring, authentication records and abuse controls yourself.

Request approval only when you can meet those operational obligations. For ordinary application notifications, authenticated submission through a relay is usually faster to deploy and easier to monitor.

Security and reliability checklist

  • Use STARTTLS on 587 or 2525, and implicit TLS on 465; never downgrade because a port is convenient.
  • Validate the relay certificate and hostname.
  • Keep SMTP passwords and API tokens in a secrets manager or protected environment variables.
  • Use separate credentials for development, staging and production where possible.
  • Restrict which application components can send mail and rate-limit automated jobs.
  • Log provider message IDs, response codes and event status, but redact credentials and message content that may contain personal data.
  • Handle transient failures with bounded exponential backoff and permanent failures without endless retries.
  • Monitor bounces, complaints and suppressions; remove invalid recipients.
  • Verify SPF, DKIM and DMARC after every DNS or provider change.
  • Retest connectivity after moving regions, changing VPS plans or enabling a new firewall policy.

A quick decision guide

  1. If your VPS provider allows outbound 587, configure an authenticated relay with STARTTLS.
  2. If 587 is blocked but the relay documents 2525, use 2525 with STARTTLS.
  3. If the relay documents 465 and your client supports implicit TLS, use 465.
  4. If all SMTP submission ports are blocked, use the relay’s HTTPS API.
  5. If you require direct MX delivery, request port-25 removal where your provider offers that process, then configure reverse DNS and a matching A record before sending.

The durable design is to keep your application independent of a particular port: store the relay host, port and TLS mode in configuration, test them during deployment, and expose provider response codes to your monitoring system. That way a VPS policy change can be handled by changing a verified relay endpoint rather than rebuilding your mail infrastructure.

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

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.