Convert dynamic address-list to a static address-list

Hello guys.
Right now I have a script, that sends me an email after every 5 minute with “port scanners” IP’s.
If there are no IP’s, then it will not send me an email.
But I have a small setback, if i have set address-list “port scanners” timeout=3d , then i will get a lot of emails with the same IP’s.
What i want to do, is to make a script, that:

  1. sends me an email with IP’s listed in the “port scanners” address-list
  2. makes a new address-list named=“junk” and copies the IP’s from “port scanners” to it.
  3. clears the “port scanners” address-list , so when the script check new IP’s after every 5min then I will receive only new ones. that’s the main idea.

Cheers,
Ahto
ESTONIA

You can just use

address-list set list="junk" where list="port scanners"

right after you send the email.

Hi.
It gives syntax error.

Opps. Silly me. Contracted two different commands…

/ip firewall address-list
set [find list="port scanners"] list="junk"

Great.
I will try it and let you know, if it is what i need.

But I have a dynamic “port scanners” list.
With static list it works, but not with dynamic list.