Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

We are using RHEL 6.1 server. We need to send a mail from server to local domain (tcs.com). we are using mail command for this purpose.

[bsoauser@hsluabsoa ~]$ echo "hi" | mail -s "test" abc.d@tcs.com
[bsoauser@hsluabsoa ~]$

command is working but we are not getting mails.In /var/log/maillog we found the following error:

Nov  7 15:58:05 hsluabsoa postfix/local[13579]: 02A86FAB: 
    to=<abc.d@tcs.com>, relay=local, delay=0.51, 
    delays=0.1/0.35/0/0.06, dsn=5.1.1, status=bounced 
    (unknown user: "abc.d")
share|improve this question
add comment

2 Answers 2

User 'abc.d' must be known. Either directly as a local user or mapped as virtual user, or be present in /etc/aliases. How could it deliver mail to unknown/non-existing user?

share|improve this answer
add comment

Are you using postfix or sendmail ? You must configure your local MTA with to forward your mail to your domain mail server.

Here is a simple postfix configuration in /etc/postfix/main.cf

myhostname = server_name.tcs.com
mydomain = tcs.com
myorigin = $myhostname
relayhost = smtp.tcs.com

Check the mta configuration with :

alternatives --config mta

And for this to work, the user must exist.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.