black list by date

Discussion in 'Developers' Corner' started by najeh, Jun 12, 2018.

  1. najeh

    najeh Member

    Joined:
    Dec 9, 2016
    Messages:
    33
    Likes Received:
    1
    hello for all
    i want to black a number and remove the number in date for example
    i want to put the number in black list and remove it auto after 3 days ow month
    thank you for develpment
     
  2. dicko

    dicko Still learning but earning

    Joined:
    Oct 30, 2015
    Messages:
    544
    Likes Received:
    185

    Easiest way is to use now() as the value when bkacklisting, (the key just needs to be there, the value is not used)

    You will need modified blacklisting contexts ,
    copy them from extensions.conf to extention-override.conf and make your changes there, add a cron job to purge keys where the date value is older than '3 days ow month' ago
     
    #2 dicko, Jun 13, 2018
    Last edited: Jun 13, 2018
  3. najeh

    najeh Member

    Joined:
    Dec 9, 2016
    Messages:
    33
    Likes Received:
    1
    hello thank you for help how to do this give me example? and thank you again
     
  4. dicko

    dicko Still learning but earning

    Joined:
    Oct 30, 2015
    Messages:
    544
    Likes Received:
    185
    I guess the best way for you to proceed is to read and understand all these contexts

    egrep "^\[app-blacklist" extensions_additional.conf

    [app-blacklist]
    [app-blacklist-check]
    [app-blacklist-add]
    [app-blacklist-add-invalid]
    [app-blacklist-remove]
    [app-blacklist-remove-invalid]
    [app-blacklist-last]


    When you understand them yoy can copy them to the override file and add you requirements , as you can see, it will not be trivial so there aren't any 30 second "examples" available.
     
  5. najeh

    najeh Member

    Joined:
    Dec 9, 2016
    Messages:
    33
    Likes Received:
    1
    hello thank you for help
     

Share This Page