1

I setup a personal email server with postfix and dovecot and have one question and one problem

The question is about the incoming ports to open in firewall, the protocols enabled are smtp and imap and configured TLS/SSL, for imap should be only 993 and accepting only SSL connections but for smtp for sending and receiving, can I configure it to use only the 587 (now its open for submission) for receiving too ? If yes, how ?

the problem is that I'm able only to receive email from outside, I tried to send email to a gmail account and received the message:

The IP you're using to send 550-5.7.1 mail is not authorized to send email directly to our servers. Please 550-5.7.1 use the SMTP relay at your service provider instead. For more 550-5.7.1 information, go to 550 5.7.1  https://support.google.com/mail/?p=NotAuthorizedError

I tried to send email to another account and received the message:

postfix/smtp[13560]: connect to mxb-004ae901.gslb.pphosted.com[143.55.146.204]:25: Connection timed out
Jan 24 23:30:47 postfix/smtp[13560]: connect to mxa-004ae901.gslb.pphosted.com[143.55.149.110]:25: Connection timed out
Jan 24 23:30:47 postfix/smtp[13560]: 53C76FA14BC: to=<xxxxxx@xxxxxx>, relay=none, delay=61, delays=0.2/0/61/0, dsn=4.4.1, status=deferred (connect to mxa-004ae901.gslb.pphosted.com[143.55.149.110]:25: Connection timed out)

Where should I look to solve ?

Giacomo1968
  • 58,727
klatls
  • 59

1 Answers1

0

There is not quite enough information provided to exactly nail down the cause, but I think you have at least a couple of problems -

  1. In order to receive email from the outside world you need port 25 open. (This is not the error presenting in your logs, as that appears related to sending rather then receiving email. If you have not opened port 25 you will likely be able to send emails out on port 25 due to other firewall rules, but not receive email from other mail providers)

  2. The primary issue would appear to be somewhat out of your control - we would need your world facing IP address to know for sure. It seems like your IP address or range is blacklisted by various providers - in the case of GMAIL they are telling you as much when you try and send email, and in the case of pphosted they are not even allowing you through their firewall. It is possible/probable your IP range is in a blacklisted range - this is not uncommon for IP addresses assigned to end user customers.

The way around (2) above is to either get your IP address removed from whatever blocklist(s) there are, or to relay outgoing email through your mail provider or via another IP address that is not blocked. Note that if you are sending email directly there are a number of things you will need to do to get your email properly accepted, including ensuring your reverse and forward DNS match, and, if you are sending a non-trivial volume of email, warming up your mail server.

There are a few sites that can help you diagnose email issues - among others, https://mxtoolbox.com comes up a lot. It may be worth running some tests through it to help narrow down the scope of your issues.

davidgo
  • 73,366