mail_edit.tpl - make default email addresses editable > yes but removable > no

  • /themes/default/client/mail_edit.tpl


    Does anyone have an idea how to adjust mail_edit.tpl file so that all default email addresses (abuse, postmaster, hostmaster, webmaster) are editable but NOT deletable.

    Editing and deleting should still be possible for any other additional e-mail accounts.

  • I'd rather set this in client/mail_accounts.php


    there the buttons are set or not, depending on the type of address...


    see block "if (Registry::get('config')['PROTECT_DEFAULT_EMAIL_ADDRESSES']" - following

    then change remove 'MAIL_ACCOUNT_EDIT_LINK' => '', from the ASSIGN Block and add

    $tpl->parse('MAIL_ACCOUNT_EDIT_LINK', 'mail_account_edit_link');... (before the return)


    But carefull: if the address is changed from a forward to a normal account, then it won't be recognized as a protected address...


    Joxi

  • Why are you trying to modify the code ?

    There's a specific setting for that !

    Go to: https://your_panel_url:port/admin/settings.php

    Open: Email Settings

    Change: Protect default mail accounts against change and removal to "Disabled"

  • Why are you trying to modify the code ?

    There's a specific setting for that !

    Go to: https://your_panel_url:port/admin/settings.php

    Open: Email Settings

    Change: Protect default mail accounts against change and removal to "Disabled"


    yes, but the protection does not allow to change the forwardings afterwards

    e.g. setting postmaster, abuse, webmaster to a local email address afterwards instead of using the profile email address which is mostly forward all postmaster stuff to gmail, hotmail, yahoo etc. and can result in rejects & IP blockings due to attacks or script errors also SPF rules