I recently set up a cloud sync task on my local SCALE installation and noticed that while there are Alerts that you can configure for “Cloud Sync Task Failed”, you cannot configure them for when the tasks succeed. Is there some way to get email alerts when a cloud sync task succeeds? I tried adding a Post-Script command with a “mail” script but it errors as “mailing to remote domains not supported”, and I’m unsure how to configure the mail client. It would be nice if the same email setup I have for TrueNAS as a whole could simply handle “success” (or just “completed”) alerts for Cloud Sync Tasks.
I am also interested in getting it to work, it seems that the post-script is more or less gone since some versions, and although it was functional I found it a bit sketchy as you had to “hardcode” the destination email and so on
For me what would make most sense would be extending the Truenas functionality to add a proper “cloud sync succeed” alert as, perhaps, “Info” level, so it would profit from the entire already set alert infrastructure
From what I checked in the source-code alerts seems to be realized by this code in the backend:
(github)/truenas/middleware/tree/master/src/middlewared/middlewared/alert
But cloud sync alerts are actually defined in the cloud sync plugin:
(github)/truenas/middleware/blob/master/src/middlewared/middlewared/plugins/cloud_sync.py#L477
Would it perhaps be feasible to extend it and add the succeed alert?