Detailed control over notification emails

bertvandepoel

Verified User
Joined
Apr 7, 2023
Messages
32
Location
Brussels, Belgium
We install and maintain DirectAdmins for several of our customers. This sadly means that if they make mistakes or decide to use unusual configuration, we sometimes end up receiving the notifications/errors associated with our customers' actions. We've therefore been wonder for a while if there is a way to control these kinds of emails in a more fine-grained way.

Currently, we think we've found a way to not receive the "New Message: *** X.X.X.X has been added to the ip_blacklist file ***" emails through the block notification directadmin.conf, but for other emails such as "New Message: Error during automated certificate renewal for domain.tld" and "New Message: Your backups are now ready (id=1)" we've not found an easy way.

Would it perhaps not make sense to have a separate configuration panel/page to control which notifications you want to receive through email or not? Or is there an existing plugin or trick to do this? Or did we perhaps miss existing options?
 
Or did we perhaps miss existing options?
Some blacklist notices will not be send via DA but via CSF to root, you can disable CSF messages.
As for the notification about the LE scripts renewal, there is also a configuration option.

You might want to check the docs:

there is a search function in there. ;)

It should contain these options:
and

And here's a list of notifications you can enable or disable from csf.conf (the firewall):
 
Hello,

Or is there an existing plugin or trick to do this?

You might try these hooks:

  • /usr/local/directadmin/scripts/custom/sendSystemMessage_pre.sh
  • /usr/local/directadmin/scripts/custom/sendmail_pre.sh
  • /usr/local/directadmin/scripts/custom/sendSystemMessage_post.sh

A non-zero exit code in a PRE script usually terminates the process.
 
I had a look at the forums and documentation, to be clear. I guess my queries for "notifications" weren't ideal, but I am relatively new to DirectAdmin and its terminology. I was also somewhat expecting there would be some kind of central interface instead of different options spread across several configuration files, so that also threw me off the sent.

Thank you for all the suggestions. While it's not the centralised, fine-grained control I had been hoping for through the panel itself, it looks like it should help take away quite a large amount of annoying errors. Perhaps the developers might come across this post and feel inspired. My fingers are crossed!
 
Back
Top