SMTP Relay Service

Note

This documentation pertains to the dedicated SMTP relay service. It is not intended for customers of hosted emails plans from Mailcheap (which include either direct send SMTP or Premium relay SMTP). This is an advanced service to be used with your existing email infrastructure.

Get Started with Mailcheap’s SMTP Relay Service with Outbound AVAS filtering

Authorize your mailserver

Login to Server stats & tools portal from the homepage (filterxxxx.mymailcheap.com/home); replace ‘xxxx’ with your own value received via the client area & email). Follow the instructions within the portal to authorize your mailserver(s) by adding its IP(s).

SMTP relays


Relay your mailserver

Relay your mailserver to your dedicated Mailcheap filter. All modern MTAs are supported; if your MTA is not shown below simply refer to its documentation on relaying email.

Follow the instructions for your MTA below.

Postfix

In /etc/postfix/main.cf, add/modify:

relayhost = [filterxxxx.mymailcheap.com]

Restart Postfix.

See Postfix documentation for more information.

Exim

In exim configuration file, add/modify: (In Cpanel, add/modify in PREROUTE section in advanced EXIM config)

smarthost:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = * filterxxxx.mymailcheap.com

Restart Exim.

See Exim wiki for more information.


Setup SPF & DKIM

SPF & DKIM are very important tools to ensure deliverability for your domains.

  • SPF: Value can be found in Server stats & tools portal. Your clients can use record v=spf1 include:yourdomain.tld -all and make sure to have yourdomain.tld’s SPF as the value in Server stats & tools portal. Hosting panels like Cpanel has installer scripts to install SPF globally.
  • DKIM: Value can be found in Server stats & tools portal. Each domain should have a unique DKIM.

Features

Exert fine-grained control over your outbound email traffic.

There are two separate portals to manage/monitor the service:

  • Mail (quarantine management & graphical stats)
  • Server stats & tools (advanced server configuration, logs & health metrics).

Both can be found in the homepage of your server.

Server stats & tools: Web based panel to authorize your mailservers & subnets
SMTP relays


Server stats & tools: Easily block offending users/domains
SMTP relays


Server stats & tools: Custom spam filter thresholds and configuration
SMTP relays


Server stats & tools: Apply rate-limit for users and domains in different timeframes (minute,hour,day). It is highly recommended to turn this feature on in a shared environment (hosting providers, ESPs)
SMTP relays


Server stats & tools: View log & log analysis. Important metrics include messages received, delivered, forwarded, deferred, bounced & rejected and Per-day/Per-hour traffic summaries. See more information on understanding log anaysis below
SMTP relays


Server stats & tools: View realtime health metrics for both filter & relay. Make sure the Postfix queue is healthy (should not be full) and watch out for traffic spikes and unusual load conditions
SMTP relays


Server stats & tools: Manage SPF, DKIM, DMARC signing for your domains. These 3 are very important to ensure deliverability
SMTP relays


Mail: Quarantine management and FP learning for filtered emails
SMTP relays


How to monitor?

The log/log analysis allows you to see highest sending domains, users, etc. (monitor for unusual spikes in outbound traffic; compromized accounts usually send thousands of emails per hour) and based on this information and the quarantine (Mail portal) you can block users/domains that are suspected to be sending spam/shut down compromized accounts until their password can be reset.

Its highly recommended to activate rate limiting if the service is used in a shared environment (hosting providers, ESPs).

Health metrics

Monitor your Dedicated filter and Dedicated relay: watch out for traffic spikes, unusual load conditions and make sure the queue (Postfix queue) is healthy (the pie-graph for Postfix queue should not be full).

Understanding log analysis

Log analysis is designed to provide an over-view of Postfix (SMTP server) activity, with just enough detail to give you a “heads up” for potential trouble spots. Both log & log analysis are rolled weekly.

Important metrics:

  • Messages received, delivered, forwarded, deferred, bounced and rejected
  • Per-Day Traffic Summary
  • Per-Hour Traffic
  • Summaries of warnings, fatal errors, and panics
  • Summary of master daemon messages

Why are there less “delivered” than “received”?
This is because delivered = received - (deferred + bounced + rejected)

Why isn’t delivered + deferred + bounced + rejected = received?
Some rejects (header and body checks, for example) happen in “cleanup,” after alias lists are expanded. Thus a single received message will be rejected multiple times: once for each recipient.

Why are there more “delivered” than “received”?
A single email message can have multiple recipients. For example, on receiving a single email with 10 recipients (all delivered successfully), the analysis will show 1 received and 10 delivered.

False positives

The default spam filter configuration can be quite aggressive in some cases. This can be reduced by lowering the spam thresholds in Server stats & tools portal (Amavis user config section).

Troubleshooting

For all advanced troubleshooting, download mail log from Server stats & tools portal.