Sendmail error 67 user unknown


I recently installed and configured sendmail with a remote smtp ('s SMTP and mail server, which I purchased)

It works well and I can send emails to yahoo, AOL, MSN, Hotmail and... from PHP in my VPS.

But when I try to send an email to my own domain like:

I get error:
sendmail error 67 (User unknown.)

Any ideas?

LVL 17
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CSecurityAuthor Commented:
I think it tries to send email to my domain using VPS server itself, because my VPS server's hostname is my domain name and I see something is running on port 25, is it true?

It should connect to remote SMTP server like what it does for yahoo and aol and msn, and send it to remote smtp server itself, which is hosted in

What do you think?
Thanks from now
Andrew DoadesIT TechnicianCommented:
It looks like sendmail is running OK if you can send to other addresses, is there a users on that server called 'test' ?
CSecurityAuthor Commented:
Yes, it's and sender is the same. Works well on all domains except my own
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

CSecurityAuthor Commented:
Hey, I got a new problem....!!!! NOW sending email to yahoo, aol, hotmail, etc. also not works!!! But I don't get any error
CSecurityAuthor Commented:
I think I found the problem, look at this:

Apr 11 11:03:40 mydomain sm-mta[23686]: o3BB3egt023686: to=<>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Apr 11 11:06:48 mydomain sendmail[23698]: o3BB6mia023698: from=root, size=298, class=0, nrcpts=1, msgid=<>, relay=root@localhost
Apr 11 11:06:49 mydomain sm-mta[23701]: o3BB6mDG023701: from=<>, size=452, class=0, nrcpts=1, msgid=<>, proto=ESMTP, daemon=MTA-v4, []
Apr 11 11:06:49 mydomain sendmail[23698]: o3BB6mia023698:, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30298, relay=[] [], dsn=2.0.0, stat=Sent (o3BB6mDG023701 Message accepted for delivery)
Apr 11 11:06:50 mydomain sm-mta[23703]: STARTTLS=client,, version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Apr 11 11:06:51 mydomain sm-mta[23703]: o3BB6mDG023701: to=<>, ctladdr=<> (0/0), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=120452, [x.x.x.x], dsn=5.1.3, stat=User unknown

It tries to send e-mail from

But I want it to send authenticated e-mail from and using password I added in /etc/mail/authinfo

If it's using authinfo I added, it should use user: and password I defined, if it's not using that, it tries to send and login using user: (WHICH DOESN'T EXISTS)

Now could you advice about it?

CSecurityAuthor Commented:
Another update: When I use sendmail with -f paramater, I mean sendmail -f

I can send email to yahoo and gmail etc.

But even when I use sendmail -f, I can't send email to or even

I should authenticate usign and password I defined, then I can send email using's Email Server. But it works on all domains except my own! I think it's because is my VPS server's hostname, is that true? This way sendmail thinks is itself! But how it sends email to yahoo and gmail using (which is hosted in ??

Please advice!
CSecurityAuthor Commented:
I syslog I see this:
Apr 11 11:16:33 mydomain sendmail[23749]: o3BBGWWc023749:, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31068, relay=[] [], dsn=5.1.1, stat=User unknown
Apr 11 11:16:33 mydomain sm-mta[23750]: o3BBGWvD023750: from=<>, size=1068, class=0, nrcpts=0, proto=ESMTP, daemon=MTA-v4, []
Apr 11 11:16:33 mydomain sendmail[23749]: o3BBGWWc023749: o3BBGWWd023749: return to sender: User unknown
Apr 11 11:16:33 mydomain sm-mta[23750]: o3BBGWvF023750: from=<>, size=3659, class=0, nrcpts=1, msgid=<>, proto=ESMTP, daemon=MTA-v4, []
Apr 11 11:16:33 mydomain sendmail[23749]: o3BBGWWd023749: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32092, relay=[] [], dsn=2.0.0, stat=Sent (o3BBGWvF023750 Message accepted for delivery)
Apr 11 11:16:33 mydomain sm-mta[23751]: o3BBGWvF023750: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33865, dsn=2.0.0, stat=Sent

Seems like it tries to send email to, which is wrong and should be hosted in and should also use user/pass I defined

Is it true?
CSecurityAuthor Commented:
YES! That's true, I see my mail in /var/mail/root

Which should be like that... Any ideas? How to solve it? Please advice
CSecurityAuthor Commented:
I solved it, I removed hostname from /etc/hosts and it's solved.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.