Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

In Progress UAPI - SpamAssassin::update_user_preference

Discussion in 'cPanel Developers' started by ruiz, Aug 10, 2018.

  1. ruiz

    ruiz Active Member

    Joined:
    Feb 13, 2008
    Messages:
    38
    Likes Received:
    2
    Trophy Points:
    58
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @ruiz


    In order to do multiple addresses you'll just do multiple value= entries for example:


    Code:
    # uapi --user=testuser SpamAssassin update_user_preference preference=whitelist_from value=test1@test.com value=test2@test.com value=test3@test.com
    
    apiversion: 3
    func: update_user_preference
    module: SpamAssassin
    result:
      data:
        whitelist_from:
          - test1@test.com
          - test2@test.com
          - test3@test.com
      errors: ~
      messages: ~
      metadata: {}
    
      status: 1
      warnings: ~
    Then to confirm that the whitelist was added:

    Code:
    [root@server .spamassassin]# cat /home/testuser/.spamassassin/user_prefs
    whitelist_from test1@test.com
    whitelist_from test2@test.com
    whitelist_from test3@test.com
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice