Community discussions

 
runbound
newbie
Topic Author
Posts: 30
Joined: Fri Apr 19, 2013 9:28 am

disabling rules in um

Mon Sep 10, 2018 6:04 am

somebody help me with the script please

1. usermanager account expired
once disabled
sending email and sms to me and to them
with body: your accont $name is temporarily disconnected due to unpaid balance
then add his ip address to ip firewall list with comment under his account

after 30 days
of non payment
sending email to me and to them
body: your account $name is permanent disconnected.




{
:foreach ExpireUser in=[/tool user-manager user find where !actual-profile] do={
/tool user-manager user disable $ExpireUser;
}
}

:do {/tool user-manager users
:local LIST "Reminder";
:foreach ix in=[find where ($sNAME)] do={
:local sNAME [get $ix name];
:if ([/ppp active find where name=$sNAME]!="") do={
:local IPadd [/ppp active get number=[find where name=$sNAME] address];
:do {/ip firewall address-list
:do {/tool e-mail send to="aaa@yahoo.com" subject="$sNAME" body="Temporary Disconnected" start-tls=yes}
:do {/tool e-mail send to="$email" subject="$sNAME" body="Temporary Disconnected" start-tls=yes}
:do {/sms send to="$sms" ="Your Account $sName is Temporary Disconnected"}
remove numbers=[find where comment=$sNAME && list=$LIST];
add list=$LIST address=$IPadd comment=$sNAME;
} on-error={:log error message=("move address of " . $sNAME . " to address-list failed")}
}
}
} on-error={:log error message="script failed..."}
Last edited by runbound on Sun Sep 16, 2018 4:04 pm, edited 1 time in total.
 
runbound
newbie
Topic Author
Posts: 30
Joined: Fri Apr 19, 2013 9:28 am

Re: disabling rules in um

Tue Sep 11, 2018 6:14 am

who can do this. i pay for it please contact me compra_30@yahoo.com
 
runbound
newbie
Topic Author
Posts: 30
Joined: Fri Apr 19, 2013 9:28 am

Re: disabling rules in um

Wed Sep 12, 2018 3:01 pm

sir ADahi i need you please reply :-(

Who is online

Users browsing this forum: No registered users and 11 guests