emailgmailpostfix-mta

Postfix not sending mail to gmail (Not authorised)


I have setup a postfix mail server on my server running Ubuntu Server 20.04.2 LTS. it sends mail properly but emails sent to gmail bounce due to it not being authorised. I was on spamhaus 4 days ago and was removed on the 1st July. Surely mail should be sending now?

This is what the mailer daemon tells me when it bounces:

Final-Recipient: rfc822; recipient@gmail.com
Original-Recipient: rfc822;recipient@gmail.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.1 [90.222.63.77] 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
    z8si8433769wmp.218 - gsmtp

MailTester results: https://www.mail-tester.com/test-ifc1fti4w


Solution

  • It turns out that I was on some kind of blocklist, I completely forgot about this question but from what I can remember it was spamhaus.

    https://check.spamhaus.org/ and then delisting fixed the issue.