sendmail & cable router

beef

Dinner
ugh, gah, damn, $hit!!!

Sendmail is killing me again...

anyway, I've been using Linksys Cable/DSL router, so I can get online with both my Desktop and Powerbook... and sendmail on the desktop had been working fine... I had to reinstall system on it because of a stupid mistake on terminal, and now I can't figure out how I got sendmail to work...

sendmail works when I connect the desktop to the cable modem directly, but if I use the router, I get the error...

Sep 1 21:26:44 n0thing sendmail[259]: gethostbyaddr(192.168.1.2) failed: 1

well, I guess the IP I setup for the desktop 192.168.1.2 doesn't resolve, so sendmail doen't work.. Anyone know how to fix this?

note: as mentioned before, if the desktop is connected to the cable modem directly, there's no problem... so this isn't a problem with "group writable directory" or local-host-names...
 
You are probably running up against the "gethostbyaddr(192.168.1.2)" in Sendmail not able to resolve (reverse lookup) your machine's DNS name from the IP address. Because your Cable provider knows it's own IP addresses (like the one they give you when you connect directly to the cable modem )there is no problem with that configuration as far as Sendmail is concerned. When you ask the Cable ISP's DNS servers to resolve 192.168.1.X addresses it can't (they are considered to be "private" address ranges [Untroutable] ) and Sendmail can't function.:(

You have 2 choices:

1. (somebody correct me if I've got the wrong directory)

you need to add a line in the /etc/hosts file that looks like:

192.168.1.X foo.bar.com Foo localhost.localdomain localhost

where 192.168.1.X is the ip address of your machine inside the router
and foo.bar.com is a name that you want people to know you as
(this should be a address that you know won't conflict with anybody else)
...It could just be Foo. (that is not a fully qualified domain name.)

2. Run Bind 8.2.3 or later and setup a localdomain that way.

I would go for Option 1 as it is MUCH easier.

ka6sox
 
Hi. Thanks for the reply... I followed your instruction (1) and edited /etc/hosts

1) Got rid of "gethostbyaddr(192.168.1.2) failed: 1"
2) managed to receive mails (got 2 while messing around with the settings)

but I couldn't send mails...

I'm pretty sure I typed everything correctly.... (I'm guessing it doesn't matter if it's tab or single space in between the names...)


from /etc/hosts

# Host Database
#
# Note that this file is consulted when the system is running in single-user
# mode. At other times this information is handled by lookupd. By default,
# lookupd gets information from NetInfo, so this file will not be consulted
# unless you have changed lookupd's configuration.

so I figured I need to edit Netinfo db rather than /etc/hosts... and reverted the file back to the original... and rebooted

adding the 192.168.1.2 and other info to machine/localhost seems to have gotten rid of the error "gethostbyaddr failed" as well... but I still couldn't send mail...

I messed around with the db, but I have no idea what I'm doing, so at one point, it took more than 10 mins to boot up... so rather than get the thing messed up even worse, I decided to put everything back the way it was and removed the router again... I guess I'll be reading more on netinfo now

I don't know if you were interested in knowing what happened... but anyway, I thought I'd let you know...
 
I did a little more poking around and came up with this website that I think will help you:

http://www.darwinfo.org/faq.shtml#nibasic

It talks about manipulating NetInfo and how to make it work for you...

Just the base address:

http://www.darwinfo.org/

Is a wealth of information about the underlying OS of MAC OSX (Darwin)

I come form a Linux/Unix Sys V world and am learning the differences myself. I am very interested in OSX as I will be switching my G4 to the next revision after it becomes available ( I run Yellowdog Linux 1.2 currently)

;)

I would tell you to dump sendmail but I've never tried to compile my favorite email daemon (qmail) on a OSX machine and wouldn't want to steer you down a path that I've not gone on before.

I will be setting qmail up in October and will let you know how it goes if you want.


Ka6sox
 
I got the damn thing to work by adding the info in Netinfo's 'machines'... the funny thing is I had to change hostname in '/etc/hostconfig' back to -AUTOMATIC-... when I change it to my domain, sendmail runs into error when I tried to send an email.

Maybe I've added something unnecessary in the netinfo database and that's causing error when I change the value in hostconfig... but until I have better idea on what's going on, I guess I'd leave it as is...

so now 'localhost' appears in terminal, but I guess I could live with that.
 
qmail is much easier to administer. is MUCH more secure and has greater performance. Hotmail and other big email services use qmail for their mailer daemon.

I am using qmail for my ISP with multiple domains. I administer it using a web interface that takes me only about 3 minutes to set up a domain and install about 5 users...adding users takes about 1 minute/ user. it can forward, alias, and send vacation notifications.

It has Webmail(with sqwebmail), POP, IMAP (with courier-imap), and smtp.

What else could you ask for in a mail daemon?

even if you set it up for a single domain with just a few users and edit the control files it is quite straight forward and takes almost no time to setup.

-Tom
Ka6sox:cool:
 
Thanks for the info.

Right now, my desktop's more or less single user machine... if someone connect to it from remote location, it's usually me... :p
So there really isn't anything to administer.

but I guess it doesn't hurt to learn other (and possibly better) stuffs... so I'll try to install it and see what happens... but my priority is to understand NetInfo better first.

and classes started already, so even that is at the end of the priority... gah...
 
Back
Top