LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-23-2011, 04:27 PM   #1
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Unable to send mail


Hello everyone,

OS Environment: RHEL5

I am trying to send an email to a user in my Linux system but I keep on getting bounce back messages. I am trying the following steps:

1. I login as root.
2. #mail test@localhost.localdomain
subject: test email.
Hi,
This is a test email.
3. I hit ctrl+d where it ask me to add anyone in CC. Then I hit enter again and I get the bounce back immediately.

Queries:

1. Is it necessary to have email address in [email]testuser@testdomain.com format
2. Is it not possible to send emails to internal users.
3. Please advice where I am going wrong.

Please note I am not using sendmail or postfix. I am simply typing mail at the server system console to send an email.
 
Old 03-23-2011, 04:32 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Code:
service sendmail start
Code:
> su - root
> mail root
Subject: blah
blah
.
CC:


> mail

Last edited by szboardstretcher; 03-23-2011 at 04:33 PM.
 
Old 03-23-2011, 04:34 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Does the user test exist?
Quote:
Then I hit enter again and I get the bounce back immediately.
Error message?
Quote:
1. Is it necessary to have email address in [email]testuser@testdomain.com format
No, testuser should do

Kind regards
 
1 members found this post helpful.
Old 03-24-2011, 05:29 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Original Poster
Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@Repo and szboardstretcher

Hi Repo,

I get the following response:

<root@localhost.localdomain>... Real domain name required
for sender address

Hi szboardstretcher

I have checked the sendmail status and it is running still mail bounce back.
 
Old 03-24-2011, 06:24 PM   #5
sp88
LQ Newbie
 
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
hello sir,you could actually use a file named "local-host-names" in "/etc/mail" directory...
enter as many as hostnames you would like to recieve the mail with that host name..
 
Old 03-26-2011, 01:38 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Original Poster
Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@sp88

Hello sp88,

Both etc/sysconfig/network as well as /etc/hosts are updated with the hostname.

Regards,

T3RM1NVT0R
 
Old 03-26-2011, 02:13 PM   #7
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269

Rep: Reputation: 54
Have you tried with just the username as suggested? For local users nothing is needed in the domain, and adding the @localhost.localdomain is probably the issue since that will not resolve, or have a valid MX record.
 
Old 03-26-2011, 06:51 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Original Poster
Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@Everyone

Hello everyone,

I finally got this straight. Now the emails are getting deliver to the test account.

The only difference that I noticed is the error message which I was getting is when I created the user by editing /etc/passwd file. When I created the user using User and Groups management console it worked in one shot.

The only reason that I can think of is that there might be something missing in /home/test/skel directory when I copied it to the user directory after creating it using /etc/passwd.

Please let me know if I am guessing it correctly or there can be any other reason. Because I have tried the same method of sending email in both the cases.

Last edited by T3RM1NVT0R; 03-26-2011 at 06:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
unable to send mail using Mail command navin_karnam Linux - Newbie 3 05-13-2008 03:21 AM
Evolution unable to send mail satimis Linux - Server 4 02-28-2008 09:31 PM
Unable to send mail using mail command faruque.ahmed Linux - Software 1 02-03-2007 11:29 AM
Unable to send mail to some mail servers due smtp greetings malformed atotomex Linux - Networking 6 12-20-2005 05:38 PM
Unable to send Mail ! phil81 Linux - Networking 5 06-12-2004 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:25 AM.

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