Results 1 to 2 of 2
  1. #1
    Untangler
    Join Date
    Feb 2010
    Posts
    33

    Default Powershell script to export user's safesenders list

    Code:
     
    $jc = @();
     $ss = @(); 
    
    ## settings_8.js file is located  /usr/share/untangle/settings/smtp/settings_8.js
     $JSONFile = Get-Content -Raw -Path 'settings_8.js'
    
     $JSON = ConvertFrom-Json -InputObject $JSONFile
     
    
     foreach ($jc In $JSON) 
     {
        
        $ss = new-object psobject $jc.safelistSettings
        ($ss.list | select recipient, sender)
     }
    Jim.Alles and tonytran like this.

  2. #2
    Newbie
    Join Date
    Feb 2020
    Posts
    1

    Default

    Thanks for this script. It helped me to export the list very quick!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2