Re: "hostname" question during Debian installation

2012-09-13 Thread Martin T
Hello,

in order to wrap this hostname question up, then hostname set during
the Debian installation is:

1) mapped to an address from 127.0.0.0/8 range in /etc/hosts file.
Specifically to IPv4 address 127.0.1.1
2) written to MTA(for example exim4) configuration file
3) written to /etc/mailname
4) written to /etc/hostname file


Are there any local services which listen on hostname(127.0.1.1)
address? As much as I have seen, they(for example Internet Printing
Protocol or SMTP) all use localhost(127.0.0.1) address instead.

Last but not least, is somebody able to name few utilities which use
hostname for various purposes? I could name mail  transfer agents.


regards,
Martin


2012/3/20 Bob Proulx :
> Tom H wrote:
>> >> What I find somewhat weird is that when you install Debian,
>> >> "/etc/hostname" and "/etc/mailname" are the same.
>> >> So if it's "box.company.internal" and bob runs "mail tom", bob's
>> >> address'll be "bob@box.company.internal".
>> >
>> > Yes. Seems reasonable to me. That is exactly what I want. It is
>> > traditional BSD/Unix behavior.
>>
>> But the address should be "bob@company.internal"!
>
> If that is what you desire (it isn't what I want) then it is probably
> easiest to set myorigin through /etc/mailname.  There are also a
> number of other possibilities including masquading and various Postfix
> addresses rewriting processes.
>
>> > It would be perfectly nice if the package installation dialog were to
>> > ask the user if they want to set up address masquerading and to do it
>> > automatically. But for anyone who wants it the configuration is very
>> > easily accomplished with one of the above. I prefer to leave
>> > /etc/mailname along and to configure postfix explicitly. Then I can
>> > control over masquerade_classes and local_header_rewrite_clients too.
>>
>> IIUC, what you mean by masquerading is that if you send an email from
>> "box.company.internal", the email address is "bob@company.internal"
>> rather than "bob@box.company.internal".
>
> Yes.  That is correct.  But not sure if we are poking at the "box"
> removal part or the ".internal" part.  I guess pedantically I would
> say yes to both if that is the hostname and fqdn.  But I would
> probably have a different domain name and not be using an ".internal"
> name.  If I were actually using a ".internal" name then I would
> probably be wanting to do address rewriting.  But it is my turn to say
> that I have never been in an environment that actually used that type
> of name strategy.
>
>> I've never worked in or set up an environment where the sender's
>> address is "bob@box.company.internal". But this explains why you
>> didn't think "bob@box.company.internal" above was wrong.
>
> If company.internal is the name of the dns domain then that seems
> a reasonable default to me.  Because 99.44% of the time it will be
> something really reasonable such as example.com which is actually a
> real domain name.  I figure anyone that is actually using a literal
> ".internal" domain name would also know what they are doing and set up
> some type of address translation for it.  But if they are setting up a
> box trouble.proulx.com for example then I would expect the mail to
> come from u...@trouble.proulx.com.  :-)
>
>> Anyway, I don't think that their argument was about masquerading; it
>> was about what the canonical form of "/etc/mailname" should be.
>
> Whatever the result it is easy to change /etc/mailname to be correct.
> But if it should be enhanced to have a specific question then an
> enhancement request to exim and postfix both would probably be in
> order since neither of them ask about it but just assume and set it.
>
>> "dpkg-reconfigure postfix" doesn't change "myhostname" either with a
>> prompt for a hostname or through a "hostname" call so if you change
>> the box's hostname, you have to edit "/etc/postfix.main.cf" by hand.
>
> It doesn't seem to.  I suppose it should.  But it does edit
> /etc/mailname and that is probably enough.  I am sure that is what the
> postfix maintainer is thinking.
>
>> >> You can then change "/etc/hostname"
>> Changing /etc/hostname has no effect for postfix.
>> >> and "/etc/mailname", install postfix, and see what gets pulled in as
>> >> "myhostname" into "/etc/postfix/main.cf".
>> >
>> > Changing mailname

Re: "hostname" question during Debian installation

2012-03-19 Thread Bob Proulx
Tom H wrote:
> >> What I find somewhat weird is that when you install Debian,
> >> "/etc/hostname" and "/etc/mailname" are the same.
> >> So if it's "box.company.internal" and bob runs "mail tom", bob's
> >> address'll be "bob@box.company.internal".
> >
> > Yes. Seems reasonable to me. That is exactly what I want. It is
> > traditional BSD/Unix behavior.
> 
> But the address should be "bob@company.internal"!

If that is what you desire (it isn't what I want) then it is probably
easiest to set myorigin through /etc/mailname.  There are also a
number of other possibilities including masquading and various Postfix
addresses rewriting processes.

> > It would be perfectly nice if the package installation dialog were to
> > ask the user if they want to set up address masquerading and to do it
> > automatically. But for anyone who wants it the configuration is very
> > easily accomplished with one of the above. I prefer to leave
> > /etc/mailname along and to configure postfix explicitly. Then I can
> > control over masquerade_classes and local_header_rewrite_clients too.
> 
> IIUC, what you mean by masquerading is that if you send an email from
> "box.company.internal", the email address is "bob@company.internal"
> rather than "bob@box.company.internal".

Yes.  That is correct.  But not sure if we are poking at the "box"
removal part or the ".internal" part.  I guess pedantically I would
say yes to both if that is the hostname and fqdn.  But I would
probably have a different domain name and not be using an ".internal"
name.  If I were actually using a ".internal" name then I would
probably be wanting to do address rewriting.  But it is my turn to say
that I have never been in an environment that actually used that type
of name strategy.

> I've never worked in or set up an environment where the sender's
> address is "bob@box.company.internal". But this explains why you
> didn't think "bob@box.company.internal" above was wrong.

If company.internal is the name of the dns domain then that seems
a reasonable default to me.  Because 99.44% of the time it will be
something really reasonable such as example.com which is actually a
real domain name.  I figure anyone that is actually using a literal
".internal" domain name would also know what they are doing and set up
some type of address translation for it.  But if they are setting up a
box trouble.proulx.com for example then I would expect the mail to
come from u...@trouble.proulx.com.  :-)

