Setting hostname - fake and real
Luke Kearney
lukek at meibin.net
Wed Mar 9 00:22:48 PST 2005
On Wed, 9 Mar 2005 08:09:19 +0000
Ben Paley <ben at spooty.net> spake thus:
> Hello,
>
> Is there an easy way to set a fake hostname in rc.conf which will let sendmail
> send mail to external domains?
>
> For ages I've had the line in rc.conf
>
> hostname="potato.fake_domain.net"
>
> (not exactly, but you see what I mean...) and I've had no problems with it at
> all. Recently I've tried to set up sendmail, only so I can test php or perl
> scripts that send emails!
>
> Sending to localhost works fine, but mail to an external address is returned
> by the remote domain because it couldn't verify my domain. Very sensible, I
> could be a spammer. So I edited rc.conf to say
>
> hostname="potato.real_domain.net"
>
> that is, I used the name of a real domain which is registered to me. The
> domain is hosted on the net, but AFAIK they don't have a machine called
> "potato". Now apache won't start and I get weird errors in other things, like
> shutting down X even!
>
> Can anyone help?
>
> Thanks very much,
> Ben
Hello Ben
Sounds like you might need some DNS magic here. I am not entirely sure I
understand why you would want to use fake dns names. It won't really
work properly and if testing scripts that send mail is the goal then a
FQDN is probably a good idea. Do you control the DNS for your 'real'
domain? If so add your host potato and if possible get a reverse DNS
entry to match.
For apache and X edit /etc/hosts and put the real information there and
your problems should go away.
HTH
LukeK
--
<>
More information about the freebsd-questions
mailing list