IBM QRadar SOAR

IBM QRadar SOAR

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  emailmessage objects difference between python2 and python3

    Posted Thu July 13, 2023 04:51 AM

    When I compare the provided Sample script to process inbound mail between v35(python2) and v49(python3), I noticed a wired difference.

    v35 script :  emailmessage.from

    v49 script :  emailmessage.sender 

    Also candidate fields for emailmessage has the above difference in in-product script page.

    Is this an intentional change or ...?



    ------------------------------
    Yohji Amano
    ------------------------------


  • 2.  RE: emailmessage objects difference between python2 and python3

    Posted Fri July 14, 2023 01:47 AM

    Hi Yohji,

    Have a look at https://www.ibm.com/docs/en/sqsp/47?topic=scripts-python-2-python-3-differences where it says:

    The from keyword in Python 3 clashes with the from attribute in the email message context object. For this reason, the use of emailmessage.from is not supported in Python 3 scripts and needs to be replaced by emailmessage.sender. Python 2 still supports emailmessage.from.



    ------------------------------
    BEN WILLIAMS
    ------------------------------



  • 3.  RE: emailmessage objects difference between python2 and python3

    Posted Fri July 14, 2023 03:24 AM

    Hi Ben,

    Thanks a lot for explaining why such a  difference exists.

    I just thought it may hit the custom script migration during python2 to python3, which will happen near future.



    ------------------------------
    Yohji Amano
    ------------------------------