> Anyway, I don't think that their argument was about masquerading; it
> was about what the canonical form of "/etc/mailname" should be.

Whatever the result it is easy to change /etc/mailname to be correct.
But if it should be enhanced to have a specific question then an
enhancement request to exim and postfix both would probably be in
order since neither of them ask about it but just assume and set it.

> "dpkg-reconfigure postfix" doesn't change "myhostname" either with a
> prompt for a hostname or through a "hostname" call so if you change
> the box's hostname, you have to edit "/etc/postfix.main.cf" by hand.

It doesn't seem to.  I suppose it should.  But it does edit
/etc/mailname and that is probably enough.  I am sure that is what the
postfix maintainer is thinking.

> >> You can then change "/etc/hostname"
> Changing /etc/hostname has no effect for postfix.
> >> and "/etc/mailname", install postfix, and see what gets pulled in as
> >> "myhostname" into "/etc/postfix/main.cf".
> >
> > Changing mailname doesn't really have an effect on the
> > /etc/postfix/main.cf configuration. Because there is a Debian
> > specific patch to in enable reading myorigin from a file. So it has
> > an effect only through the patched code that pulls in the value
> > dynamically when postfix starts from /etc/mailname instead of needing
> > to specify myorigin in the main.cf file explicitly.
> 
> I don't follow. Changing "/etc/mailname" changes "myorigin" because of
> that patch.

Right.  But it doesn't cause the postinst script or any other process
to change main.cf.  So above you postulated that setting hostname and
mailname could possibly affect the settings in main.cf.  But they
don't.  The main.cf file won't be changed regardless of what is set in
mailname due to using the contents dynamically.

> (I usually change "myorigin = /etc/mailname" to its actual
> value on my boxes...)

I don't need to now but previously used to ensure that myhostname was
set and then remove the myorigin line.  Then it defaults to
myhostname.  But of course if you want to masquarade then myorigin
makes sense.

> Anyway, I was only suggesting the "mailname" change because on my
> boxes "hostname" and "mailname" are the same and I just wanted to
> ensure that they were different to trace what info the installer is
> picked up from where by the installer.

Good.  "A good pilot is always learning."  :-)

Bob


signature.asc
Description: Digital signature


Re: "hostname" question during Debian installation

2012-02-27 Thread Tom H
>> I'm going to try it too.
>
> Ha! Beat you to it! :-)

:)

I'd forgotten about this hostname and postfix business until your
email arrived last Monday but I haven't had the time to do my (far
less thorough) test.



On Sun, Feb 19, 2012 at 4:46 PM, Bob Proulx  wrote:
> Tom H wrote:
>> >> Bob Proulx wrote:



>> AFAIR, "myhostname" is "/etc/hostname"
>
> Not quite. For Debian's Postfix configuration the postfix myhostname
> variable is set to the fqdn in /etc/postfix/main.cf. Postfix requires
> myhostname to be the fqdn. The default value for Postfix is to use
> the value of `hostname`. However in Debian the default hostname is
> the short hostname without the domain name. Therefore Postfix's
> default of `hostname` isn't suitable and must be supplemented by
> setting the FQDN explicitly.
>
> Well... What I said wasn't quite true. It is the summary of the
> overall result. What Postfix actually does is somewhat circular.
> Here are the official docs and a somewhat longer explanation.
>
> mydomain (default: see "postconf -d" output)
>
>   The internet domain name of this mail system. The default is to
>   use $myhostname minus the first component, or "localdomain"
>   (Postfix 2.3 and later). $mydomain is used as a default value for
>   many other configuration parameters.
>
> myhostname (default: see "postconf -d" output)
>
>   The internet hostname of this mail system. The default is to use
>   the fully-qualified domain name (FQDN) from gethostname(), or to
>   use the non-FQDN result from gethostname() and append
>   ".$mydomain". $myhostname is used as a default value for many
>   other configuration parameters.
>
> If not set then it sets mydomain from the fqdn obtained from hostname
> or to localdomain if that isn't a fqdn.  On Debian with a short
> hostname set that means mydomain always defaults to localdomain.
>
> If not set then it sets myhostname from the non-fqdn obtained from
> hostname and appends mydomain. On Debian with a short hostname that
> means myhostname always defaults to somename.localdomain. And if the
> hostname was chosen to be localhost then it would default to
> localhost.localdomain which is one consistent and desirable strategy
> for thin client systems without a network and without a network domain
> name.
>
> [Postfix was born on systems where the hostname was normally set to
> the fqdn. In that environment the above makes a lot of sense. On
> Debian with the short hostname it means that myhostname should always
> be set to provide that supplemental domain name information.]

I set "/etc/hostname" to the fqdn so my memory was correct but my
setup non-standard. Apologies for the misinformation!



>> and "myorigin" is "/etc/mailname".
>
> Yes. If an MTA has been installed. That file does not exist if no
> MTA has been installed.
>
>> What I find somewhat weird is that when you install Debian,
>> "/etc/hostname" and "/etc/mailname" are the same.
>
> They are only the same if you choose a fqdn for the hostname. By your
> comment I read that it implies that you do choose a fqdn for your
> hostnames? (And that you always choose either "Standard system" or
> otherwise install an MTA?) That is why they would be the same for
> you. If you choose a short name for the hostname, which is the worded
> with recommendation from the debian-installer and so most people
> probably choose it, then they are different. /etc/hostname will be
> the short name and /etc/mailname will be the fqdn.

I usually use preseed with
d-i netcfg/get_hostname string box
d-i netcfg/get_domain string company.internal
but then overwrite "/etc/hostname" with the fqdn in "late_command" and
install various packages starting with
tasksel tasksel/first multiselect standard
I'll have to try
d-i netcfg/get_hostname string box.company.internal



>> What I find somewhat weird is that when you install Debian,
>> "/etc/hostname" and "/etc/mailname" are the same.
>> So if it's "box.company.internal" and bob runs "mail tom", bob's
>> address'll be "bob@box.company.internal".
>
> Yes. Seems reasonable to me. That is exactly what I want. It is
> traditional BSD/Unix behavior.

But the address should be "bob@company.internal"!



