Thanks for the suggestion Edmund. You're right I should have looked at why
IPV6 are failing :-)
In the end, I've simply disabled IPV6 on the host and now it resolves
smtp.office365.com directly into an IPV4 address.
No more delays! Thanks.

Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759cde3d1581a smtp
connected address=127.0.0.1 host=localhost
Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759cde3d1581a smtp message
msgid=06189f2f size=19387 nrcpt=1 proto=ESMTP
Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759cde3d1581a smtp
envelope evpid=06189f2fd2197f87 from=<ad...@xxxxx.com> to=<ad...@yyyyy.com>
Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759cde3d1581a smtp
disconnected reason=quit
Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759d08149d869 mta
connecting address=smtp+tls://52.98.143.2:587 host=52.98.143.2
Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759d08149d869 mta connected
Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759d08149d869 mta tls
ciphers=TLSv1.3:TLS_AES_256_GCM_SHA384:256
Apr  3 07:12:29 raspberrypi4GB smtpd[106424]: 92d759d08149d869 mta
server-cert-check result="success"
Apr  3 07:12:30 raspberrypi4GB smtpd[106424]: 92d759d08149d869 mta delivery
evpid=06189f2fd2197f87 from=<ad...@xxxxx.com> to=<ad...@yyyyy.com> rcpt=<->
source="192.168.1.71" relay="52.98.143.2 (52.98.143.2)" delay=1s
result="Ok" stat="250 2.0.0 OK <
0upatwfd7rohrpfnfthyr9srzyi0x1ls739hmixp...@xxxxx.com> [Hostname=
MEYP282MB1605.AUSP282.PROD.OUTLOOK.COM]"
Apr  3 07:12:40 raspberrypi4GB smtpd[106424]: 92d759d08149d869 mta
disconnected reason=quit messages=1

On Mon, 3 Apr 2023 at 00:23, Edmund Lodewijks <e.lodewi...@gmail.com> wrote:

> Hi!
>
> Sorry, me again :-)
>>
>> Is there a way to tell opensmtpd to relay only using IPV4 for mta? […]
>>
>
> You could adapt your match line to only allow sending from your ipv4
> address by adding “from src [your ipv4 address]. This is documented on the
> man-page. It’s not a perfect solution, but I think it might help you out.
>
> E.g.: “match from src [your ipv4 are here] for any relay”
>
> The reason is that opensmtpd tries first a bunch of IPV6 addresses
>> corresponding to smtp.office365.com, all failing, then finally finds an
>> IPV4 address that works. See below.
>>
>
> You might want to find out why that is happening.
>
> Thanks!
>>
>
> I hope this helps!
> Edmund
>
>
> P.S.: I apologise for the formatting, sending this from my phone.
>
>
>
>
>
>

Reply via email to