Account username in exim_mainlog
Hello
I am writing a script for automatic account suspension when it reaches the max emails hour and exceeded the max defers.
To facilitate the procedure, I need the user account to be written to exim_mainlog.
Are there ways to do this? I'm not finding material that explains how to do it.
Thank you.
Konrath
-
Hello, You could utilize the following WHM API 1 function when developing your script if you needed to find the username associated with a domain name: whmapi1 listaccts search=domain.tld searchtype=domain
The account username associated with the domain name is listed under "user" in the output. Thank you.0 -
No more necessary The /scripts/suspendacct can suspend by domain name. I was able to make my script work. Thank you 0 -
My script works as follows: 1) I extract the domain name from the / var / log / exim_mainlog file by searching for max defer or max mail hour. 2) I keep the domain name in a variable 3) I execute the suspension of the account via script. PERFECT ! :) 0 -
I'm happy to see you found a suitable solution. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
4 comments