We use JIRA Cloud for our ticketing system, which does not support using email aliases. Since we now have two domains in our system, with the second domain added as an alias in G Suite (same usernames across both). Management decided to use this new domain, domain2, as the primary FROM address for all users, which has caused issues in several places, such as in JIRA, since we cannot change the main domain in G Suite OR in JIRA, and emails can come from either domain1 or domain2.
So I'd like to set up a procmail (or equivalent) filter that checks the helpdesk@ email account via POP3, and for emails sent from domain1, it would add "inc" at the end so it matches domain2 in the email headers and email FROM field, and then send that message to a second email address that JIRA listens to. It would need appear as coming FROM user@domain1 as well, not the actual account sending it (which I know requires additional work on the G Suite end to allow).
Since JIRA doesn't allow any of this email processing internally, this would allow JIRA to work properly without add-ons that may not do what we need them to, and can get expensive since they're charged monthly, per user.
So I'm trying to see if procmail is even the easiest (or best) thing to set up for this (considering it's not maintained anymore), and which combination of agents would be easiest for this. There are so many options but I'm not sure which would be easiest to set up for this, or quite how to do it.
Once I know which direction to go, I should be able to figure out how to make it work. Just not sure where to begin here, which agents to use, how best to approach this.
Thank you!