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[5607]: connect from localhost.localdomain[127.0.0.1]
Jul 21 06:54:42 web-system postfix/smtpd[5607]: C168B93808C: client=localhost.localdomain[127.0.0.1]
Jul 21 06:54:42 web-system postfix/cleanup[5610]: C168B93808C: message-id=<5840482.421216637682746.JavaMail.tomcat@web-system.local>
Jul 21 06:54:42 web-system postfix/qmgr[31232]: C168B93808C: from=<support@site.com>, size=990, nrcpt=2 (queue active)
Jul 21 06:54:42 web-system postfix/smtpd[5607]: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 06:55:02 web-system postfix/smtp[5611]: C168B93808C: to=<user@bluewin.ch>, 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)
Why the mails were deferred and why the hosts were not found? Also do you have an idea why from relay.kabelmail.de we got "Access denied"? How to make mail to be sent immediatelly?
You can find the config files of Postfix attached to this question.