LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-13-2004, 10:12 PM   #1
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Rep: Reputation: 16
postfix: fatal: gethostbyname: No such file or directory


First, I apologize if this has been asked to death. I've checked Google and searched this site, but nothing has really applied. I hope someone has a good answer for this because I sure can't figure it out!

I have installed Gentoo through the internet according to their handbook, and so far so good except for one thing. When I try to run postfix check, I get the message of the subject heading. I've set /etc/hosts to read

127.0.0.1 localhost
192.168.1.13 ccellist.net (my personal computer domain, not at all linked to any DNS server anywhere, just a domain I want to use to send mail using postfix)

As instructed by the Gentoo handbook I did "echo 'schoenberg' > /etc/hostname" which set my hostname to "schoenberg". Then I did "echo 'ccellist.net' > /etc/dnsdomainname" which in theory should have set my dns domain name for use with Postfix, etc.

However, postfix doesn't work as you can see. When I type "hostname -f" I get

$ hostname -vf
gethostname()=`schoenberg'
Resolving `schoenberg.ccellist.net' ...
hostname: Unknown host

In order to fix it I tried setting hostname to "schoenberg.ccellist.net", but that gives me a similar error message when I say "hostname -f". Oh, and postfix check still fails.

Now, I know this is likely because there is no known host on the DNS server I'm using that uses that name, but this didn't seem to be a problem with some other distros I've used as they let me use Postfix just fine. Is there a postfix setting that isn't working, is there something I'm overlooking? How do I setup postfix so it will work in this scenario where I haven't purchased a domain name (I don't need to, I just want to be able to send mail as a mailserver, not to receive it)?

I'm including the contents of main.cf for your perusal. Thanks for the help.

(output of 'less /etc/postfix/main.cf | grep -v "#"):

debug_peer_level = 2


debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5


sendmail_path = /usr/sbin/sendmail

newaliases_path = /usr/bin/newaliases

mailq_path = /usr/bin/mailq

setgid_group = postdrop

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.0.19/sample

readme_directory = /usr/share/doc/postfix-2.0.19/readme
default_destination_concurrency_limit = 2
alias_database = hash:/etc/mail/aliases
local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases

Last edited by cellist; 04-13-2004 at 10:15 PM.
 
Old 04-15-2004, 01:42 PM   #2
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
I think you will have to set your hosts file to
192.168.1.13 schoenberg.ccellist.net schoenberg
 
Old 04-16-2004, 09:21 PM   #3
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Original Poster
Rep: Reputation: 16
Thank you, I tried that and it worked perfectly! Seems so silly... Live and learn I suppose.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix authentication against Active Directory mardanian Slackware 3 07-19-2010 12:55 AM
Postfix LDAP lookups with Active Directory paul_mat Linux - Networking 1 11-02-2005 08:44 PM
awk: fatal:cannot open file for reading (no such file or Directory) in Linux sangati vishwanath Linux - Software 4 07-06-2005 12:59 AM
Starting Postfix: execvp: No such file or directory Mateo1041 Linux - Software 0 06-16-2005 10:03 AM
Postfix No such file or directory error on receiving mail jimieee Linux - Software 1 03-26-2004 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration