LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RHEL sending an email (https://www.linuxquestions.org/questions/linux-newbie-8/rhel-sending-an-email-939633/)

redhatuser1 04-13-2012 08:43 AM

RHEL sending an email
 
Hi,

I am trying to send an email from the RHEL server to anywhere else (within organisation really, not fussed about using the tinternet). I have got it configured and working correctly on 3 servers (I set them up about 9 months ago), I am building 3 new servers, using the same version of RHEL, but I am struggling. I am trying to send it via our smtp server.

This is all I have done so far, can someone explain what else I need to do:
1. installed sendmail ( well it came preinstalled ...)
2. edited /etc/mail/sendmail.cf (I know I shouldn't but i simply edited the following lines
Code:

DjWITHMYHOSTNAME
DSsmtp.host.domain.stuff

3. Restarted sendmail

The maillog of the server which isn't working shows:
Code:

Apr 13 13:35:11 MYHOST sendmail[5870]: q3DCZBCG005870: from=root, size=59, class=0, nrcpts=1, msgid=<201204131235.q3DCZBCG005870@localhost.localdoma
in>, relay=root@localhost
Apr 13 13:35:11 MYHOST sendmail[5870]: q3DCZBCG005870: to=alexm@carlisle.gov.uk, delay=00:00:00, mailer=esmtp, pri=30059, dsn=4.4.3, stat=queued

Furthermore....mailq reveals:
Code:

                /var/spool/mqueue (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
q3DCWttQ005782  364512 Fri Apr 13 13:32 root
                (host map: lookup (domain.this.that[/email]): deferred)
                                        me@domain.this.that

I am guessing the relay should point to our smtp server?

redhatuser1 04-13-2012 10:39 AM

HI,

Please close this I have just solved the problem.

The file /etc/resolv.conf didn't contain the DNS servers I needed. once I had added those and restarted sendmail the emails were delivered.

TB0ne 04-13-2012 10:43 AM

Quote:

Originally Posted by redhatuser1 (Post 4651907)
HI,

Please close this I have just solved the problem.

The file /etc/resolv.conf didn't contain the DNS servers I needed. once I had added those and restarted sendmail the emails were delivered.

Thanks for posting the solution, but you can mark the thread as SOLVED.

colucix 04-13-2012 01:21 PM

Apart the fact that the correct way to ask for threads management is reporting the thread/post itself, I see no reason why this one should be closed. Marking it as SOLVED, as TB0ne suggested, is enough.

redhatuser1 04-16-2012 03:50 AM

wasn't sure on process but thanks.
Marked as solved.


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