>> There was a debian-devel thread where there was an argument about
>> whether "/etc/mailname" should be "box.company.internal" or
>> "company.internal".
>
> Oh! Well... If you want address masquarading then I think that
> should be an explicit choice. I wouldn't default to address
> masquarading by default. That would be wrong for many environments.
> It assumes that an environment has a central mail relay to handle mail
> for the entire domain and it routes all mail through that central mail
> relay. But in a simple environment with a few machines (or several
> thousand) that wants email to route directly from machine to machine
> then that is the wrong configuration. I have environments both ways.
> It is easy enough to set up address masquarading if desired.
>
> Either set the local domain in /e

Re: "hostname" question during Debian installation

2012-02-19 Thread Bob Proulx
Tom H wrote:
> >> Bob Proulx wrote:
> >>> Yes. And also to /etc/postfix/main.cf if postfix is installed.  Or to
> >>> other places if other MTAs are installed.
> >>
> >> When you use "dpkg-reconfigure exim4-config" or "dpkg-reconfigure
> >> postfix", "/etc/mailname" is updated; in postfix's case because "my
> >> origin" is set to it in "/etc/postfix/main.cf".
> >
> > I thought it set 'myhostname'.  No?  I should try a pristine
> > installation and look.

And a quite long response from doing this results below.  :-)

> AFAIR, "myhostname" is "/etc/hostname"

Not quite.  For Debian's Postfix configuration the postfix myhostname
variable is set to the fqdn in /etc/postfix/main.cf.  Postfix requires
myhostname to be the fqdn.  The default value for Postfix is to use
the value of `hostname`.  However in Debian the default hostname is
the short hostname without the domain name.  Therefore Postfix's
default of `hostname` isn't suitable and must be supplemented by
setting the FQDN explicitly.

Well...  What I said wasn't quite true.  It is the summary of the
overall result.  What Postfix actually does is somewhat circular.
Here are the official docs and a somewhat longer explanation.

  mydomain (default: see "postconf -d" output)

  The internet domain name of this mail system. The default is to
  use $myhostname minus the first component, or "localdomain"
  (Postfix 2.3 and later). $mydomain is used as a default value for
  many other configuration parameters.

  myhostname (default: see "postconf -d" output)

  The internet hostname of this mail system. The default is to use
  the fully-qualified domain name (FQDN) from gethostname(), or to
  use the non-FQDN result from gethostname() and append
  ".$mydomain". $myhostname is used as a default value for many
  other configuration parameters.

If not set then it sets mydomain from the fqdn obtained from hostname
or to localdomain if that isn't a fqdn.  On Debian with a short
hostname set that means mydomain always defaults to localdomain.

If not set then it sets myhostname from the non-fqdn obtained from
hostname and appends mydomain.  On Debian with a short hostname that
means myhostname always defaults to somename.localdomain.  And if the
hostname was chosen to be localhost then it would default to
localhost.localdomain which is one consistent and desirable strategy
for thin client systems without a network and without a network domain
name.

[Postfix was born on systems where the hostname was normally set to
the fqdn.  In that environment the above makes a lot of sense.  On
Debian with the short hostname it means that myhostname should always
be set to provide that supplemental domain name information.]

Something similar happens with Exim because exim4-config sets up
/etc/exim4/update-exim4.conf.conf with the fqdn too.

> and "myorigin" is "/etc/mailname".

Yes.  If an MTA has been installed.  That file does not exist if no
MTA has been installed.

> What I find somewhat weird is that when you install Debian,
> "/etc/hostname" and "/etc/mailname" are the same.

They are only the same if you choose a fqdn for the hostname.  By your
comment I read that it implies that you do choose a fqdn for your
hostnames?  (And that you always choose either "Standard system" or
otherwise install an MTA?)  That is why they would be the same for
you.  If you choose a short name for the hostname, which is the worded
with recommendation from the debian-installer and so most people
probably choose it, then they are different.  /etc/hostname will be
the short name and /etc/mailname will be the fqdn.

The debian-installer says:

  Please enter the hostname for this system.

  The hostname is a single word that identifies your system to the
  network.  If you don't know what your hostname should be, consult your
  network administrator.  If you are setting up your own home network,
  you can make something up here.

By saying "single word" and defaulting to a single word such as
"dhcp224" for the hostname I think most people wouldn't type in the
fully qualified domain name.  Although typing in a fqdn results in a
perfectly valid system configuration.  And if you do so then it
doesn't ask you for a domain name separately.  I always used to use
that configuration.  In previous releases I recall that the wording
was much more strong that it should not be the fqdn.  I would need to
try previous releases in order to know for sure but I think that
wording has been softened in Squeeze.

Additionally if you choose "Standard system utilities" from the task
selection menu then you get Exim installed since exim4 is graced with
being marked as "Priority: standard".  If you unselect that box then
you don't get any MTA installed (which I do in many configurations)
unless you have preseeded in Postfix or something else.  If you don't
have an MTA installed then /etc/mailname is also not installed.

In which case /etc/mailname is different from /etc/hostname by 

Re: "hostname" question during Debian installation

2012-02-15 Thread Tom H
On Wed, Feb 15, 2012 at 4:35 PM, Bob Proulx  wrote:
> Tom H wrote:
>> Bob Proulx wrote:


>>> Yes. And also to /etc/postfix/main.cf if postfix is installed.  Or to
>>> other places if other MTAs are installed.
>>
>> When you use "dpkg-reconfigure exim4-config" or "dpkg-reconfigure
>> postfix", "/etc/mailname" is updated; in postfix's case because "my
>> origin" is set to it in "/etc/postfix/main.cf".
>
> I thought it set 'myhostname'.  No?  I should try a pristine
> installation and look.

