I am looking to configure postfix to route messages to different relays based on the contents of a subject line.
The desired result would be if a user sent an outbound e-mail with a specific tag say "SECURE:" at the start of the subject line it would forward to one relay (18.104.22.168) but if the tag was not specified the message would be delivered another relay (22.214.171.124).
I have investigated header checks, before and after message filtering, and postfix proxy but I have not been able to pin down how to accomplish changing the mail route based on message contents (which seems like it should be a fairly simple thing to do).
I might expect to involve procmail for this task, but would like some assistance in where to begin. Can anyone assist?