LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-13-2004, 02:50 AM   #1
bwtoh
LQ Newbie
 
Registered: Sep 2004
Posts: 10

Rep: Reputation: 0
Sending email with a Linux Server


Aim:
I want to send email out to the Internet with command line (actually from a shell script). I just want to send a simple email with no more than 2 lines.

Prob:
I tried something like
echo "XXX Message" |mail -s "XXX Subject" XxxUserName@XxxDomain.com
But my Linux server failed to deliver the email.
I know my syntax above is right as I have successfully sent an email with another Linux server.

System Config :
Red Hat Linux ver 8.0.

After combing the net for answers, I noticed that there are a few commands related to mails : mail, sendmail, qmail, etc etc.


Can anyone explain or point me to a tutorial that explains these different mail commands ? Differences ?

Why can't I send my email ? I know there could be quite a number of possible problems like network config not set properly... but can anyone give me a guideline on what/how to check ?

What does it take for the mail command to work ?

Thanks a lot.
 
Old 09-13-2004, 08:10 AM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
First, you will need a mail transfer agent (a.k.a. mail server) to be able to send and receive e-mail on the server.
I would suggest you first install 'postfix' from your distribution media and try your mail example again.
 
Old 09-13-2004, 12:39 PM   #3
dcj1mmy
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
When you think you have everything on the local server correct with mail. Try using :


sendmail -v (email addy )
Test
.

And then another period to confirm you done your email. This will verbosly connected to the desired email server. You can see there if it connects to send the mail or not.

Also check your hosts file, make sure you have the following listed in there.

email_server_ip = email server you are trying to email or forward mail to

Hostname - email servers host name

domain name of email addy.
 
Old 09-14-2004, 02:36 AM   #4
bwtoh
LQ Newbie
 
Registered: Sep 2004
Posts: 10

Original Poster
Rep: Reputation: 0
r0b0, thanks for attempting to help.
How do I check whether postfix is already installed ? how do I check that it has been started?

dcj1mmy, thanks for attempting to help.


I am still not clear as to how to go about solving this prob.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sending email cambie Linux - Software 1 11-20-2004 06:02 PM
sending email to an ip pyu7 Linux - Software 4 10-08-2004 02:46 PM
Sending email from a server fuelinjection Linux - General 4 12-29-2003 12:42 PM
sending email GraemeK Linux - Networking 1 08-24-2003 05:14 PM
sending an email to a email address after a perl operation meluser Programming 9 04-07-2003 01:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration