Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix and fetchmail gethostbyname probs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Light
n00b
n00b


Joined: 15 Jun 2004
Posts: 21
Location: Netherlands

PostPosted: Tue Jun 15, 2004 6:54 am    Post subject: Postfix and fetchmail gethostbyname probs Reply with quote

First, fetchmail. Or better, fetchmailconf. I can't seem to find the cause of this error.
Code:
bash-2.05b$ fetchmailconf
Traceback (most recent call last):
  File "/usr/bin/fetchmailconf", line 2028, in ?
    hostname = socket.gethostbyaddr(socket.gethostname())[0]
socket.gaierror: (-2, 'Name or service not known')


Although, on second thought, could it be that fetchmailconf requires a fully qualified hostname (or a hostname in /etc/hosts )?

Also postfix comes with an error:
Code:
postfix: fatal: gethostbyname: no such file or directory

This doesn't make any sense at all, since gethostbyname should not be a file or directory but just a standard function call.

I am running fetchmail 6.2.5 and postfix 2.0.19, both have been emerged after installing Gentoo over the weekend.

Any help is welcome.
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Tue Jun 15, 2004 12:53 pm    Post subject: Reply with quote

gethostbyname() fails because it has problems with /etc/resolv.conf, /etc/hosts or something similar. please post `ls -al /etc/resolv.conf /etc/hosts /etc/hostname` and also contents of these files.
Back to top
View user's profile Send private message
Light
n00b
n00b


Joined: 15 Jun 2004
Posts: 21
Location: Netherlands

PostPosted: Wed Jun 16, 2004 10:18 am    Post subject: Reply with quote

The problem was that I did not have my hostname in /etc/hosts. Since I'm on a private network without DNS servers it was not possible to resolv the hostname. After I added my hostname and the corresponding IP address to /etc/hosts the problem was solved. It still wonders me that I didn't think of this before I actually started this topic.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum