#imessage restrictions
1 messages ยท Page 1 of 1 (latest)
Based on the iMessage documentation, you're correct about the current state:
โ CAN restrict WHO can message the bot:
dmPolicy+allowFromfor DMs (pairing/allowlist mode)groupPolicy+groupAllowFromfor groups
โ CANNOT restrict WHO the bot sends messages TO:
The current config controls inbound access (who can reach the bot), but there's no outboundAllowFrom or similar setting to limit which contacts the bot can initiate messages to.
This is a reasonable feature gap. If you want the bot to only message specific contacts, your options are:
- Use the agent's system prompt - Add instructions like "Only message these contacts: [list]" in the agent's SOUL.md or system prompt
- Use a wrapper script - Create a custom
imsgwrapper that filters outbound messages by recipient - Request the feature - File a feature request at https://github.com/clawdbot/clawdbot/issues
The closest config option is channels.imessage.allowFrom but that only controls inbound DM pairing, not outbound sends.
For now, if you need strict outbound restrictions, a wrapper script around imsg that validates the recipient before passing through would be the workaround.
what do i include in that list if i list in the system prompt? the phone numbers of the contact?
Yes! Use the same formats imsg recognizes:
Example system prompt:
You may only message these contacts:
- +15551234567 (Mom)
- john@example.com (John)
- +15559876543 (Sister)
Do not initiate messages to anyone else.
imsg accepts:
- Phone numbers:
+15551234567 - Emails:
john@example.com - chat_id: numeric IDs from
imsg chats - iMessage handles:
user@icloud.com
To find the exact format for your contacts, run:
imsg chats --limit 20
That shows you how each contact appears in the Messages DB, so you can use those exact identifiers in the system prompt.
which "agent" system prompt" The overall systemp prompt for clawd? Or is there a system prompt specifically ttied to the imessage skill?