Disable Email Notifications

Infos:

  • Used Zammad version: 2.9.x
  • Used Zammad installation source: (source, package, …) package
  • Operating system: Ubuntu 18.04
  • Browser + version: any

I have imported users (as customers) from an Active Directory, all including Email-Adresses. When I create a ticket (and for some other actions as well) as a phone call these customers get a email notification. I want to disable that, or at least have control about when and what information is emailed to customers. I can’t find any options regarding this.

Unfortunately, there is currently no way, except:

a) manually switch to the user and disable the notifications, which is very time-consuming, or

b) use the REST API to automate this.

This was very annoying for us too. As we are using a Perl script to sync our Zammad role assignments with a central employee database anyway, I use this script to disable notifications for a user as soon as the script assigns him the Agent role.

I’ve removed the role assignment code from the script and uploaded it here, maybe this is helpful: https://gist.github.com/martinvonwittich/58a36617d9f32c985efcf2636d5a6c1f

To use it, you need to:

  1. Install the Perl dependencies. On Debian stretch:

    apt install libjson-perl libpath-tiny-perl librest-client-perl liburi-perl libdata-printer-perl
    
  2. Change $zammad_url to the URL to your Zammad instance.

  3. Change $zammad_user_pattern to a search expression that matches the users that you want to disable the notifications of. You can easily test the pattern in Zammad’s user management.

  4. Create a Zammad access token with admin permissions and put it into zammad.auth.

  5. For testing, uncomment line 162 and put the email address of your own account into the string, so that the script will only apply changes to your account.

  6. Run the script. The output should look like this:

    zammad ~ # ./disable-notifications
    config my.account@example.tld notifications
    

    It shouldn’t actually change anything at this point.

  7. If everything looks good, re-run the script with -r:

    zammad ~ # ./disable-notifications -r
    config my.account@example.tld notifications
    

    The output should look the same, but now the email notifications of your account should be disabled.

  8. Comment line 162 again and run the script again to apply the change to all users.

@martin.von.wittich thanks for your script

However, right now I’m a bit shocked about the fact that the admin does not have control when and what message is sent by zammad. This can’t be serious for a business tool.

1 Like

I agree insofar that the notification defaults should be configurable by the admin, so that it would be possible to disable the email notifications in the defaults before creating lots of users that inherit these defaults (and actually defaulting to email notifications off for new installations probably wouldn’t hurt either).

Aside from the defaults, users should be free to enable/disable email notifications as they like, and I don’t think admins should be allowed to disable email notifications completely.

3 Likes

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.