(Gmail's ever helpful autocorrect turned "myorigin" above into "my origin"...)

AFAIR, "myhostname" is "/etc/hostname" and "myorigin" is "/etc/mailname".

What I find somewhat weird is that when you install Debian,
"/etc/hostname" and "/etc/mailname" are the same. So if it's
"box.company.internal" and bob runs "mail tom", bob's address'll be
"bob@box.company.internal". That's fine when emailing on a box or from
one box to another within "company.internal".

There was a debian-devel thread where there was an argument about
whether "/etc/mailname" should be "box.company.internal" or
"company.internal".

If you you do a regular install or don't use a preseed that installs
postfix, you'll have exim4 by default. You can then change
"/etc/hostname" and "/etc/mailname", install postfix, and see what
gets pulled in as "myhostname" into "/etc/postfix/main.cf". I'm going
to try it too.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=szxpn9tarycdah5nhmdvjt5orig6tyn6rb3fu+c04s...@mail.gmail.com



Re: "hostname" question during Debian installation

2012-02-15 Thread Bob Proulx
Tom H wrote:
> Bob Proulx wrote:
> > Yes. And also to /etc/postfix/main.cf if postfix is installed.  Or to
> > other places if other MTAs are installed.
> 
> When you use "dpkg-reconfigure exim4-config" or "dpkg-reconfigure
> postfix", "/etc/mailname" is updated; in postfix's case because "my
> origin" is set to it in "/etc/postfix/main.cf".

I thought it set 'myhostname'.  No?  I should try a pristine
installation and look.

> Mutt also uses it but it can be overridden by "~/.muttrc".

Doesn't mutt simply use `hostname`?

> >> 3) written to "message of the day" file
> >
> > No.  The /etc/motd doesn't include the hostname.  You are thinking of
> > /etc/issue but it also doesn't include the hostname either.  It
> > may include @char and \char sequences which substitute the dynamically
> > hostname at runtime though.
> 
> "/etc/motd" is a symlink to "/var/run/motd", which is generated at
> boot by "/etc/init.d/bootlogs" and contains the output "uname -snrvm",
> so "/etc/motd" does contain a box's hostname.

You are right.  It does have the hostname.  But it isn't something
that needs to be updated.  It is fully dynamic.  I think it falls into
the category of things that /use/ the hostname but don't need to be
/set/ to it.

> >> 4) usually used in shell prompt(for example "\[\e]0;\u@\h:
> >> \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$")
> 
> Like "/etc/issue" (where the hostname's set by "/n"), the hostname in
> the prompt's set
>  by "\h" so it's changed dynamically at boot.

Yep.  So nothing needs to be done about it.

Bob


signature.asc
Description: Digital signature


Re: "hostname" question during Debian installation

2012-02-15 Thread Tom H
On Wed, Feb 15, 2012 at 2:12 AM, Bob Proulx  wrote:
> Martin T wrote:


>> thank you for replies! So am I correct, that hostname set during the
>> installation is:

You're welcome.


>> 1) mapped to an address from 127.0.0.0/8 range in /etc/hosts file
>
> Specifically 127.0.1.1 so that it is always available and doesn't
> conflict or confuse with 127.0.0.1 localhost.  The newer networking
> subsystem is event driven and supports hotplug devices.  It may come
> and go.  Having a local address 127.0.1.1 will always exist and will
> always map back to the hostname even if the main networking is
> unplugged.
>
> It's different from traditional systems but it solves problems
> introduced by event driven hotpluggable network devices.  It allows a
> system to always be able to contact itself and the reverse mapping of
> the IP address back to a name always maps back to itself.
>
> This is important on mobile devices which may be offline but is a
> consistent strategy and works well on non-mobile devices too.

+1

"libnss-myhostname" provides the same functionality as adding the
"127.0.1.1" line in "/etc/hosts".


>> 2) written to /etc/mailname
>
> Yes. And also to /etc/postfix/main.cf if postfix is installed.  Or to
> other places if other MTAs are installed.

When you use "dpkg-reconfigure exim4-config" or "dpkg-reconfigure
postfix", "/etc/mailname" is updated; in postfix's case because "my
origin" is set to it in "/etc/postfix/main.cf".

Mutt also uses it but it can be overridden by "~/.muttrc".


>> 3) written to "message of the day" file
>
> No.  The /etc/motd doesn't include the hostname.  You are thinking of
> /etc/issue but it also doesn't include the hostname either.  It
> may include @char and \char sequences which substitute the dynamically
> hostname at runtime though.

"/etc/motd" is a symlink to "/var/run/motd", which is generated at
boot by "/etc/init.d/bootlogs" and contains the output "uname -snrvm",
so "/etc/motd" does contain a box's hostname.


>> 4) usually used in shell prompt(for example "\[\e]0;\u@\h:
>> \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$")

Like "/etc/issue" (where the hostname's set by "/n"), the hostname in
the prompt's set
 by "\h" so it's changed dynamically at boot.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=SzOiK84jW+miJixSsagaa7=qhb6kyaaymdq1wsjkha...@mail.gmail.com



Re: "hostname" question during Debian installation

2012-02-14 Thread Bob Proulx
Martin T wrote:
> thank you for replies! So am I correct, that hostname set during the
> installation is:
> 
> 1) mapped to an address from 127.0.0.0/8 range in /etc/hosts file

Specifically 127.0.1.1 so that it is always available and doesn't
conflict or confuse with 127.0.0.1 localhost.  The newer networking
subsystem is event driven and supports hotplug devices.  It may come
and go.  Having a local address 127.0.1.1 will always exist and will
always map back to the hostname even if the main networking is
unplugged.

It's different from traditional systems but it solves problems
introduced by event driven hotpluggable network devices.  It allows a
system to always be able to contact itself and the reverse mapping of
the IP address back to a name always maps back to itself.

This is important on mobile devices which may be offline but is a
consistent strategy and works well on non-mobile devices too.

> 2) written to /etc/mailname

Yes.  And also to /etc/postfix/main.cf if postfix is installed.  Or to
other places if other MTAs are installed.

> 3) written to "message of the day" file

No.  The /etc/motd doesn't include the hostname.  You are thinking of
/etc/issue but it also doesn't include the hostname either.  It
may include @char and \char sequences which substitute the dynamically
hostname at runtime though.

> 4) usually used in shell prompt(for example "\[\e]0;\u@\h:
> \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$")

Yes.  But lots of programs use the hostname with emphasis on "use".
But you will have a very long list if you head down that path of
discovery.

> ..and this is it? Or did I miss any other uses of the "hostname"?

You missed the most important and primary use of it! :-)

  /etc/hostname

The /etc/hostname is read at boot time and sets the hostname.

