Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I configured a DNS service using bind. It works and I created a domain named test.com . The problem is not in how I configured bind, I already have a positive feedback: I tested it using dig, which returns 192.168.13.3 if I ask the IP address of mail.test.com .

I am now trying to assign an IP address to my postfix server, in a way that I can use telnet passing directly mail.test.com as argument and not localhost, this way:

telnet -b mail.test.com 25

But if I try it, it says:

trying 192.168.13.3...
telnet: connect to address 192.168.13.3: No route to host
trying 2000:0:13::3
telnet: connect to address 2000:0:13::1: Network is unreachable

For how setting the postfix IP address I followed this answer: http://serverfault.com/a/489308/168676

And this is how I've set it in the master.cf file (I am only showing the modified part):

smtp      unix  -       -       n       -       -       smtp
    -o smtp_bind_address= 192.168.13.3
relay     unix  -       -       n       -       -       smtp
    -o smtp_bind_address= 192.168.13.3
    -o smtp_fallback_relay=

For editing main.cf I followed this guide: http://fedorasolved.org/server-solutions/postfix-mail-server

And here I'll show the edited parts:

myhostname = mail.test.com
mydomain = test.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = host

Of course before trying to connect via telnet to postfix, I've made it start:

sudo /sbin/service postfix start

If I try it with localhost it works and I am able to send mails. So I guess that the problem is in configuring the IP address.

Additional details

ifconfig output:

[root@localhost postfix]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.13.100  netmask 255.255.255.0  broadcast 192.168.13.255
        inet6 fec0::fea9:21c:42ff:fe07:555d  prefixlen 64  scopeid 0x40<site>
        inet6 fe80::21c:42ff:fe07:555d  prefixlen 64  scopeid 0x20<link>
        ether 00:1c:42:07:55:5d  txqueuelen 1000  (Ethernet)
        RX packets 12356  bytes 8090462 (7.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10247  bytes 1423127 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 375  bytes 30453 (29.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 375  bytes 30453 (29.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

PS: the DNS is reachable at 192.168.13.100, I've manually set it this way:

sudo ifconfig eth0 192.168.13.100 netmask 255.255.255.0 broadcast 192.168.13.255

Feel free to ask more info.

share|improve this question
    
Can you post your ifconfig output? –  NickW Apr 9 '13 at 10:30
    
I added the ifconfig output to the question. –  user168676 Apr 9 '13 at 10:41
    
Maybe I'm starting with too obvious, but can you actually ping mail.test.com. This definitely is a network issue, not a bind or postfix one. –  Tonin Apr 9 '13 at 10:57
    
Run this sudo ifconfig eth0:0 192.168.13.3 netmask 255.255.255.0 broadcast 192.168.13.255 then restart postfix, and see what happens (with or without the inet_interfaces option set). –  NickW Apr 9 '13 at 11:26

1 Answer 1

You just need to create an interface to bind the 192.168.13.3 address to, you can create a subinterface eth0:0 for example, then bring that up and restart postfix, which will then also bind to the new interface.

share|improve this answer
    
Do you mean that I need to do that changing the inet_interfaces value in main.cf? –  user168676 Apr 9 '13 at 11:12
    
By default postfix will bind to all of the local addresses it finds, if you want it to only bind to a certain local address, use this in main.cf inet_interfaces = 192.168.13.3,127.0.0.1 but first make sure the IP exists on your server! –  NickW Apr 9 '13 at 11:18
    
If I set this value postfix fails to start: it says "Job failed. See system journal and 'systemctl status' for details." . –  user168676 Apr 9 '13 at 19:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.