LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Mail and /etc/hosts (https://www.linuxquestions.org/questions/linux-networking-3/mail-and-etc-hosts-66784/)

eggoz 06-20-2003 02:49 AM

Mail and /etc/hosts
 
I know I am missing something here.

My eth1 ip is set to 192.168.0.7.

In the sendmail.mc file, I have this line: DAEMON_OPTIONS(`port=smtp,Addr=192.168.0.7, Name=MTA-v6, Family=inet6')dnl

And in my hosts file looks like this:
127.0.0.1 backup localhost.localdomain localhost
192.168.0.7 pavilionhome.dyndns.org backup

Not really sure what should be in here. But when I start the sendmail server, i get this error:

Starting sendmail: 554 5.3.0 /etc/mail/sendmail.cf: line 270: host "192.168.0.7" unknown

What am I missing? Thanks.

Shin Takeshita 06-20-2003 04:12 PM

I apologize beforehand that I am not answering your question.

I am curious as to what may happen if you type "ping backup".

eggoz 06-21-2003 02:08 AM

Quiet alright. It pings it with no problem.

defa0009 06-21-2003 01:30 PM

Shouldn't it be just:

127.0.0.1 localhost.localdomain localhost


Also have you come across this link: http://www.nmia.com/~glenn/protech/sendmail.htm

defa0009 06-21-2003 01:42 PM

Open /etc/mail/sendmail.mc in a text editor.
Find the line that begins DAEMON-OPTIONS and lists the loopback IP address (127.0.0.1).
Type dnl at the beginning of this line. dnl means "delete to new line" - in other words, it comments out what follows.


So in your case you would have:

dnl DAEMON_OPTIONS(`port=smtp,Addr=192.168.0.7, Name=MTA-v6, Family=inet6')

Robert0380 06-21-2003 02:08 PM

inet6??????? why is it setup for IP version 6?

eggoz 06-22-2003 03:22 AM

wait a tick. you want me to comment out 127.0.0.1 or 192.168.0.7?

Woah, that link looks great. Take a look tomarrow when i'm not half asleep.

Thanks.

eggoz 06-23-2003 02:50 AM

OK, quick question I hope.

On this page, Link , it says,
Quote:

Make sure that you have a line listing the IP address of your server, followed by any and all domain names it services, in all their variants.
Well, what if your server was behind a router? No problem correct?.

But, what if you had a dyanmic ip? My domain, imagiro-1.com, is forwarded to the dyndns service, then to my main comp at pavilionhome.dyndns.org. Which IP would I use? Thanks.

Shin Takeshita 06-23-2003 08:19 AM

Let me clariy my earlier question of "what happens if you ping backup". Which IP address responds?

defa0009 06-23-2003 08:24 AM

If your behind a router no problem but if not then you would have to change the ip in /etc/hosts everytime yours changed. But if you have a router just put the ip of the machine acting as the mail server.

Dynamic ip doesn't matter if the mail server sending you mail can find your router through the dyndns service then your router just forwards it to the machine's ip on the LAN. I use a router and just forward port 110 and 25 to my mail server at 192.168.1.6

eggoz 06-23-2003 12:43 PM

Shin, you just showed me a huge mistake that I thought was happening. Ping backup gives me an ip of 127.0.0.1. Major reason why I can't send mail.

My hosts file:

127.0.0.1 backup localhost.localdomain localhost
192.168.0.7 imagiro-1.com backup
24.50.15.130 smtp smtp.imagiro-1.com imagiro-1.com

The last ip is my ip assigned to me right now by my isp. Where should "backup" be located?

def, What about recieving mail? I was thinking of using the dyndns server. I read somebody else did that. I'll have to find the post where I read that.


All times are GMT -5. The time now is 09:19 AM.