Skip to main content

How to create a Global email filter on the command line?

Comments

1 comment

  • cPanelMichael
    I'm at a loss how to create the filter I need. What I'm trying to do is:
      ]
    • Create a global email filter
    • A filter name of: No Reply
    • A rule for any email "To" that contains "no-reply@domain.com[/EMAIL]"
    • Fail with the message: Error - Sorry this mailbox is unmonitored.
    • Then: Discard Message

    Hello, You can utilize a command such as:
    uapi --user=$username Email store_filter filtername=No%20Reply action1=fail dest1=Error%20-%20Sorry%20this%20mailbox%20is%20unmonitored. part1=\$header_to: match1=contains val1=no-reply%40domain.com
    You do not need to discard the message if you are already bouncing it with the "Fail" action. Let us know if this helps. Thank you.
    0

Please sign in to leave a comment.