Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-23-2011, 04:27 PM
|
#1
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
|
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.
|
|
|
03-23-2011, 04:32 PM
|
#2
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
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.
|
|
|
03-23-2011, 04:34 PM
|
#3
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
|
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.
|
03-24-2011, 05:29 PM
|
#4
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
Original Poster
|
@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.
|
|
|
03-24-2011, 06:24 PM
|
#5
|
LQ Newbie
Registered: Mar 2011
Posts: 1
Rep:
|
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..
|
|
|
03-26-2011, 01:38 PM
|
#6
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
Original Poster
|
@sp88
Hello sp88,
Both etc/sysconfig/network as well as /etc/hosts are updated with the hostname.
Regards,
T3RM1NVT0R
|
|
|
03-26-2011, 02:13 PM
|
#7
|
Member
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269
Rep:
|
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.
|
|
|
03-26-2011, 06:51 PM
|
#8
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
Original Poster
|
@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.
|
|
|
All times are GMT -5. The time now is 03:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|