Sendmail returns error code 550 5.1.1, "Unknown user"

When sending emails to regular domains like @ google.com or @ hotmail.com, my code works correctly.

But when I try to send an email to the domain that I have (say example.com ) which server is configured, I get error code 67 from the mail command.

I use the mail() function for PHP, but I also tried "mail -stest kubilayeksioglu@example.com " and it returns the same error, so it should not be related to the code itself.

Here is the part of the mail I receive in /var/mail/root

Final Recipient: RFC822; kubilayeksioglu@example.com

Action: failed

Status: 5.1.1 Remote-MTA: DNS; [127.0.0.1]

Diagnostic Code: SMTP; 550 5.1.1 ... User unknown

Last-Attempt-Date: Wed, 21 Sep 2011 17:43:59 GMT

I think I should also add that our domain example.com uses Google Apps.

Can someone give me an idea of ​​how I can fix this?


Edit: Thanks everyone. I fixed the problem using the answer: https://serverfault.com/questions/65365/disable-local-delivery-in-sendmail/128450#128450

+4
source share
1 answer

Most likely, the problem is that the host name of the server is set to the name of the domain in which you are trying to send an email.

String: Status: 5.1.1 Remote-MTA: DNS; [127.0.0.1] (more specifically, 127.0.0.1) indicates that the message was delivered to the local SMTP server. Since this is not a Gmail server, this would result in a User Unknown error, such as the one you received.

To fix the problem, look at the server host name (/ etc / hostname). Also check the sendmail configuration (or its replacement). Some files you can view include (but are not limited to):

  • / etc / mail / local hostnames
  • /etc. / mailname

Again, some mailers, such as Postfix, have some settings in their configuration files. Find where the domain you are trying to send (e.g. example.com) is located in these files, removes links, reloads the mail daemon (e.g. sendmail), and you should be good to go.

+4
source

All Articles