On 15/2/2025 11:40 π.μ., Viktor Dukhovni via Postfix-users wrote:
I don't recall seeing you testing with "getaddrinfo" (and perhaps also
"getnameinfo" to see whether it is slow PTR lookup that is the problem).
It may also help to perform tcpdumps to see how long the delay is
between that client connecting and the Postfix 220 greeting.

You are right Victor.

So, here is what happens with getaddrinfo.

I compiled it on the affected box (Rocky 8) and ran it; it produced no results:

[root@mailgw1 postfix-tools]# ./getaddrinfo smtpfra7.fortimailcloud.com
host smtpfra7.fortimailcloud.com not found: Name or service not known

I did the same (I downloaded source and compiled) on Rocky 9 and ran; it still produced no results:

[root@vmail4 name-addr-test]# ./getaddrinfo smtpfra7.fortimailcloud.com
host smtpfra7.fortimailcloud.com not found: Name or service not known

On both boxes the above command took a long time to complete.

On both boxes "dig smtpfra7.fortimailcloud.com" ran successfully instantly.

Here are more detailed results:

===========================================================================
On: mailgw1.noa.gr
------------------

[root@mailgw1 postfix-tools]# time ./getaddrinfo smtpfra7.fortimailcloud.com
host smtpfra7.fortimailcloud.com not found: Name or service not known

real    6m34.031s
user    0m0.000s
sys     0m0.004s

[root@mailgw1 postfix-tools]# ldd getaddrinfo
        linux-vdso.so.1 (0x00007fffee5df000)
        libc.so.6 => /lib64/libc.so.6 (0x00007efcec698000)
        /lib64/ld-linux-x86-64.so.2 (0x00007efceca6e000)

[root@mailgw1 postfix-tools]# ldd --version
ldd (GNU libc) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

[root@mailgw1 postfix-tools]# time dig +short -t a smtpfra7.fortimailcloud.com | sort | fmt
154.52.2.141 154.52.2.142 154.52.2.143 154.52.2.144 154.52.2.145
154.52.2.146 154.52.2.147 154.52.2.148 154.52.2.149 154.52.2.150
154.52.2.151 154.52.2.152 154.52.2.153 154.52.2.154 154.52.2.155
154.52.2.156 154.52.2.157 154.52.2.158 154.52.2.224 154.52.2.225
154.52.2.226 154.52.2.227 154.52.2.228 154.52.2.229 154.52.2.230
154.52.2.231 154.52.2.232 154.52.2.233 154.52.2.234 154.52.2.235
154.52.2.236 154.52.2.237 154.52.2.238 154.52.2.239 154.52.2.240
154.52.2.241 154.52.2.242 154.52.2.243 154.52.2.244 154.52.2.245
154.52.2.246 154.52.2.247 154.52.2.248 154.52.2.249 154.52.2.250
154.52.2.251

real    0m0.032s
user    0m0.007s
sys     0m0.006s

[root@mailgw1 postfix-tools]# time ./getaddrinfo cluster1.eu.messagelabs.com
Hostname:       cluster1.eu.messagelabs.com
Addresses:      195.245.231.74 195.245.231.67 85.158.142.213 195.245.230.197 195.245.230.192 85.158.142.217

real    0m0.041s
user    0m0.000s
sys     0m0.002s

[root@mailgw1 postfix-tools]# time ./getnameinfo 154.52.2.232
Hostname:       smtpfra7.fortimailcloud.com
Address:        154.52.2.232

real    0m0.437s
user    0m0.000s
sys     0m0.002s

===========================================================================
On vmail4.noa.gr (a Rocky 9 box, under development):
----------------------------------------------------

[root@vmail4 name-addr-test]# time ./getaddrinfo smtpfra7.fortimailcloud.com
host smtpfra7.fortimailcloud.com not found: Name or service not known

real    4m19.706s
user    0m0.000s
sys     0m0.003s

[root@vmail4 name-addr-test]# time dig +short -t a smtpfra7.fortimailcloud.com | sort | fmt
154.52.2.141 154.52.2.142 154.52.2.143 154.52.2.144 154.52.2.145
154.52.2.146 154.52.2.147 154.52.2.148 154.52.2.149 154.52.2.150
154.52.2.151 154.52.2.152 154.52.2.153 154.52.2.154 154.52.2.155
154.52.2.156 154.52.2.157 154.52.2.158 154.52.2.224 154.52.2.225
154.52.2.226 154.52.2.227 154.52.2.228 154.52.2.229 154.52.2.230
154.52.2.231 154.52.2.232 154.52.2.233 154.52.2.234 154.52.2.235
154.52.2.236 154.52.2.237 154.52.2.238 154.52.2.239 154.52.2.240
154.52.2.241 154.52.2.242 154.52.2.243 154.52.2.244 154.52.2.245
154.52.2.246 154.52.2.247 154.52.2.248 154.52.2.249 154.52.2.250
154.52.2.251

real    0m0.036s
user    0m0.012s
sys     0m0.009s

[root@vmail4 name-addr-test]# ldd getaddrinfo
        linux-vdso.so.1 (0x00007fff093bb000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fda05600000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fda0598e000)

[root@vmail4 name-addr-test]# ldd --version
ldd (GNU libc) 2.34
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

[root@vmail4 name-addr-test]# time ./getaddrinfo cluster1.eu.messagelabs.com
Hostname:       cluster1.eu.messagelabs.com
Addresses:      195.245.231.74 85.158.142.213 195.245.230.197 195.245.231.67 85.158.142.217 195.245.230.192

real    0m0.059s
user    0m0.002s
sys     0m0.001s

[root@vmail4 name-addr-test]# time ./getnameinfo 154.52.2.232
Hostname:       smtpfra7.fortimailcloud.com
Address:        154.52.2.232

real    0m0.009s
user    0m0.000s
sys     0m0.002s

===========================================================================

As you can see:

1. getaddrinfofails on both systems (Rocky 8 and 9) on ALL my tests until now.

2. getaddrinfo works fine in other cases (for the test I used the primary MX of bbc.co.uk).

3. dig works fine every time.

4. getnameinfo works fine every time.

I believe you could reproduce the above results on any Rocky 8 / 9 box.

I hope the above tests may be of help in troubleshooting the problem: Why getaddrinfo fails with smtpfra7.fortimailcloud.com?

I am at your disposal for any additional tests and I look forward to your advice.

Thanks for all your kind help.

All the best,
Nick


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to