1826312 Members
4357 Online
109692 Solutions
New Discussion

sendmail question

 
SOLVED
Go to solution
hangyu
Regular Advisor

sendmail question

I have RHEL server and use "sendmail" to send out mail via the ISP mail server , can advise how can I config the server ( eg. SMTP ) so that I can send outgoing mail ? thx
9 REPLIES 9
hangyu
Regular Advisor

Re: sendmail question

for example , how can I use "sendmail mymail@domanin.com" to outside email address ? thx
Alexander Chuzhoy
Honored Contributor

Re: sendmail question

if you have working DNS that resolves hosts on the internet (www.google.com for example), then you can send e-mails by default.
Fo example:
echo "Type you message" |mail -s "Here's the subject" mail@destination_domain.com
Oviwan
Honored Contributor

Re: sendmail question

Hy

to test it try

#nslookup domain.com

Regards
hangyu
Regular Advisor

Re: sendmail question

thx reply ,

do I need to edit the smtp setting in /etc/mail ( eg. sendmail.cf , sendmail.mc ) ? thx
Jerome Henry
Honored Contributor

Re: sendmail question

No you don't.
You would need to do that on a windows box which only has a MUA (mail user agent), linux has a built in MTA, so default config should work.
You can lean only on what resists you...
hangyu
Regular Advisor

Re: sendmail question

thx reply,

if you have working DNS that resolves hosts on the internet (www.google.com for example), then you can send e-mails by default.
Fo example:
echo "Type you message" |mail -s "Here's the subject" mail@destination_domain.com

About the message , do you mean what I need to do is setup DNS ? thx
Alexander Chuzhoy
Honored Contributor

Re: sendmail question

What I mean is that if you ping www.google.com (just an example of well known address on the internet) - you should get replies from its IP address, thus the linux station should be a client of DNS server that's able to resolve addresses on the internet.
hangyu
Regular Advisor

Re: sendmail question

thx alex ,

so if I can ping google.com , then what I need to do ? thx
Alexander Chuzhoy
Honored Contributor
Solution

Re: sendmail question

Then you don't need to do anything (unless you've changed the default).
The following command will work:
echo "Type you message" |mail -s "Here's the subject" mail@destination_domain.com

replace the mail@destination_domain.com with the desired e-mail address.