• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Question Prevent default creation of Plesk user when creating mailbox

Kaspar

API expert
Plesk Guru
Currently when creating a mailbox in Plesk the option "Can be used to log in to Plesk" is checked by default. Which for me isn't always preferable.

Schermafbeelding 2021-08-27 150127.png

Does anyone know if there is any setting to not have this option checked by default? An thus prevent the default creation of a Plesk user when creating a mailbox.
 
  • Like
Reactions: mow
Hello,
there is no known possibility to set it as default disabled in plesk, but you can run it via CLI:

Code:
plesk bin mail --create [email protected] -passwd "#_123244hjhdsf" -cp-access false -mailbox true
 
In fact, maybe you could use the Event Manager in Plesk: Create an event for "Mail account created"

Configure this event to execute plesk bin mail -u ${NEW_EMAIL} -cp-access false

Not sure if this will work, I haven't used Event Manager in a long time but may you'll have a look at the documentation:
and
 
Thnx @m3lezZ and @Monty, much apricated. However your suggestions will disable the mailbox user as Plesk user after it's already created. I am looking for an option to prevent a Plesk user being made in the first place when a new mailbox is created trough the GUI as a default. In some cases it might still be useful to have a mailbox user double as a Plesk user. So rather have this option checked by explicit choice of the user, not by default.

As a solution I've added this peace of Javascript to Plesk (in case anyone is interested).

JavaScript:
<script>
    let loginAsUser = document.getElementById("general-generalSection-loginAsUser");
    loginAsUser ? loginAsUser.checked = false : false;
</script>
 
Thnx @m3lezZ and @Monty, much apricated. However your suggestions will disable the mailbox user as Plesk user after it's already created. I am looking for an option to prevent a Plesk user being made in the first place when a new mailbox is created trough the GUI as a default. In some cases it might still be useful to have a mailbox user double as a Plesk user. So rather have this option checked by explicit choice of the user, not by default.

As a solution I've added this peace of Javascript to Plesk (in case anyone is interested).

JavaScript:
<script>
    let loginAsUser = document.getElementById("general-generalSection-loginAsUser");
    loginAsUser ? loginAsUser.checked = false : false;
</script>
how could i add this code?
 
Back
Top