> For some reason I always thought that hostname is definitely used by
> at least other hosts in the LAN and local processing running in the
> server, but turns out out was wrong(?). I mean one needs to
> configure local processes(for example cupsd or snmpd) to use
> "hostname" IP address if he wants to- by default they all use
> 127.0.0.1 which is mapped to "localhost" in /etc/hosts file.

For the most part only processes local to the system need to know the
hostname.  By default the system is a pure client.  If you want to
contact the host from other systems then it is convenient to register
a DNS name to ip address mapping for it so that you can refer to the
host by a hostname.  But that isn't required and neither is it set up
by default.  If you want that then you would need to set it up
yourself.

Bob


signature.asc
Description: Digital signature


Re: "hostname" question during Debian installation

2012-02-14 Thread Martin T
Andrei, Tom:

thank you for replies! So am I correct, that hostname set during the
installation is:

1) mapped to an address from 127.0.0.0/8 range in /etc/hosts file
2) written to /etc/mailname
3) written to "message of the day" file
4) usually used in shell prompt(for example "\[\e]0;\u@\h:
\w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$")

..and this is it? Or did I miss any other uses of the "hostname"? For
some reason I always thought that hostname is definitely used by at
least other hosts in the LAN and local processing running in the
server, but turns out out was wrong(?). I mean one needs to configure
local processes(for example cupsd or snmpd) to use "hostname" IP
address if he wants to- by default they all use 127.0.0.1 which is
mapped to "localhost" in /etc/hosts file.


regards,
martin



Kuupäeval 13. veebruar 2012 15:21 kirjutas Tom H :
> On Sun, Feb 12, 2012 at 8:16 PM, Martin T  wrote:
>
>
>> During Debian installation there is a question about "hostname" using
>> expert installation mode.
>
> In both modes but I don't think that "regular" mode asks you for a domain.
>
>
>> Am I correct, that "hostname" inserted during Debian installation is
>> associated with a local(address from 127.0.0.0/8 range) IP address:
>
> If you choose "DHCP".
>
>
>> martin@martin-ThinkPad-T60:~$ hostname
>> martin-ThinkPad-T60
>> martin@martin-ThinkPad-T60:~$ grep martin-ThinkPad-T60 /etc/hosts
>> 192.168.1.67    martin-ThinkPad-T60
>> ::1     martin-ThinkPad-T60     localhost6.localdomain6 localhost6
>> 127.0.1.1       martin-ThinkPad-T60
>> martin@martin-ThinkPad-T60:~$
>
> You must've set a static IP address after installation because the
> installer doesn't have the "127.0.1.1" line if you set a static IP
> address within it.
>
>
>> ..and it's used by few software programs(for example Apache, MySQL),
>> but hostname is usable only locally and not reachable from any other
>> machine even inside the LAN? In addition, aren't most of the programs
>> using 127.0.0.1 address which is mapped to "localhost" in /etc/hosts
>> file not to hostname I set:
>>
>> <
>> martin@martin-desktop:~$ sudo netstat -lnpt
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address           Foreign Address
>> State       PID/Program name
>> tcp        0      0 127.0.0.1:8118          0.0.0.0:*
>> LISTEN      1233/polipo
>> tcp        0      0 127.0.0.1:631           0.0.0.0:*
>> LISTEN      1057/cupsd
>> tcp6       0      0 ::1:631                 :::*
>> LISTEN      1057/cupsd
>> martin@martin-desktop:~$
>>>
>>
>> If yes, then changing the hostname shouldn't break any
>> services/programs associated with it?
>
> You're getting "127.0.0.1" in your netstat output because you're using
> the "-n" switch. Without "-n" you'll get "localhost".
>
> To change your hostname, check "/etc/hostname", "/etc/hosts",  and
> "/etc/mailname".
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: 
> http://lists.debian.org/caodosylf4vhbyqz+epwq3n2f-196rd6-nogtkf_q2wudpq...@mail.gmail.com
>


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cajx5yvgjmrqkagh+uqj-mamunb7q3wabsjosbsjdbanl1s3...@mail.gmail.com



Re: "hostname" question during Debian installation

2012-02-13 Thread Tom H
On Sun, Feb 12, 2012 at 8:16 PM, Martin T  wrote:


> During Debian installation there is a question about "hostname" using
> expert installation mode.

In both modes but I don't think that "regular" mode asks you for a domain.


> Am I correct, that "hostname" inserted during Debian installation is
> associated with a local(address from 127.0.0.0/8 range) IP address:

If you choose "DHCP".


> martin@martin-ThinkPad-T60:~$ hostname
> martin-ThinkPad-T60
> martin@martin-ThinkPad-T60:~$ grep martin-ThinkPad-T60 /etc/hosts
> 192.168.1.67    martin-ThinkPad-T60
> ::1     martin-ThinkPad-T60     localhost6.localdomain6 localhost6
> 127.0.1.1       martin-ThinkPad-T60
> martin@martin-ThinkPad-T60:~$

You must've set a static IP address after installation because the
installer doesn't have the "127.0.1.1" line if you set a static IP
address within it.


> ..and it's used by few software programs(for example Apache, MySQL),
> but hostname is usable only locally and not reachable from any other
> machine even inside the LAN? In addition, aren't most of the programs
> using 127.0.0.1 address which is mapped to "localhost" in /etc/hosts
> file not to hostname I set:
>
> <
> martin@martin-desktop:~$ sudo netstat -lnpt
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address
> State       PID/Program name
> tcp        0      0 127.0.0.1:8118          0.0.0.0:*
> LISTEN      1233/polipo
> tcp        0      0 127.0.0.1:631           0.0.0.0:*
> LISTEN      1057/cupsd
> tcp6       0      0 ::1:631                 :::*
> LISTEN      1057/cupsd
> martin@martin-desktop:~$
>>
>
> If yes, then changing the hostname shouldn't break any
> services/programs associated with it?

You're getting "127.0.0.1" in your netstat output because you're using
the "-n" switch. Without "-n" you'll get "localhost".

To change your hostname, check "/etc/hostname", "/etc/hosts",  and
"/etc/mailname".


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=sylf4vhbyqz+epwq3n2f-196rd6-nogtkf_q2wudpq...@mail.gmail.com



Re: "hostname" question during Debian installation

2012-02-13 Thread Andrei Popescu
On Lu, 13 feb 12, 03:16:17, Martin T wrote:
> During Debian installation there is a question about "hostname" using
> expert installation mode.
 
During normal mode as well ;)

