Skip to main content

How to set the "Fail with message"-text, UAPI Email store_filter

Comments

3 comments

  • cPanelMichael
    Hello, Here's an example of what the filter rule looks like in the /etc/vfilters/$domain file:
    #TestRule if $header_from: contains "Test123" then if error_message then save "/dev/null" 660 else fail fail "Test Failure Message 123" endif endif
    Thus, to answer your question, for the action parameter of this UAPI function, enter it as:
    fail "This is a test failure message"
    I verified this works as expected using the API Shell option in cPanel: ]https://forums.cpanel.net/data/attachments/47/47351-89cfc5f203c10498e3f02f1b2a9fca4c.jpg
    Thank you.
    0
  • Svintaj
    Thank you Michael, now you made me understand!:) I first thought I had to pass a variable so I was trying: fail&fail="This is a test failure message", with no luck. Was banging my head against that wall, thought I just needed the right variable-name and tried everything I could imagine... But now I realize that I just have to write: fail "This is a test failure message", just as you said and it works perfect. Many thanks!
    0
  • cPanelMichael
    I'm happy to see the information provided to you was helpful. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.