Sending alert to client after quota has reached 100%
Hello all, I hope you are doing well.
In regards to the quota_warning configuration, more specifically when an email is sent to the user when quota has passed a certain percentage, i.e.:
quota_warning = <limit configuration> <quota-warning socket name> <parameters> #quota_warning2 = ... #quota_warning3 = ..etc..
Is it possible to communicate with the client by sending an ALERT IMAP message to stdout much like post-login scripting, rather than sending an email to the user?
i.e:
#!/bin/sh
# Message goes to stdout printf "* OK [ALERT] This is an alert\r\n" exec "$@"
Thank you.
On 19/04/2021 18:36 Dan Conway <darkc0de@archnix6.net> wrote:
Hello all, I hope you are doing well. In regards to the quota_warning configuration, more specifically when an email is sent to the user when quota has passed a certain percentage, i.e.:
quota_warning = <limit configuration> <quota-warning socket name> <parameters> #quota_warning2 = ... #quota_warning3 = ..etc.. Is it possible to communicate with the client by sending an ALERT IMAP message to stdout much like post-login scripting, rather than sending an email to the user? i.e: #!/bin/sh
# Message goes to stdout printf "* OK [ALERT] This is an alert\r\n" exec "$@" Thank you.
Probably, but it will not be straight forward. My recommendation would be to set some flag in your sql db (if you are using one for your users) that indicates that the user is over quota, and you can then check this in post-login script by exporting it into user's environment in userdb.
Aki
participants (2)
-
Aki Tuomi
-
Dan Conway