[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tpop3d-discuss] hostname?
From: |
Chris Lightfoot |
Subject: |
Re: [tpop3d-discuss] hostname? |
Date: |
Sun, 30 Jun 2002 18:17:09 +0100 |
User-agent: |
Mutt/1.3.24i |
On Sun, Jun 30, 2002 at 06:10:53PM +0100, Chris Elsworth wrote:
> On Sun, Jun 30, 2002 at 05:19:00PM +0200, Klaus Rene Hansen [ Sconk ] wrote:
> > how do i change the hostname (pukkelhval) to some thing else?
> > POP3< +OK <address@hidden>
>
> I believe it uses the value from /etc/resolv.conf listed as domain:
>
> domain shagged.org
>
> is what I have, and I get:
> +OK <address@hidden>
Not quite.
Firstly, you can change it using the (domain) syntax for
listener in the configuration file.
The way that the domain itself is determined is
complicated but should give plausible results in most
circumstances (this is only really relevant to
non-virtual-hosts setups). For versions prior to 1.5.1
(in CVS), the strategy is--
- use a named domain if present;
- else call gethostbyaddr on the address on which
we're listening, and use the part following the
first `.' if present, else the whole thing;
- if that fails call uname and use the node name
returned by that (the same value as uname -n gives
in the shell);
- and if that fails (we're really scraping the bottom
of the barrel here) it uses `x.invalid'.
For versions 1.5.1 and later, you can use the syntax
listener: 0.0.0.0/regular-expression/
where the regex is used to obtain a `domain name' from the
address to which the client has connected:
If \fBtpop3d\fP has been compiled with support for
mass virtual hosting (which is the default), you may
specify instead of a domain a POSIX extended regular
expression enclosed in \fB//\fP; this should contain
exactly one bracketed subexpression. In this mode,
\fBtpop3d\fP will look up the host name of the address
to which a client has connected, and will attempt to
match it with the specified regular expression, and
use the matched subexpression, if any, as the domain
name. The match is evaluated in a case-insensitive
sense. This feature only really makes sense if
\fBtpop3d\fP is listening on address \fB0.0.0.0\fP
(INADDR_ANY).
For instance, on a host which has numerous interfaces
with names \fBpop3.example.com\fP,
\fBpop3.example.org\fP, etc., you could specify
.nf
listen-address: 0.0.0.0/^pop3\.(.*)$/
.Sp
.fi
to accept incoming connections and associate them with
the proper domains. Note that for this to work, all
interfaces on which connections are to be accepted
must have functioning inverse name resolution; also,
in this case, \fBtpop3d\fP will do a name lookup for
each incoming connection, which may block in the event
of a DNS failure. You may wish to create some other
mapping -- perhaps in /etc/hosts -- to ensure that
this does not occur.
--
``Sri Lankans urged to multiply for war.'' (BBC News headline)
- [tpop3d-discuss] hostname?, Klaus Rene Hansen [Sconk], 2002/06/30
- Re: [tpop3d-discuss] hostname?, Chris Elsworth, 2002/06/30
- Re: [tpop3d-discuss] hostname?, Chris Elsworth, 2002/06/30
- Re: [tpop3d-discuss] hostname?, Allan Joergensen, 2002/06/30
- Re: [tpop3d-discuss] hostname?, Chris Lightfoot, 2002/06/30
- Re: [tpop3d-discuss] hostname?, Allan Joergensen, 2002/06/30
- Re: [tpop3d-discuss] hostname?, Chris Lightfoot, 2002/06/30
- Re: [tpop3d-discuss] hostname?, Allan Joergensen, 2002/06/30
Re: [tpop3d-discuss] hostname?,
Chris Lightfoot <=
Re: [tpop3d-discuss] hostname?, Paul Makepeace, 2002/06/30