I see.
Domain name can be obtained from 'echo $(hostname -d)' in BASH.
So 'hostname -d' correctly returns my domain name.
[root@mail ]# ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:16:1D:A8
inet addr:202.201.34.174 Bcast:202.201.34.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe16:1da8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:312561785 errors:0 dropped:0 overruns:0 frame:0
TX packets:6483830 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:226692335816 (211.1 GiB) TX bytes:3479993172 (3.2 GiB)
eth0:1 Link encap:Ethernet HWaddr 52:54:00:16:1D:A8
inet addr:202.201.48.176 Bcast:202.201.48.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:4 Link encap:Ethernet HWaddr 52:54:00:16:1D:A8
inet addr:202.201.48.177 Bcast:202.201.48.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:5 Link encap:Ethernet HWaddr 52:54:00:16:1D:A8
inet addr:202.201.48.178 Bcast:202.201.48.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth1 Link encap:Ethernet HWaddr 52:54:00:62:7F:FE
inet addr:10.10.10.31 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe62:7ffe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2706268 errors:0 dropped:0 overruns:0 frame:0
TX packets:980663 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:305381837 (291.2 MiB) TX bytes:1078413128 (1.0 GiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2873706 errors:0 dropped:0 overruns:0 frame:0
TX packets:2873706 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1755203277 (1.6 GiB) TX bytes:1755203277 (1.6 GiB)
The main and shared IP of the Kloxo is 202.201.48.176 on eth0:1, but /etc/hosts looks like:
[root@mail ]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
### begin - add by Kloxo-MR
202.201.34.174 mail.mydomain.com mail
### end - add by Kloxo-MR
I used 192.168.*.* just for the purpose of illustration, but kloxo is actually sending with from address set to 'kloxo@111.111.111.11' which is the public IP of the server. Why isn't it using the domain name?
I didn't change original 'design' from Kloxo Official related to 'from' mail.
So, if change to domain name, what's domain name based on?.