I'd like to create a pair of labels.

One would be "INTERNAL-ONLY". This label should match email threads that only include senders and receivers on the thread whose mail domain, @example.com, match my domain.

The second would be "EXTERNAL". This label should match the disjoint set. These are email threads that contain anyone in the sender or receipient list whose mail domain is anything other than @example.com.

1 Answer 1


You will want to create an Inbound Content Compliance rule that matches all mail and delivers it with modifications with the action being prepend a custom subject with EXTERNAL.

  • This answers a different question. The question was about applying a gmail-label to messages not editing the subject.
    – Blindspots
    Commented Apr 24, 2023 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.