Hello,
I am a bit unclear based on Apache James 3.5.0 docs whether it is able to
connect to smtp service provider purely based on MX Records. I have gone
through the mailing list historically . I have set the gateway and gatewayPort
to published MX Record.
Logs say the following which seem to imply it is still looking for an A Record.
jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2]
org.apache.james.dnsservice.library.MXHostAddressIterator.<init>:79 - Couldn't
resolve IP address for discovered host smtpxxx.xxxx.com.
In mailet config I set up the gateway:
<!-- A single mail server to deliver all outgoing messages. -->
<!-- This is useful if this server is a backup or failover machine,
-->
<!-- or if you want all messages to be routed through a particular
mail server, -->
<!-- regardless of the email addresses specified in the message -->
<!-- -->
<!-- The gateway element specifies the gateway SMTP server name. -->
<!-- If your gateway mail server is listening on a port other than
25, -->
<!-- you can set James to connect to it on that port using the
gatewayPort -->
<!-- element. -->
<!-- Although normally multiple addresses are implemented through
proper -->
<!-- DNS configuration, the RemoteDelivery mail does allow specifying
-->
<!-- multiple gateway elements, each of which may also have a port -->
<!-- e.g., mygateway:2525 -->
<!-- the gatewayPort element is used as a default -->
<gateway>${env:SMTP_GATEWAY}</gateway>
<gatewayPort>${env:SMTP_GATEWAYPORT}</gatewayPort>
<!-- If the gateway requires smtp authentication the following
directives -->
<!-- (gatewayUsername/gatewayPassword) can be used. -->
<gatewayUsername>${env:SMTP_WEBSSO_USERNAME}</gatewayUsername>
<gatewayPassword>${env:SMTP_WEBSSO_PASSWORD}</gatewayPassword>
In dnsservice.xml I also enabled
<!-- Uncomment this if you want James to try a single server for each -->
<!-- multihomed mx host. -->
<singleIPperMX>true</singleIPperMX>
Our SMTP service provider is forcing down the MX Record with all A Records
being removed. Is there anything else I need to consider to get this to work ?
---
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and delete this e-mail. Any unauthorized copying,
disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to https://www.db.com/disclosures for additional EU corporate and
regulatory disclosures and to
http://www.db.com/unitedkingdom/content/privacy.htm for information about
privacy.