> Am I correct, that "hostname" inserted during Debian installation is
> associated with a local(address from 127.0.0.0/8 range) IP address:
> 
> <
> martin@martin-ThinkPad-T60:~$ hostname
> martin-ThinkPad-T60
> martin@martin-ThinkPad-T60:~$ grep martin-ThinkPad-T60 /etc/hosts
> 192.168.1.67  martin-ThinkPad-T60
> ::1   martin-ThinkPad-T60 localhost6.localdomain6 localhost6
> 127.0.1.1 martin-ThinkPad-T60
> martin@martin-ThinkPad-T60:~$
> >

Yes, as you have shown

> ..and it's used by few software programs(for example Apache, MySQL),
> but hostname is usable only locally and not reachable from any other
> machine even inside the LAN?

This depends a lot on the rest of your network, but I assume you have 
complete control over it and you would have known if you did some 
configuration for that (e.g. added it to /etc/hosts on another 
computer).

> In addition, aren't most of the programs
> using 127.0.0.1 address which is mapped to "localhost" in /etc/hosts
> file not to hostname I set:
> 
> <
> martin@martin-desktop:~$ sudo netstat -lnpt
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address
> State   PID/Program name
> tcp0  0 127.0.0.1:8118  0.0.0.0:*
> LISTEN  1233/polipo
> tcp0  0 127.0.0.1:631   0.0.0.0:*
> LISTEN  1057/cupsd
> tcp6   0  0 ::1:631 :::*
> LISTEN  1057/cupsd
> martin@martin-desktop:~$
> >
> 
> If yes, then changing the hostname shouldn't break any
> services/programs associated with it?
> 
> All the explanations and clarifications are most welcome!

