We have Web server with Java web application running on OS: Centos 5, Kernel: 2.6.18-8.1.10.el5PAE. On the same server Postfix is running as well. We sent emails from Java application to Postfix (on the localhost:25).
The problem we experience is delayed delivery of sent emails (e.g. emails are received with 10-60 minutes delay). But, some mails are sent immediatelly.
In the mailog, for the mail which had a delayed delivery, we have found next:
Jul 21 06:54:42 web-system postfix/smtpd: connect from localhost.localdomain[127.0.0.1]
Jul 21 06:54:42 web-system postfix/smtpd: C168B93808C: client=localhost.localdomain[127.0.0.1]
Jul 21 06:54:42 web-system postfix/cleanup: C168B93808C: message-id=<5840482.421216637682746.JavaMail.email@example.com>
Jul 21 06:54:42 web-system postfix/qmgr: C168B93808C: from=<firstname.lastname@example.org>, size=990, nrcpt=2 (queue active)
Jul 21 06:54:42 web-system postfix/smtpd: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 06:55:02 web-system postfix/smtp: C168B93808C: to=<email@example.com>, relay=none, delay=20, delays=0.04/0.07/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=bluewin.ch type=MX: Host not found, try again)