LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Help with sendmail and NAT (https://www.linuxquestions.org/questions/linux-networking-3/help-with-sendmail-and-nat-97477/)

Crazed123 09-27-2003 09:53 AM

Help with sendmail and NAT
 
OK, I have my box behind a NAT firewall router given by my isp. I run sendmail to listen on port 25 for smtp on my pc. I've configured the firewall to foward port 25 to my computer. What I think I'm supposed to do is be able to send email to my LAN's public IP and it will be sent to my PC right? Well, whenever an email sent from outside to my pc it gets a failure delivery email saying "550 relaying denied". I think this is because sendmail thinks it's my internal ip, but the emails go to user@publicip. How do I make this work?

david_ross 09-27-2003 09:58 AM

If you are using a domain this shouldn't matter. If for some reason you are just using ip addresses then try using the "local-host-names" file.

Crazed123 09-27-2003 10:00 AM

Sorry, I don't understand you. This is my first time running a server.

karunesh 09-27-2003 10:16 AM

Add Domain Entry
 
I think you need to add "yourdomain.com" in your "local-host-names" file, save it and restart the sendmail.

Crazed123 09-27-2003 10:33 AM

What are these domain things?

Crazed123 09-27-2003 01:01 PM

I don't have a domain. I am running an ordinary PC. I don't work for a major company or have server boxes at my disposal.

david_ross 09-27-2003 01:21 PM

This brings us to the point of why your are setting up a mail serer only to receive mail on an IP. You don't need to be big company to register a domain. Also if you aren't on a fixed IP it will be very difficult to manage as an incomming mail server.

Crazed123 09-27-2003 01:34 PM

OK, so how I get a domain?

david_ross 09-27-2003 01:38 PM

If you hav a dynamic IP address then take a look at a dynamic DNS service like http://www.dyndns.org/ If you have a fixed a address then you should be able to use almost any registrar - just shop about for the best deal.

Crazed123 09-27-2003 01:44 PM

Wait, why do I need a domain? I just want sendmail to realize that publicip=privateip.

david_ross 09-27-2003 01:46 PM

Are you wanting people to send e-mail to your server? What address do you expect them to use?

Crazed123 09-27-2003 01:52 PM

Can an ip address be used like that or do I need a domain?

david_ross 09-27-2003 01:54 PM

It will be much easier with a domain especially if you have a dynamic IP address.

Crazed123 09-27-2003 01:56 PM

My local IP is dynamic my public is static.

david_ross 09-27-2003 02:12 PM

You should probably make your local IP static too so that you don;t need to keep changing your forwarding rules.

The reason that you need ot use a domain name is so that an MX record can be set up. You can't setup mx records for IP addresses. Using an IP would only work if you were using the mail server as everyones smtp server.


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