LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Reading mail with sendmail 8.13.8 on RHEL 5.1 (https://www.linuxquestions.org/questions/linux-software-2/reading-mail-with-sendmail-8-13-8-on-rhel-5-1-a-782430/)

Rocktron 01-15-2010 11:46 AM

Reading mail with sendmail 8.13.8 on RHEL 5.1
 
Hello, i have running sendmail 8.13 on my red hat enterprise linux 5.1, but i have a problem. I can send a mail from my line command terminal to hotmail, gmail, yahoo and any of these, but i can't send mail to my own domain (mydomain.com), when i wrote a mail i get a reply from MAILER-DAEMON@localhost.localdomain that says that the message had pemanent fatal errors and shows as user unknown the mail was suposed to recive the message. For example, if i send one mail from user1@mydomain.com to user2@mydomain.com the user2 does not recive any mail, but that does not happens if user1 sends a mail to any hotmail address or gmail or any other. Besides i also can't recive on my server any mail to user1@mydomain.com or user2@mydomain.com (for example) comming from gmail, so please tell me what do i do to get the mail.

bathory 01-15-2010 04:05 PM

Hi,

You have to add your domain in /etc/mail/local-host-names and restart sendmail, in order to send/receive mails locally to your domain.

If you want your mailserver to accept mail from outside (like gmail.com), you have to make sure that it's listed as the MX record of your domain in the name server that is authoritative for your domain. Running
Code:

dig mx mydomain.com
should tell you the mailserver that accepts mail for your domain. You have to contact the admin of the authoritative name server to change the MX record of your domain, so it points to your mailserver.

Regards

chrism01 01-17-2010 07:25 PM

Also, on RHEL, the sendmail default is to only listen on localhost ie 127.0.0.1. If you want to recv mail from other systems, you'll have to comment out the following
Quote:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
line as shown (in /etc/mail/sendmail.mc ), then restart sendmail. iirc, it will recompile to sendmail.cf at restart.

Elv13 01-17-2010 07:58 PM

It (may) happen because your firewall (probably a dedicated box, I am wrong?) don't like you using the internet as a gateway for your own network, it is a security issue and a "deny rule" in most firewall default settings. Some firewall have "NAT reflexion" capability to proxy "local internet" traffic indoor. Like that, it will not be blocked, just forwarded.

I may be wrong, but if it work, it is better than an hidden config line in a deep server that nobody will remember tomorrow.


All times are GMT -5. The time now is 03:34 PM.