5

Everything was worked fine but someday sendmail stop working on me.

I'am trying the following command line:

echo "Body text" | mail -s "Some subject" example@somemail.com

And got:

/home/<username>/dead.letter... Saved message in /home/<username>/dead.letter
Can't send mail: sendmail process failed with error code 67

How to fix that?

FelikZ
  • 345
  • 1
  • 4
  • 12

2 Answers2

5

Your local MTA thinks that mail for whatever domain you tried to send to should be sent to the local machine, but there is no user with that username on the local machine. Ensure that the server's hostname is not the same as the domain name you are trying to deliver to, and that sendmail is not configured to deliver mail for that domain locally.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Actually, I'm trying to send some logs into my `gmail` account. And my hostname not a `gmail`. Also I checked /etc/hosts file and there system defaults, so there no alias to gmail too. Thank you. – FelikZ Dec 19 '12 at 08:21
1

Way too late for this answer I'm sure, but I'll add my experience here since the answer is still somewhat unclear.

Error 67 is defined in /usr/include/sysexits.h as :

#define EX_NOUSER       67      /* addressee unknown */

Which made sense in my case because I was trying to send mail from my-domain to user@my-domain, so sendmail was looking for a local user on that system to send the mail to. The solution I wound up going with was to add user to /etc/aliases with an address that was not @my-domain

This fixed the issue no problem.

rm-vanda
  • 257
  • 8
  • 18