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
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
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
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
I think you will have to set your hosts file to
192.168.1.13 schoenberg.ccellist.net schoenberg
Thank you, I tried that and it worked perfectly! Seems so silly... Live and learn I suppose.
|All times are GMT -5. The time now is 07:07 PM.|