• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

Mail routing

I'm trying to setup a linux machine as mail server and at this point the internal mail service it's already working, but when i try to send an message out of my  company domain, it just don't go out. It could be a network configuration problem or a mail service configration problem? The rest of the services (internet browsing, telnet, ftp, etc.) are working fine (nternal and external). I check the routing table and it seem to be fine. The linux server it's behind a Microsoft Proxy server. Thank you.
  • 2
1 Solution
Most probably it seems a network configuration problem. I am not sure about Microsoft proxy server, but I guess it doesnt allow to connect to the netowrk directly. You can verify using ping.

# ping www.yahoo.com

If you get the reply then you are okay with your network configuration. You need to then check your mail configuration. Most probable reason will be the Relaying. Enter the machine's IP you are sending mail from in the /etc/mail/access file. HTH

-- tknayak
I'm assuming that you are talking about emails sent to the linux box from other machines, using programs like Outlook (Express), Netscape and/or Eudora. But emails sent to someone within your domain (ie, someone who has a pop3/imap account on your linux box) get delivered fine.

If this is the problem, then sendmail is not relaying. This is its default behaviour (for recent versions anyway) and is designed to stop spam being sent through your server. What you need to do is to enable relaying for your own network while making sure that it remains disabled for the rest of the world.

First, check your sendmail.mc file. This is likely to be in either /etc or /etc/mail. Look for a line


If it's there, so far so good. (It should be by default). Now look for a file /etc/mail/access, and if you have it, open it in your favourite text editor.

It should contain the following lines:

# by default we allow relaying from localhost...
localhost.localdomain           RELAY
localhost                       RELAY                       RELAY

You need to add some entries to allow hosts on your network to relay as well. Now, if the email clients that are to be allowed to send mail through your linux box are all on a single ip network, it's very easy. For example, if they are all on 192.168.0.x, then you would add in:

192.168.0                       RELAY

(note that it is a TAB separating the two values, not just spaces). This tells sendmail that it can relay mail from any machine with an ip address beginning 192.168.0

You can put in as many of these lines as you like to specify ip addresses or parts of ip addresses. Have a look at the sendmail site (www.sendmail.org) for more info on this.


pitagorasAuthor Commented:
When i try to ping www.yahoo.com i got the "Destination host unreachable" error. I made some changes in the route table and the i just get the "timeout" error; anyway the mail didn't go out. By the other side i'm using Postfix as mail server, it have the same relay issues than Sendmail?

pitagorasAuthor Commented:
Thank you.


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now