Hi everybody! I'm a postfix newbie. I installed two vitual machines on my windows xp via vmplayer. One is centos and the other is debian. I wanna configure mail server(postfix) on both servers. The basic informations of both servers are as below:
centos IP: 192.168.134.131 hostname: centos domain: zchdomain debian IP: 192.168.134.132 hostname: debiandb2 domain: zchdomain I successfully configured postfix on each server. So I can send or recevie mails on either server. Say, I could send a mail from [email protected] to [email protected]. And I also installed the mozilla thunderbird as the MUA, so I could use thunderbird to send and receive mails on both servers. But when I tried to sent a mail from [email protected] to [email protected], I failed. I got a message as below: --------------------------------Message------------------------------------------------------ Message 1: >From MAILER-DAEMON Thu Oct 15 21:35:02 2009 X-Original-To: [email protected] Delivered-To: [email protected] Date: Thu, 15 Oct 2009 21:35:02 +0800 (CST) From: [email protected] (Mail Delivery System) Subject: Undelivered Mail Returned to Sender To: [email protected] Auto-Submitted: auto-replied MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="F19593D0EC2.1255613702/centos.zchdomain" This is a MIME-encapsulated message. --F19593D0EC2.1255613702/centos.zchdomain Content-Description: Notification Content-Type: text/plain; charset=us-ascii This is the mail system at host centos.zchdomain. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. ...skipping one line For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system <[email protected]>: Host or domain name not found. Name service error for name=debaindb2.zchdomain type=A: Host not found --F19593D0EC2.1255613702/centos.zchdomain Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; centos.zchdomain X-Postfix-Queue-ID: F19593D0EC2 X-Postfix-Sender: rfc822; [email protected] Arrival-Date: Thu, 15 Oct 2009 21:35:01 +0800 (CST) Final-Recipient: rfc822; [email protected] Action: failed Status: 5.4.4 Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error ...skipping 23 lines -----------------------------------Message------------------------------------------------------ I guessed this happened because the postfix could not find the domain. So I took the 2 steps below to solve the problem. Step1. I modified the file /etc/hosts on both servers as blow: ----------------------------------------/etc/hosts contents--------------------------------- 127.0.0.1 localhost 192.168.134.132 debiandb2.zchdomain 192.168.134.131 centos.zchdomain ----------------------------------------/etc/hosts contents--------------------------------- After the modify, I can ping the other server using the hostname instead of ip: ping centos.zchdomain or ping debian.zchdomain So it seems worked. But when I tried to send mail between the servers, I got the same error message. So I took step2: Step2: I installed and configured apache on the centos successfully. I could get the right web page at the URL: www.localhost.com or www.centos.zchdomain on the centos server. I could also success on the debian server at the URL: www.centos.zchdomain. The web server seemed work fine without a DNS server, however, the mail server did not follow this. I got the very same error message!!!. After getting these failures, I guess the mail server(postfix) do not work the same way as the web server. When the web browser meets a new URL, it first find at the /etc/hosts file, if it got none, then it will go to the DNS server. But the mail server (postfix) will go to the DNS server first to check if there is a domain name (zchdomain in my case). I got no DNS server, so I failed. So should I build another DNS server to solve this problem? Any advise is appreciated. Thank you! -------------- zch.open 2009-10-15
