The IP you're using to send mail is not authorized to send email directly to our servers

64.5k Views Asked by At

hi i wanted to send mail via smtp protocol to one of my gmail's accounts...

i tried but finally it occurred and error :

telnet> open alt4.gmail-smtp-in.l.google.com 25
Trying 74.125.131.27...
Connected to alt4.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP b4si2095585vdw.57 - gsmtp
HELO stackoverflow.com
250 mx.google.com at your service
MAIL FROM: <[email protected]>
250 2.1.0 OK b4si2095585vdw.57 - gsmtp
RCPT TO: <■■■■@gmail.com> // filtered ;)
250 2.1.5 OK b4si2095585vdw.57 - gsmtp
DATA
354  Go ahead b4si2095585vdw.57 - gsmtp
test
ok
it done
.
550-5.7.1 [5.22.81.102] 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 http://support.google.com/mail/bin/answer.py?answer=10336 b4si2095585vdw.57 - gsmtp
Connection closed by foreign host.

so now how can i send mail without having this problem ?

4

There are 4 best solutions below

5
chus On

You can find the answer at the link in the last line of the Google mail served response:

'The IP you're using to send email is not authorized...'

In order to prevent spam, Gmail refuses mail from IP addresses that are not authorized to send mail. The determination of whether or not an IP address is authorized to send mail is made by the ISP that provides you with the IP address. This list typically contains consumer IP ranges offered for dialup, DSL, or other broadband access.

What can I do to fix this?

Your ISP may provide SMTP relays which will accept mail from your IP, and these servers should be authorized to send mail. Some ISPs may provide a way to get an IP that is authorized, either by upgrading to business class service or static IP service. You should reach out to your ISP to see what options are available.

Another alternative is to send mail through your own domain’s servers, either by configuring them to allow relay from your IP address, or by using MSA (mail submission agent). Learn how to use Gmail to send mail from a different address.

Please note that we are unable to whitelist IP addresses or otherwise make exceptions.

In other words, if your IP address is not authorized by your ISP to send mail, you should send your mail through:

  1. Your provider mail server (SMTP relay)
  2. Your own domain mail server.

Mail servers must meet a number of requirements to prevent their messages from being blocked, e.g. have a PTR record. The use of authentication methods such as SPF, DKIM or DMARC minimize the chance that messages are marked as spam.

5
Rosdi Kasim On

This is because Google will reject any emails sent from IP in the spamhaus database.

What you need to do is go to http://www.spamhaus.org/lookup/ and follow the instruction there to remove your server ip from spamhaus database.

Please also follow this guide: Prevent mail to Gmail users from being blocked or sent to spam

2
kaspin On

I had this problem with one of my hotmail addresses, using Thunderbird on Kubuntu. Tried changing sever settings, passwords etc to no avail. In desperation, I deleted the offending email address through "account settings" "account actions" (bottom left of window). If you are on POP3 you will loose all your emails, so make sure you're on IMAP. You then just select "add email" in Thunderbird and the email is put back as it should be and works perfectly.

0
Abpostman1 On

In my case, even if I was blacklisted by only one list and even after the removal of my IP from the list, the problem remained.

"Undelivered Mail Returned to Sender" email just told me 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

I also checked if the name of my server matched with the email address domain of the sender, it did !

I decided to check the original content of the mail in Gmail (in the right top corner of the mail, 3 dots button (see original mail (translated from french)) and in it, I found this phrase :

Received-SPF: softfail (google.com: domain of transitioning [email protected] does not designate XX.XX.XX.XX as permitted sender

This led my searches to this page that explains how to set up a correct SPF record (in fact, a SPF record in a TXT DNS record) using this tool.

I think I had this problem only when using the webmail Roundcube because no CNAME Record were set for my subdomain webmail.domain.fr and adding the IP in my SPF, authorized all messages sent by my server's IP and did all the job.