# email delivery error 550-5.7.1



## balaji18 (Oct 25, 2019)

Hi,

I am using FreeBSD(12.0) to host my email server and i am using sendmail, the default mail server. While i am able to receive emails without any issues, i am unable to send mails to certain domains. The error is

```
>>> DATA
<<< 550-5.7.1 [122.x.x.x] The IP you're using to send mail is not authorized
to
<<< 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
<<< 550-5.7.1 service provider instead. Learn more at
<<< 550 5.7.1  https://support.google.com/mail/?p=NotAuthorizedError e13si7419112pfm.247
- gsmtp
554 5.0.0 Service unavailable
```
Contacted the ISP support and the support team has no idea as what needs to be done. I have removed this IP from blacklist by contacting Spamhaus and DynaRats. Also, on some domains, the email reaches spam rather than inbox. Any inputs on how to resolve this.

--Thanks.


----------



## VladiBG (Oct 25, 2019)

Do you have rDNS, SPF and DKIM?
What is your reputation score at google? Is your IP address listed at spamhouse?


----------



## toorski (Oct 25, 2019)

Do you have MX record  in your DNS server with your registered Domain Name and IP?
Does your email (SMTP) server configuration indicate your Domain Name, as in your DNS MX record?
SMTP servers do reverse DNS lookup -  IP to FQDN.  So, you need MX record in your DNS to indicate which domain name(s) does your SMTP server serves, and the same names(s) in your SMTP server's configuration.


----------



## SirDice (Oct 25, 2019)

The receiving end doesn't like the fact you're trying to deliver email directly to them from a "home" connection. Your IP address doesn't match up with the sender's email domain. Look at the explanation: https://support.google.com/mail/?p=NotAuthorizedError


----------



## balaji18 (Oct 25, 2019)

Thanks SirDice, toorski and VladiBG. The MX records pointing to the host were missing. Added them. Trying to get domain verified using Google Postmaster tools. Both CNAME and TXT records are failing. Hopefully this would be clear soon as the error message is "unable to connect to DNS server".

--Thanks.


----------

