Find the answer to your Linux question:
Results 1 to 5 of 5
I tried to use mail command to send an email on Centos 5.2 with no luck. $/bin/mail -s "Hello" mymail@yahoo.com < body.txt The commands runs fine with no error. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    Cannot send mail on Centos 5?


    I tried to use mail command to send an email on Centos 5.2 with no luck.

    $/bin/mail -s "Hello" mymail@yahoo.com < body.txt

    The commands runs fine with no error. I was never able to receive the email.

    What's wrong here? Do I have to install SendMail sever?


    Thanks,
    Jim

  2. #2
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199
    >>I tried to use mail command to send an email on Centos 5.2 with no luck.<<
    Mail on slackware derived systems is actually mailx, which is a client. You'd have to configure the client to a pop or imap server to actually pull mail down from an account.
    The sendmail server is a lot more than you need for a small office or home use. Just configure the client for your existing server and you should be good.

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2
    Thanks.
    Actually, the problem is not with receiving mail but sending mail.

    The following command is supposed to send out the email, but actually not.
    $/bin/mail -s "Hello" mymail@yahoo.com < body.txt

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199
    Quote Originally Posted by jimcheng View Post
    Thanks.
    Actually, the problem is not with receiving mail but sending mail.
    The sequence is client/server/client. Where's the server...yahoo? Did you configure mailx to connect to your pop account on yahoo? No, it doesn't know anything about your account on yahoo other than a URL that corresponds to "inbound" for it.
    Can it send it to sendmail? Sendmail is not configured. Unless you have a default system wide email account you haven't mentioned, you basically shot it into a bit bucket. You wont be getting it.
    Sorry if I wasn't clear the last time.

  6. #5
    Linux User Felarin's Avatar
    Join Date
    Mar 2007
    Location
    Brazil or Singapore
    Posts
    314
    You have to configure sendmail to use the address you have configured on your primary network card. If not, unless you're sending mail to other local user's mailboxes, it won't work.
    "A graphical user interface is just a mask. What lies beneath is what matters."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •