Actualy providers block port 25 and is dificult to change that, you can not fight with digital ocean for that...
So few years ago we resolve to relay all smtp services to mailgun a third party services and to use dovecot for imap service in our server. we change our plesk server to aapanel (have to say that aapanel web host is fantastic), but now we do not have posibility to use imap dovecot in aapanel without deal with postfix needed of port 25 retransmition. is there is another way to use dovecot with aapanel account config without install postfix and deal wtih port 25 problem?.
regards
PD: i paste digital ocean respond to my ticket to open 25 port in my server
"Hello,
Stopping spam is a constant fight and due to this, your account has restrictions specifically on port 25. However, you are able to use mail services using ports 587, 993, 995 and 465. You will need to open these ports in your firewall. Here is our guide to common iptables commands:
https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands#service-mail
We realize this is inconvenient for sending mail from your Droplet. As a solution, you can consider using a third party service such as SendGrid or similar to processes mail there instead of your Droplet. We apologize for the frustration but we're not able to lift this port restriction at this time.
In terms of a workaround, here are a few alternatives:
- Utilize port 587 for SMTP relay via another mail provider, for example, G Suite/Gmail, Mailgun, etc. We have a guide on doing so using Postfix here:
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-mail-relay-with-postfix-and-mailgun-on-ubuntu-16-04
- Configure your app or service to send mail directly using either an SMTP client connection (typically using port 587), or API call via another mail provider such as Sendgrid, Mailgun, Mandrill, etc.
Please note that with this restriction in place on port 25, mail servers hosted here will be unable to directly relay email to other mail servers, as communication between mail servers typically takes place on port 25.
We think the API is the best solution, as it is honestly more scalable and what we would use if we wanted to "future proof" the project.
Regards,
Priyanga,
Developer Experience Specialist."