Zags
Zags

Reputation: 41328

SMTP User Unknown

I have a server from which I am trying to send myself an email. I have a domain name, example.com. The A record for example.com points to this server. The MX record points elsewhere. I have the email [email protected].

When I try to send myself an email (using python smtplib), I get the following:

SMTPRecipientsRefused: {'[email protected]': (550, '5.1.1 <[email protected]>... User unknown')}

I can send emails to recipients with any other domain name just fine. I can also send emails to usernames that correspond to users that exist on the server, and these emails end up in the appropriate /var/spool/mail file. From this, it is obvious that the server believes it is the intended recipient of email sent to users of example.com.

I have already changed the hostname of the server to something other than example.com. This did not solve the problem.

I am using sendmail.

How do I get the server to realize that it is not the mail server for example.com?

Upvotes: 1

Views: 1192

Answers (1)

Zags
Zags

Reputation: 41328

Change the hostname to something other than example.com. Then:

If using sendmail:

apt-get install sendmail
sudo sendmailconfig

If using postfix:

sudo apt-get install postfix
sudo dpkg-reconfigure postfix

Upvotes: 0

Related Questions