[exim] Please help me to understand the roles and purposes o…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Turritopsis Dohrnii Teo En Ming
Datum:  
To: exim-users
CC: ceo
Betreff: [exim] Please help me to understand the roles and purposes of an Exim Smarthost
Subject: Please help me to understand the roles and purposes of an
Exim Smarthost

Good day from Singapore,

Recently, I could not send out emails to a recipient domain from a
CentOS 7.9 Linux server using the mail command. This Linux server has
cPanel web hosting control panel installed with Exim as its SMTP
outgoing mail server.

My boss said that the Exchange server in the same private internal
network was rejecting emails from the Linux server because the emails
were marked as spam. He told me I would need to configure Exim SMTP
server to relay emails to the Exchange server in the same private
internal network.
The recipient domain is hosted in the Exchange server. Please read
below for the Exim Smarthost which my boss had configured. I still do
not fully understand the roles and purposes of a smarthost. Please
help me to understand it. Thank you very much.

Modify Exim configuration file.

# nano /etc/exim.conf

Under the section ROUTERS CONFIGURATION, add the following lines.

static_route:
driver = manualroute
transport = remote_smtp
route_data = ${lookup{$domain}partial-lsearch{/etc/staticroutes}}

Restart Exim SMTP Server.

# systemctl restart exim

Create a file to hold static routes.

# touch /etc/staticroutes

# chown root:mail /etc/staticroutes

Display the contents of /etc/staticroutes

# cat /etc/staticroutes

teo-en-ming-corp.com: 192.168.252.2

Where 192.168.252.2 is the private IP address of the Microsoft Exchange server.

Reference Guide: Exim smarthost for specific domain – Easy setup for
recipient and sender
Link: https://bobcares.com/blog/exim-smarthost-for-specific-domain/

Reference Guide: How do I test how Exim will route a given address?
Link: https://support.cpanel.net/hc/en-us/articles/360053412433-How-do-I-test-how-Exim-will-route-a-given-address-

Test how Exim will route a given email address

# exim -bt it_backup@???
it_backup@???
router = static_route, transport = remote_smtp
host 192.168.252.2 [192.168.252.2]

Login to the Exchange Admin Center at https://localhost/ecp/?ExchClientVer=15

Click mail flow > receive connectors > Bypass Authentication.

Click scoping.

Under Remote network settings, add the following IP addresses:

192.168.253.181
<Public IP address of Exim Server (Linux mail server)>

Click Save.

That's all.

Mr. Turritopsis Dohrnii Teo En Ming, 43 years old as of 26 Aug 2021,
is a TARGETED INDIVIDUAL living in Singapore. He is an
IT Consultant with a System Integrator (SI)/computer firm in
Singapore. He is an IT enthusiast.