• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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