2

Issue

I have just set up an email server using Postfix, POP3 and IMAP, following the instructions listed here: https://help.ubuntu.com/community/PostfixBasicSetupHowto

Sending/receiving mail locally on my remote mail server, between users, works fine.

I can use both the mail command and telnet to send mail from my local machine to my remote mail server and it is correctly received.

The issue I have is when it comes to my google mail. I have spent a few hours trying to send/receive mail to/from my remote mail server from/to my google mail mailbox.

Remote Server to google mail

Consistently, all mail sent from my remote mail server to my gmail account does not arrive. It is not filtered as spam. There is no mail received on my remote server stating the mail has 'bounced-back'.

Gmail to Remote Server

When I try sending from gmail to my remote server, initially I received a 550 Relay Not Permitted error. Then, a single email was successfully received. Since this single mail, the 550 errors have returned.

Outdated MX Record

I have added my domain to my MX record, with a priority of 1. Originally, my domain supplier had default domain names listed, with priorities of 30. I have since removed these listings. When I run host -t mx mydomain locally, I get a result showing only mydomain. If I run host on my mail server however, only the original default results are shown, and not my updated domain. Any guidance as to why this is would be appreciated - could this be related to the issue ?

Solution Attempts

Port Blocking

I have removed all ports from my firewall I can see as required:

Port 25 allows SMTP connections
Port 110 allows POP connections
Port 995 allows POPS connections
Port 143 allows IMAP connections
Port 993 allows IMAPS connections

Blacklist

I have checked my domain against blacklisting via: https://dnschecker.org

The only blacklist flagged is the third type listed here:

https://www.dnsbl.info/dnsbl-details.php?dnsbl=dnsbl-3.uceprotect.net

Originally I checked on another site, which gave the all clear (can't find the link now). Given I have been able to send mail under some conditions, I'm tempted to dismiss this result.

Testing Mail Delivery Elsewhere

I have used several online mail services here: https://www.smtper.net/ and here: https://smtpserver.com/smtptest Through both services I correctly received mail at my mail servers inbox.

Searching for a Solution Online

I read here a suggestion regarding an 'open relay trap': https://www.scalahosting.com/kb/senders-see-a-550-relay-not-permitted-error-when-they-try-to-email-me/ But when I configured postfix, I added my domain. Also supported by the fact I have received a single email from gmail.

General Setup Information

I am running an Ubuntu Server, hosted by IONOS. Please ask if any other setup information would help in diagnosing my issue. Security is involved in my setup as per the instructions in the link at this posts start.

Summary

Particularly, what I am surprised by, is that I have been able to successfully send an email from my google mail to my server on one occasion, but not prior or since. Why do I have success sending from online test services, but not my google mail ? Why are my emails to my google mail not arriving, but also not bouncing back ?

Guidance is appreciated, as well as direction on how I might go about debugging given absence of bounce-backs and the other issues listed above.

UPDATE

The error logs stated that gmail does not accept mail without SPF and DKIM checks. I have since added these. I can now successfully send mail from gmail to my remote email server. I can still not send mail from my remote server to my gmail account. The mail log now reads:

status=bounced (host gmail-smtp-in.l.google.com said: 550-5.7.25 The IP address sending this message does not have a PTR record setup, or the corresponding forward DNS entry does not point to the sending IP.
As a policy, Gmail does not accept messages from IPs with missing PTR records. 
For more information, go to  https://support.google.com/mail/answer/81126#ip-practices

This leads me to suspect the issue is with the reverse DNS lookup. On first reading, this seems something I can't do independently, but will have to go through my hosting company, which ideally isn't what I would prefer. Can anyone point out if my thinking is correct or if the cause could be somewhere else ?

0 Answers0