1. grep -r martin-ThinkPad-T60 /etc/*
2. change all occurrences
3. restart

Kind regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


"hostname" question during Debian installation

2012-02-12 Thread Martin T
During Debian installation there is a question about "hostname" using
expert installation mode.

Am I correct, that "hostname" inserted during Debian installation is
associated with a local(address from 127.0.0.0/8 range) IP address:

<
martin@martin-ThinkPad-T60:~$ hostname
martin-ThinkPad-T60
martin@martin-ThinkPad-T60:~$ grep martin-ThinkPad-T60 /etc/hosts
192.168.1.67martin-ThinkPad-T60
::1 martin-ThinkPad-T60 localhost6.localdomain6 localhost6
127.0.1.1   martin-ThinkPad-T60
martin@martin-ThinkPad-T60:~$
>

..and it's used by few software programs(for example Apache, MySQL),
but hostname is usable only locally and not reachable from any other
machine even inside the LAN? In addition, aren't most of the programs
using 127.0.0.1 address which is mapped to "localhost" in /etc/hosts
file not to hostname I set:

<
martin@martin-desktop:~$ sudo netstat -lnpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address
State   PID/Program name
tcp0  0 127.0.0.1:8118  0.0.0.0:*
LISTEN  1233/polipo
tcp0  0 127.0.0.1:631   0.0.0.0:*
LISTEN  1057/cupsd
tcp6   0  0 ::1:631 :::*
LISTEN  1057/cupsd
martin@martin-desktop:~$
>

If yes, then changing the hostname shouldn't break any
services/programs associated with it?

All the explanations and clarifications are most welcome!


regards,
martin


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cajx5yvhvwdztdxeoj25wwevaymk2ux4uirottmzwhs3jj+q...@mail.gmail.com



Re: hostname question

2010-01-03 Thread Avi Greenbury
www.givemefish.com wrote: 
> *) Should I use the static IP assigned by my ISP or on the router?  Or
> is the above correct?
The router should have the IP address from your ISP, it will forward
requests to your server as per your port forwarding rules.
The server doesn't exist on the internet as such, it is on your
internal network. Any external hosts on the internet that want to
connect to it will connect to your router, which decides which host on
your internal network they really want to connect to. I'd suggest a
brief look at Network Address Translation, since this is what lets the
router work like this.

> *) Can / should the local domain name (used in /etc/hosts) be
> different from the domain name of the website(s) that I am hosting?
> ie, using MyLocalDomainName rather than domainname I have registered
> for my website.
It can, and there's no technical reason for it to be either the same or
different.
I'd suggest a reading of the Apache2 docs on Virtual Hosts, they're
quite good: http://httpd.apache.org/docs/2.0/vhosts/
Assuming, that is, you're using Apache2.x, though the configuration is
much the same for 1.3, from what I can recall.

> If I should use the registered domain name, how do I handle hosting
> multiple domains on this server?  Which domain name would I use?
> 
> *) How does this differ from what is saved in /etc/hostname?  What if
> these values differ?  Who uses /etc/hostname?

/etc/hosts is used by the OS for name resolution in the absence of
DNS (though when it exits it takes precedence). As far as I'm
aware, /etc/hostname is part of the same system.
You should use name VirtualHosts to allow Apache to handle hosting
multiple domains on the same server. The value of /etc/hostname just
allows the box to intercept connections to itself without them having
to go to the DNS server.

> *) My current /etc/hostname contains the single line:
> 
> MyLocalHostName.MyLocalDomainName
> 
> Is that correct?

That's of the correct form. Whether the data is correct or not depends
on the configuration of your network.
Who runs the network (and more pertinently the DNS server)? They should
have told you what your local hostname and domain are.

-- 
Avi Greenbury
http://aviswebite.co.uk


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: hostname question

2009-12-31 Thread Camaleón
On Thu, 31 Dec 2009 12:41:03 +0100, www.givemefish.com wrote:

> I have a home server setup running Lenny.  I have a question about the
> hostname and domain name.
> 
> On my server, I would like to host multiple websites using Apache and
> virtual hosts.

(...)

Let me first recommend you the reading of a very good article covering 
Apache2 virtual hosts concept an management (name-based, not ip-based)):

Name-based Virtual Host Support
http://httpd.apache.org/docs/2.2/en/vhosts/name-based.html

> My question is, how should my /etc/hosts file look.  Here is what my
> current hosts file looks like:
> 
> 127.0.0.1   localhost
> 127.0.1.1   MyLocalHostName.MyLocalDomainName   MyLocalHostName

(...)

Do not care much about this, just be sure your DNS server (the 
responsible to resolve the domains you are going to host) is properly 
configured and redirecting the queries to your router.

Once the queries reach your server, Apache2 will handle the domains, 
based on the setup you have specified for each of them.

> My questions are:
> 
> *) Should I use the static IP assigned by my ISP or on the router?  Or
> is the above correct?

If you have a DNS server making the resolutions for you, I guess /etc/
hosts files is not that relevant.
 
> *) Can / should the local domain name (used in /etc/hosts) be different
> from the domain name of the website(s) that I am hosting?  ie, using
> MyLocalDomainName rather than domainname I have registered for my
> website.

If you are using your own DNS resolver, then yes, they have to match. But 
not in /etc/hosts file but /var/lib/named (bind9) or whatever are loacted 
the files to configure your DNS server.

> If I should use the registered domain name, how do I handle hosting
> multiple domains on this server?  Which domain name would I use?

Apache2 handles on its own the domain name resolution, better read the 
documentation I gave you before.
 
> *) How does this differ from what is saved in /etc/hostname?  What if
> these values differ?  Who uses /etc/hostname?

My wild guess is that "/etc/hostnames" is only used when you need to 
resolver the named locally (on your intranet) but if you want the domain 
names become available globally (on Internet) you should care the DNS 
server settings, not /etc/hosts.

> *) My current /etc/hostname contains the single line:
> 
> MyLocalHostName.MyLocalDomainName
> 
> Is that correct?

It will depend on your desired configuration. 

How are you (or who is) managing the DNS server in charge of name 
resolution?

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



hostname question

2009-12-31 Thread www.givemefish.com
Hi all,

I have a home server setup running Lenny.  I have a question about the
hostname and domain name.

On my server, I would like to host multiple websites using Apache and
virtual hosts.

I have a static IP address from my ISP over a DSL line.  There is a
router (wireless and wired) which routes to different computers on our
office LAN, one of which is my server.  I have configured the router to
use a static IP address for my server (192.168.0.248), with all the
other computers being assigned dynamic IPs via DHCP.  The router
port-forwards the necessary incoming ports (HTTP, ssh) to my server.

My question is, how should my /etc/hosts file look.  Here is what my
current hosts file looks like:

127.0.0.1   localhost
127.0.1.1   MyLocalHostName.MyLocalDomainName   MyLocalHostName

# The following lines are desirable for IPv6 capable hosts


::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

My questions are:

*) Should I use the static IP assigned by my ISP or on the router?  Or
is the above correct?

*) Can / should the local domain name (used in /etc/hosts) be different
from the domain name of the website(s) that I am hosting?  ie, using
MyLocalDomainName rather than domainname I have registered for my website.

If I should use the registered domain name, how do I handle hosting
multiple domains on this server?  Which domain name would I use?

*) How does this differ from what is saved in /etc/hostname?  What if
these values differ?  Who uses /etc/hostname?

*) My current /etc/hostname contains the single line:

MyLocalHostName.MyLocalDomainName

Is that correct?

Thanks for your help.
Matt.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: hostname question

2008-05-11 Thread Paul Johnson
On Sunday 11 May 2008 12:02:12 am Pete Kay wrote:

> I am currently having 3 servers in the lan which is using dynamic IP
> addresses.  Each time the router is rebooted, I have to reconfigure all the
> db ips and server ips.
>
> Therefore, I want to assign host name to each machine such as "db" , "ser"
> etc, so that I don't use 192.168.x.x in my configure anymore.
>
> Is this something that can be done?  Could someone please give me some
> pointer on how to do it?

You should be able to configure static host assignments in DHCP with your 
router, though you might have to change firmware entirely.
http://www.dd-wrt.com/

-- 
Paul Johnson
[EMAIL PROTECTED]

Explaination of .pgp part: http://linuxmafia.com/faq/Mail/rant-gpg.html


signature.asc
Description: This is a digitally signed message part.


Re: hostname question

2008-05-11 Thread Douglas A. Tutty
On Sun, May 11, 2008 at 03:02:12PM +0800, Pete Kay wrote:
> I am currently having 3 servers in the lan which is using dynamic IP
> addresses.  Each time the router is rebooted, I have to reconfigure all the
> db ips and server ips.
> 
> Therefore, I want to assign host name to each machine such as "db" , "ser"
> etc, so that I don't use 192.168.x.x in my configure anymore.
> 
> Is this something that can be done?  Could someone please give me some
> pointer on how to do it?

The difficulty is that you would need to keep updating the DNS server
with the hostname/IP mapping every time the router is rebooted.  

If its a rare event and you want just one config file to change, then
pick one of your boxes as the DNS server and install dnsmasq.  Then put
the hostname/IP mappings in that boxe's /etc/hosts file.  Have all the
other boxes use this box as their DNS server.

Alternatively, instead of as you have now (I think):

router/DHCPserver
|
__
||   |
box1   box2box3


You could do either use one of your boxes as a router (if it has the
capacity) or add a third box of your own which you control between the
router and the network.  But then what would be the point of the
commercial router?  What does this router do other than dhcp and a
switch?

I've never owned a commercial router.

Doug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: hostname question

2008-05-11 Thread Sharninder


On 11-May-08, at 12:32 PM, "Pete Kay" <[EMAIL PROTECTED]> wrote:


Hi,

I am currently having 3 servers in the lan which is using dynamic IP  
addresses.  Each time the router is rebooted, I have to reconfigure  
all the db ips and server ips.


Therefore, I want to assign host name to each machine such as "db" ,  
"ser" etc, so that I don't use 192.168.x.x in my configure anymore.




Why not assign ip addresses based on the mac adresses of the  
individual machines. Since you don't have a big LAN addressing via / 
etc/hosts should work fine for you and you don't need to learn  
complicated DNS stuff.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: hostname question

2008-05-11 Thread Andrei Popescu
On Sun, May 11, 2008 at 03:02:12PM +0800, Pete Kay wrote:
> Hi,
> 
> I am currently having 3 servers in the lan which is using dynamic IP
> addresses.  Each time the router is rebooted, I have to reconfigure all the
> db ips and server ips.
> 
> Therefore, I want to assign host name to each machine such as "db" , "ser"
> etc, so that I don't use 192.168.x.x in my configure anymore.
> 
> Is this something that can be done?  Could someone please give me some
> pointer on how to do it?

Some routers have the possibility to assign fixed IPs, but I guess you 
already checked this.

It might also work without DHCP, did you try just putting a static 
config in the respective /etc/network/interfaces? Also, if the router 
has some kind of DNS caching it might be possible that it can also 
resolve the names of your local machines.

Regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)


signature.asc
Description: Digital signature


hostname question

2008-05-11 Thread Pete Kay
Hi,

I am currently having 3 servers in the lan which is using dynamic IP
addresses.  Each time the router is rebooted, I have to reconfigure all the
db ips and server ips.

Therefore, I want to assign host name to each machine such as "db" , "ser"
etc, so that I don't use 192.168.x.x in my configure anymore.

Is this something that can be done?  Could someone please give me some
pointer on how to do it?

Thanks,
Pete


Re: Basic hostname question

2000-09-22 Thread Anthony Campbell
On 21 Sep 2000, Keith G. Murphy wrote:
> Damon Muller wrote:
> > 
> > Quoth Anthony Campbell,
> > > How are you supposed to form a hostname if you are not on a network but
> > > just connect intermittently to an ISP?
> > >
> > > Unless you have a dotted quad name, some hosts reject emails.
> > 
> > Basically, you have to make your mails look from the outside like they
> > are coming from your ISP.
> > 
> > How you do this depends a lot on the MTA that you are using. For qmail
> > (which I use), it's merely a matter of setting the QMAILHOST and
> > QMAILUSER environment variables before you send the email, which sets
> > the envelope sender. I'm sure there are equally easy ways to do it using
> > other MTAs, but I don't know what they are.
> 
> If you are using exim, set 'qualify_domain' in /etc/exim.conf.  If you
> are still using smail, stick a domain in /etc/mailname.
> 
> Just use your ISP's domain name for these.
> 
> 

Thanks to all who replied about this. I didn't realize it was such a
widespread problem. The above solution seems to be working.

Anthony


-- 
Anthony Campbell - running Linux Debian 2.2 (Windows-free zone)
Book Reviews: http://www.cix.co.uk/~acampbell/bookreviews/
Skeptical articles: http://www.cix.co.uk/~acampbell/freethinker/

"Palo y tente tieso." (Spanish proverb)
Free translation: "Hold fast is your only dog."



Re: Basic hostname question

2000-09-21 Thread Keith G. Murphy
Damon Muller wrote:
> 
> Quoth Anthony Campbell,
> > How are you supposed to form a hostname if you are not on a network but
> > just connect intermittently to an ISP?
> >
> > Unless you have a dotted quad name, some hosts reject emails.
> 
> Basically, you have to make your mails look from the outside like they
> are coming from your ISP.
> 
> How you do this depends a lot on the MTA that you are using. For qmail
> (which I use), it's merely a matter of setting the QMAILHOST and
> QMAILUSER environment variables before you send the email, which sets
> the envelope sender. I'm sure there are equally easy ways to do it using
> other MTAs, but I don't know what they are.

If you are using exim, set 'qualify_domain' in /etc/exim.conf.  If you
are still using smail, stick a domain in /etc/mailname.

Just use your ISP's domain name for these.



Re: Basic hostname question

2000-09-21 Thread Rino Mardo
On Thu, Sep 21, 2000 at 09:37:05AM +0100 or thereabouts, Anthony Campbell wrote:
> How are you supposed to form a hostname if you are not on a network but
> just connect intermittently to an ISP?
> 
> Unless you have a dotted quad name, some hosts reject emails.
> 

What you can do is setup an account with dyndns.org and get one of
their dialup tools.  This tool would allow you to update the ip
address of the domain name you registered with dyndns.org so that it
points to the current ip address you are using when you dialin to
you ISP.

For example, at home I have registered darklord.dyndns.org as the
domain name for my home box.  Whenever I connect to my ISP I would
just run the utility so that darklord.dyndns.org would point to the
ip address I'm using now.  Hence, I can always send emails directly
from my home box to anyone.

HTH.

-- 

Who's watching the watchmen?

ICQ: 15096825



Re: Basic hostname question

2000-09-21 Thread Damon Muller
Quoth Anthony Campbell, 
> How are you supposed to form a hostname if you are not on a network but
> just connect intermittently to an ISP?
> 
> Unless you have a dotted quad name, some hosts reject emails.

Basically, you have to make your mails look from the outside like they
are coming from your ISP.

How you do this depends a lot on the MTA that you are using. For qmail
(which I use), it's merely a matter of setting the QMAILHOST and
QMAILUSER environment variables before you send the email, which sets
the envelope sender. I'm sure there are equally easy ways to do it using
other MTAs, but I don't know what they are.

A better way is to maybe use your ISP as a smarthost, but then, I'm not
sure if most smarthosts re-write the envelope senders.

Personally, I use both.

cheers,

damon

-- 
Damon Muller  | Did a large procession wave their torches
Criminologist/Linux Geek  | As my head fell in the basket,
http://killfilter.com | And was everyone dancing on the casket...
PGP (GnuPG): A136E829 |  - TBMG, "Dead"


pgpV3xtrTLDzA.pgp
Description: PGP signature


Basic hostname question

2000-09-21 Thread Anthony Campbell
How are you supposed to form a hostname if you are not on a network but
just connect intermittently to an ISP?

Unless you have a dotted quad name, some hosts reject emails.

Anthony

-- 
Anthony Campbell - running Linux Debian 2.2 (Windows-free zone)
Book Reviews: http://www.pentelikon.freeserve.co.uk/bookreviews/
Skeptical articles: http://www.freethinker/uklinux.net/

"Palo y tente tieso." (Spanish proverb)
Free translation: "Hold fast is your only dog."