Dispatching emails to Postfix server really slow

0

I've setup a small web application using network of virtual servers running on ESXi. All VMs host Fedora 27. I have 2 of these setups. One for testing and one for production. All internal hardware and software configuration is identical. 2 of the servers need to communicate internally to send email notifications from webapp running in Tomcat to the Postfix SMTP server.

When i ran a test on the test setup to send out 20 emails to my self it takes me about 2 seconds to dump them into Postfix queue. The same test takes 12 minutes on production setup. The only thing that differs between the setup is, the external IPs used and respectively the DNS Servers provided by the ISP. Today I installed Sendmail on several VMs and configured it to relay all emails to Postfix server.

I ran a shell script to dispatch 20 emails and the result was the same. The issue seems to be network wide. I am contacting Postfix server using its internal IP address. I've read that bad DNS configuration could cause this. I'm not sure this is the case in my setup since i have 2 of them and one works flawlessly. Any one can recommend some ideas or tools as to how i can debug this issue? I've been struggling for over a month now. Thank you for taking the time to read this.

Little part of Postfix log

Feb 16 09:09:18 mail postfix/smtpd[21783]: 2B1C85000061: client=unknown[IP]<br>
Feb 16 09:09:18 mail postfix/cleanup[21786]: 2B1C85000061: message-id=<##########@FQDN><br>
Feb 16 09:09:18 mail postfix/qmgr[17387]: 2B1C85000061: from=<name@email.com>, size=615, nrcpt=1 (queue active)<br>
Feb 16 09:09:18 mail postfix/smtpd[21783]: disconnect from unknown[IP] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5<br>
Feb 16 09:09:18 mail postfix/smtp[21787]: 2B1C85000061: to=<name@email.net>, relay=DOMAIN[IP]:25, delay=0.27, delays=0.04/0/0.05/0.18, dsn=2.0.0, status=sent (250 Ok: queued as ##########)<br>
Feb 16 09:09:18 mail postfix/qmgr[17387]: 2B1C85000061: removed

Michael

Posted 2018-02-16T16:12:09.810

Reputation: 1

Is there anything relevant in the Postfix log? – mtak – 2018-02-16T16:17:16.360

The only thing relevant that i can see in the Postfix log is that there is a time gap between each connection from the client to send each email. – Michael – 2018-02-16T16:46:58.693

What is RTT (Round Trip Time/ping reply time) between your client and the server? Do you use single SMTP session to send all (20) messages? – AnFi – 2018-02-16T19:08:28.333

Generally we open new connection for each email notification but for the test i used single session to send 20 emails. Here are the ping results but usually i have ping blocked in firewall daemon. 64 bytes from IP: icmp_seq=1 ttl=64 time=0.185 ms 64 bytes from IP: icmp_seq=2 ttl=64 time=0.419 ms 64 bytes from IP: icmp_seq=3 ttl=64 time=0.304 ms – Michael – 2018-02-19T16:43:46.647

No answers