• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question Disallow remote imap/pop3/smtp access

uniauto

Basic Pleskian
Server operating system version
Debian 10
Plesk version and microupdate number
Plesk Obsidian 18.0.45
Hi.

is there a way to disable remote access to mail account? only allowing access via webmail.
 
To do it server-wide, close the ports used by mail clients on the firewall: Managing Plesk Firewall. Simply change the SMTP, IMAP, and POP3 rules to Deny like in the attached image. Webmail will continue working, while mail clients will time out.

You may also want to disable mail auto discover in Tools & Settings > Mail Server Settings > Mail Autodiscover, so the clients can't get the connection settings either.
 
For the IMAP and POP3: yes

For SMTP: No, because when these ports are closed the used cannot send or receive mails on the server from and to the Internet. In his post he indicated that he wants to use webmail, so probably he does want to be able to send and receive mails, just not via external mail application. When SMTP is blocked, port 25 is blocked, hence other servers on the internet can no longer connect to the system to transmit mails. So actually, there is no obvious way to keep external mail software from communicating with the SMTP server, only for IMAP and POP3 this would be possible as described by @artalva.

Another solution could be to block the IMAP and POP3 ports in the intermediate firewall of the data center, which is available in many data centers. The advantage would be that traffic does not need to be processed by the server, but is kept away from it before it can create CPU load. Again this will only work for the POP3 and IMAP ports, not for SMTP.
 
Hi. Thank for reply.

Peter is right, i want to send/receive mails... Just looking for a setting like in classic GMAIL where you can enable/disable remote access... and would be nice if its not global, but by account...

Anyway, maybe firewall work for me, since only few ips access remotely.

There is two SMTP ports. Are both need for send/receive emails? or maybe one is for send/receive and the other for auth?
 
@Peter Debik Look at the attached image on my previous post. The default Plesk rules are for Incoming connections. Outgoing won't be blocked. I tested this on a Plesk server, and webmail works well with these rules set to Deny. I took that screenshot after emailing external domains back and forth.

@uniauto You can set all those rules to Deny to make sure there's no external access to any of the mail ports.
 
@artalva Thank for the replies. Just tested it and incomings emails fail, so... I'm looking to block remote auth, not mails, so that wont work.
 
Back
Top