Sendmail Relay Server Integration: smart_host and mailertable Guide

· 496 views · Pitbull Secure Gateway

Configure Pitbull relay server on Sendmail MTA: step-by-step smart_host macro, mailertable, SMTP AUTH and TLS settings.

Sendmail is one of the oldest MTAs on the internet and is still actively used on many legacy Linux/Unix servers. This guide covers Pitbull relay server configuration on Sendmail.

Why a Relay Server?

Sendmail servers sending mail directly to the internet face IP reputation loss, blacklisting and outbound spam risk. Traffic routed through Pitbull relay gets centralized filtering, abuse detection and IP protection.

smart_host Configuration

In /etc/mail/sendmail.mc:

define(`SMART_HOST', `relay.pitbull.com.tr')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
FEATURE(`authinfo')dnl

Compile: m4 sendmail.mc > /etc/mail/sendmail.cf && systemctl restart sendmail

SMTP AUTH Settings

Add relay credentials to /etc/mail/authinfo:

AuthInfo:relay.pitbull.com.tr "U:tenant@pitbull.com.tr" "P:RELAY_TOKEN" "M:LOGIN"

Hash with makemap hash /etc/mail/authinfo < /etc/mail/authinfo.

Per-Domain mailertable

To route specific domains through relay, in /etc/mail/mailertable:

example.com    smtp:relay.pitbull.com.tr:587

Inbound MX Gateway

Point your DNS MX records to the Pitbull gateway so inbound traffic passes through Rspamd, ClamAV and DMARC checks. Clean traffic is delivered to your Sendmail server.

Conclusion

Sendmail + Pitbull integration delivers enterprise-grade email security even on legacy servers: centralized quarantine, NOC visibility and automated abuse protection.