Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Dec 1998 22:03:01 -0600
From:      David Kelly <dkelly@hiwaay.net>
To:        Jonathan Chen <jonc@pinnacle.co.nz>
Cc:        Lim Choong Ee <choongee@santeh.com.sg>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Help on gw popper. 
Message-ID:  <199812030403.WAA12840@n4hhe.ampr.org>
In-Reply-To: Message from Jonathan Chen <jonc@pinnacle.co.nz>  of "Thu, 03 Dec 1998 09:24:33 %2B1300." <Pine.SCO.3.96.981203092041.19222C-100000@kiwi.pinnacle.co.nz> 

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Chen writes:
> On Wed, 2 Dec 1998, Lim Choong Ee wrote:
> 
> > I keep getting this annoying msg.
> >
> > gw popper[1234]: (v2.53) Unable to get canonical name of client, err = 0
> >
> > gw popper[1236]: (v2.53) Unable to get canonical name of client, err = 0
> >
> > Can anyone tell me how can i get rid of these annoying msg?
> 
> One of your POP-email clients connecting to your machine has an
> address that the server can't determine the name of. There are 2 ways
> to fix this annoying message:
> 
>     1.  inform the server about the client; by adding it to /etc/hosts
>         or your DNS.

My employer refuses to make any DNS entry for mere desktop machines. I 
got tired of entering IP addresses in /etc/host, especially when some 
users were coming from internal dynamic IP addresses.

>     2.  edit syslog.conf so that the message doesn't appear (ie the
>         error is still there, you're just ignoring it).

"Use the source, Luke!" This is what i did:

	3. Hack the qpopper source.

# cd /usr/ports/mail/popper
# make patch
===>  Extracting for qpopper-2.53
>> Checksum OK for qpopper2.53.tar.Z.
===>  Patching for qpopper-2.53
===>  Applying FreeBSD patches for qpopper-2.53
/bin/rm /home/ports/mail/popper/work/qpopper2.53/md5.h
/bin/cp /home/ports/mail/popper/files/sendto.c /home/ports/mail/popper/work/qpopper2.53
# cd work/qpopper2.53

You don't have to do this step, I'm just showing you how I found it:

# grep canonical *.c
pop_init.c:    /*  Get the canonical name of the host to whom I am speaking */
pop_init.c:            "(v%s) Unable to get canonical name of client, err = %d",

See how easy it was to find the source of your grief?

This is the section of pop_init.c to be hacked:

    280     /*  Get the canonical name of the host to whom I am speaking */
    281     ch = gethostbyaddr((char *) &cs.sin_addr, sizeof(cs.sin_addr), AF_INET);
    282     if (ch == NULL){
    283         pop_log(p,POP_PRIORITY,
    284             "(v%s) Unable to get canonical name of client, err = %d",
    285             VERSION, errno);
    286         p->client = p->ipaddr;
    287     }

Simply comment out or delete lines 283 thru 285 above. In vi you can
type "283G" (its not echoed on the screen when you type that, but on
typing G, the screen jumps (goes) to line 283). Save and quit. Then pop
back up two directories to /usr/ports/mail/popper and finish with "make
install". And finally clean up your mess with "make clean" (this 
deletes the changed source code and generated object files).


--
David Kelly N4HHE, dkelly@nospam.hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812030403.WAA12840>