Partner with experts to accelerate your digital transformation journey
Bobcares

Linux SMTP relay – How we protect your mail servers from being open relays

PDF Header PDF Footer

Protecting mail servers from being used as Linux SMTP open relays, is a major security task we perform as a part of our Dedicated Tech Support services for web hosting providers.

An open mail relay is an SMTP server that allows any host to send mails through it. If it is open relay, users can send mails through that Linux SMTP relay server without authenticating.

Today we’ll see how we resolve SMTP relay errors in our customers’ mail servers.

Linux SMTP relay – Why should you protect your mail server from open relay?

While some customers allow no open relays or relaying mails only from trusted hosts, majority of the mail servers we configure are secured to prevent all such open relays.

A mail server that acts as an SMTP relay can get easily spammed by attackers and end up being blacklisted in spam databases. This can lead to delay or failure in email delivery from this mail server.

No destination server would accept mails from a spamming server that is blacklisted. To protect our customers’ servers from getting blacklisted, we prevent any open relay through these servers.

We’ve seen cases where a third party application rule set messed up the server settings and made it vulnerable, causing it to function as an open relay. With our timely intervention, we’ve been able to detect and fix such issues promptly.

[ Use your time to build your business. We’ll take care of your customers. Hire Our Hosting Support Specialists at $9.99/hr. ]

What causes ‘Relay access denied’ error?

A secure mail server blocks connection attempts from all unauthorized email user accounts and allow only authenticated users to send mail through it.

If any host tries to relay mails through the mail server without authenticating, it would be rejected by the secure mail server with the error message ‘Relay access denied’.

However, this error can also happen in cases where valid email users try to send mails. If the mail server is unable to confirm whether the domain owner is authorized to send emails through it, the mail would be rejected.

In cPanel Exim email servers, a valid sender means the user who authenticates to the mail server using the mail account username and password, before trying to send mails.

Valid users face ‘Relay access denied’ error while trying to send mails, due to many reasons. Some of the reasons we’ve seen are:

  1. User not authenticated properly – user name or password wrong.
  2. Wrong mail server given in the mail client configuration.
  3. SMTP port blocked or wrong port configured.
  4. Incorrect MX record settings or DNS resolution issues.
  5. Email routing issues or other errors in the mail server.
  6. Any custom 3rd party webmail or spam filter settings.
  7. Recipient mail account corruption.
  8. Changes of authenticated IP on users’ mobile devices.
  9. When an external sender fails your server’s spam check.
  10. Improper configuration of mail server, such as relaying and recipient settings.

[ Running a hosting business doesn’t have to be hard, or costly. Get world class Hosting Support Specialists at $9.99/hour (bulk discounts available) ]

How to fix Linux SMTP relay and related errors

People rely on mail services for their ongoing business communication. So, securing the mail servers is a crucial task our Outsourced support technicians perform, to prevent trojans, virus, bots, phishing and other malware from disrupting its service.

At Bobcares, we implement these security measures to secure our customers’ SMTP server:

  • Linux SMTP relay – To prevent open relays, we allow only valid users to send mail through the server. This is implemented by configuring SMTP authentication in the mail servers.
  • Prevent outbound spamming – Hacked web applications are often used to send out spam from the mail server. We prevent this by disabling the default web user from sending out mails.
  • Enable detailed logging – With our extended logging mechanism, we are able to track and detect all abuses in a timely manner.
  • Rate limit mail/connections per user – Limiting the number of mails and connections that can be attempted by each user, depending on their requirement, helps us to control the outgoing mails.
  • Configure alternate SMTP port – Making the mail server listen to an alternate SMTP port, such as “26” or “587”, other than the default port “25”, we block attempts of spam relay.
  • Enable TLS on all ports – Encrypting the mail service using TLS helps us to secure transmitted data and to prevent data sniffing.
  • Scan outgoing messages for spam and virus – To protect server IP reputation by preventing spam from going out, we implement outbound mail scanning.
  • Block mails from blacklisted IPs – To prevent inbound spamming, we use Realtime Block Lists (RBLs) to block blacklisted mail servers from sending mail to our server.
  • Configure anti-spam DNS records – Anti-spam DNS records like SPF, RDNS, DKIM keys, etc. are configured for domains in our mail server to ensure that mails from our server are not marked as spam.
  • Run the SMTP server as unprivileged user – To prevent the entire server from being hacked due to a vulnerability in the mail server, we run the mail server as an unprivileged user.
  • Apply security patches and updates – As a part of our security management, we apply mail sever security patches and updates, without incurring any time delay.
  • 24/7 monitoring – Our expert technicians monitor the email logs for any anomalies and fix them proactively, before users face issue with emails.

Examining the mail logs, testing of email routing and checking the mail server settings are some methods we use to identify and fix the issue. If you’d like to know how to fix your mail server, we’d be happy to talk to you.

We’ve been able to prevent server incidents by up to 15% by using our proactive server checks (click here to see how we improve web hosting support).

 

 

STOP SPENDING TIME ON SUPPORT!

Do you spend all day answering technical support queries?

Wish you had more time to focus on your business? Let us help you.

We free up your time by taking care of your customers and servers. Our engineers monitor your servers 24/7, and support your customers over help desk, live chat and phone.

HIRE SUPPORT SPECIALISTS AT $9.99/HR

0 Comments

Submit a Comment

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

Get featured on the Bobcares blog and share your expertise with a global tech audience.

WRITE FOR US

100% WHITE LABEL SUPPORT

Bobcares

Spend time on your business - not on tech support.

Tech support can keep you busy all day long. That is time you could use to focus on your business. Leave your end-user support to us, and use that time to focus on the growth and success of your business.

TALK TO SALES Or click here to learn more.

Speed issues driving customers away?
We’ve got your back!

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF