1

Topic: file /etc/host and DNS

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
==== ==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Linux ubuntu 12.04LTS
- Related log if you're reporting an issue:
====
Hi.
I have two postservers in local net (first - iRedMail, sec - other)
In file /etc/hosts
====
192.168.1.2 - other.post
====
The iRedMail not resolved name from file /etc/hosts
How do to do iRedMail read hosts?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: file /etc/host and DNS

Hoper wrote:

The iRedMail not resolved name from file /etc/hosts
How do to do iRedMail read hosts?

I guess you mean Postfix doesn't solve name from /etc/hosts, right?
Postfix is chrooted under /var/spool/postfix/ by default, and you MUST copy /etc/hosts to /var/spool/postfix/etc/hosts, then Postfix will solve names in /etc/hosts (actually, /var/spool/postfix/etc/hosts).

iRedMail copies /etc/hosts during installation, maybe you updated /etc/hosts later but forgot to sync them?

3

Re: file /etc/host and DNS

Yes, I added to /etc/hosts after instalation iRedMail.
Now I have a record in to /etc/hosts
192.168.1.2  m2.dom.my
In the file /var/spool/postfix/etc/hosts
this record too.
192.168.1.2  m2.dom.my
May be postfix got after restart  all server from /etc/hosts
But the problem persists.

$ postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
2244784DF8     1492 Wed Mar 20 15:26:12  user1@m1.dom.my
             (connect to m2.dom.my[1.2.3.4]:25: Connection timed out)
                                         user@m2.dom.my

1.2.3.4 it's white IP for domain m2.dom.my
I need iRedMail (postfix)  connect to m2.dom.my on IP (DMZ) 192.168.1.2

4

Re: file /etc/host and DNS

*) No idea yet, sorry. Did you restart Postfix service and try again?
*) It's a good idea to sync /var/spool/postfix/etc/resolv.conf with /etc/resolv.conf if you updated it.

5

Re: file /etc/host and DNS

Now I changed record in the /etc/hosts (del 192.168.1.2 m2.dom.my) and
$sudo service postfix restart
file /var/spool/postfix/etc/hosts was change, too (del 192.168.1.2 m2.dom.my)
It's mean the postfix sync files.

But the problem persists. sad

6

Re: file /etc/host and DNS

Maybe you need Postfix setting "smtp_host_lookup":
http://www.postfix.org/postconf.5.html#smtp_host_lookup

7

Re: file /etc/host and DNS

ZhangHuangbin wrote:

Maybe you need Postfix setting "smtp_host_lookup":
http://www.postfix.org/postconf.5.html#smtp_host_lookup

Yes, it's works.
Write in file /etc/postfix/main.cf
smtp_host_lookup = native
and
$sudo service postfix restart

message go to user with right path. smile