Evolution 1.4.5 and gethostbyname()

Joe Marcus Clarke marcus at marcuscom.com
Fri Jan 23 13:56:35 PST 2004


On Fri, 2004-01-23 at 04:33, Byron Schlemmer wrote:
> Hi all,
> 
> A while back I reported problems sending email through Evolution 1.4.4/5
> using the SMTP option with my ISPs SMTP server address. The original
> email is this one :
> 
> http://www.freebsd.org/cgi/getmsg.cgi?fetch=252448+255442+/usr/local/www/db/text/2003/freebsd-gnome/20031221.freebsd-gnome
> 
> Now, the other day I had to install Linux on a spare box due to hardware
> failure on my primary desktop, then I noticed that I could send email
> from it using Evolution 1.4.5 and the SMTP option. Odd. I've since fixed
> the problem on my main desktop and reinstalled 5.2-RELEASE with GNOME
> 2.4.2 and Evolution 1.4.5. I tried to send an email now from the newly
> installed FreeBSD box, BOOM!, same error, namely :
> 
> Error while performing operation:
> DATA termination response error: Requested action not taken: mailbox
> unavailable.
> 
> I then used Ethereal to track down the transaction and compare the differences
> between the Linux box and my FreeBSD desktop. It seems for some reason the FreeBSD 
> box is setting my hostname to my internal private IP address instead of my machines
> name and the Linux box isn't and thats why the Linux box seems to work. Here is a top
> of the transaction, first FreeBSD :
> 
> byrons at pan:~$ head freebsdstream.txt
> 220 ctb-mesg2.saix.net ESMTP Postfix
> EHLO [192.168.0.4]
> 250-ctb-mesg2.saix.net
> 250-PIPELINING
> 250-SIZE 102400000
> 250-ETRN
> 250 8BITMIME
> MAIL FROM:<byrons at telkomsa.net>
> 
> Linux :
> 
> byrons at pan:~$ head linuxstream.txt
> 220 ctb-mesg2.saix.net ESMTP Postfix
> EHLO pan.home
> 250-ctb-mesg2.saix.net
> 250-PIPELINING
> 250-SIZE 102400000
> 250-ETRN
> 250 8BITMIME
> MAIL FROM:<byrons at telkomsa.net>
> 
> As you can see the difference is EHLO, I tried my theory manually telneting to port 25
> and trying with EHLO pan.home and then with EHLO 192.168.0.5 and it failed on the IP
> address version, for obvious reasons. 
> 
> Now the million dollar question, why is FreeBSD sending the IP address and not the
> hostname? Yes, I've checked both forward and reverse lookups work and that `hostname`
> prints the correct information.
> 
> Now, upon searching the web I found :
> 
> http://lists.freebsd.org/pipermail/freebsd-gnome/2003-May/001056.html
> 
> and 
> 
> http://bugzilla.ximian.com/show_bug.cgi?id=42805
> 
> So it seems other people have had a similar problem, is FreeBSDs gethostbyname()
> returning the correct values? If so, why is Evolution setting the wrong hostname
> and how do I fix it?

Evo uses gethostbyname_r.  However, this function is not available on
FreeBSD, so Evo includes its own version.  THAT may be buggy.  Linux
_does_ have gethostbyname_r, and thus the internal Evo function is not
used.  You may want to poke around the code, and see if something
obviously wrong jumps out at you.

Joe

> 
> Thanks,
-- 
PGP Key : http://www.marcuscom.com/pgp.asc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20040123/67eec326/attachment.bin


More information about the freebsd-gnome mailing list