Question
How to manage mail server settings in Plesk using CLI?Â
Answer
Note: if you don’t have administrative access to Plesk server via SSH or RDP, contact your hosting provider regarding the issue
The mailserver
utility is used to manage Plesk mail server settings:
- setting the relaying mode for the mail server.
- setting the maximum message size that can be accepted by the mail server.
- enabling, disabling, and configuring spam protection service.
- enabling, disabling, and configuring outgoing mail control service.
- setting the IP address for outgoing mail.
- managing mail server black and white lists.
For example, the following command sets the relaying mode that requires authorization, specifies the SMTP and POP3 authorization type for mail users, and sets the lock time to 10 minutes:
# plesk bin mailserver –set-relay auth -auth-type both -lock-time 10
Full list of options can be found in the documentation below:
Reference for Command-Line Utilities, Plesk for Linux –Â mailserver: Mail Server Settings