How to create a Global email filter on the command line?
I reviewed the thread here:
Creating global email filter via command line
and the documentation here:
UAPI Functions - Email::store_filter - Software Development Kit - cPanel Documentation
Can a developer, or anyone help me here?
I'm at a loss how to create the filter I need. What I'm trying to do is:
but I get lost after the "fail" (for "action1=") part. Thanks!
- ]
- 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
uapi --user=username Email store_filter filtername=No Reply=no-reply%40DOMAIN.com action1=failbut I get lost after the "fail" (for "action1=") part. Thanks!
-
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.
Comments
1 comment