guberman at this time all server-side mail filtering must be done via the procmailrc setting for your mailbox.
You do not have direct access to the file, but if you want to script your procmailrc updates you can so so via the mailuser/update method in the Opalstack REST API.
Here's an example in Python that will apply a set of procmail rules for all of the mailboxes on your account:
import requests
TOKEN = "YOUR_API_TOKEN"
headers = {"Authorization": f"Token {TOKEN}", "Content-type": "application/json"}
procmail = """
YOUR
PROCMAIL
RULES
"""
mailboxes = requests.get(
"https://my.opalstack.com/api/v1/mailuser/list/", headers=headers
)
for mb in mailboxes.json():
payload = [{"id": mb["id"], "procmailrc": procmail}]
r = requests.post(
"https://my.opalstack.com/api/v1/mailuser/update/",
headers=headers,
json=payload,
)