I have a special virtual domain my postfix which is @special.mydomain.tld.
I would like any emails to that address to be sent to a command and as the first parameter of the email have the username from before @special or the entire email@example.com
Trouble is this:
I setup in virtual like so:
@special.mydomain.tld : firstname.lastname@example.org
and in alias
trouble is, the only way to recover is with the X-Original-To: header in the email, but it is not always correct.
Because I also have an alias on my server that points to a mailbox and an email on email@example.com
, so when emails from from here X-Original-To contains the first email and not the email for firstname.lastname@example.org
, so I am screwed.
1. Execute the command directly from a virtual alias ( I can't figure out how to do this )
2. Perhaps something in master.cf could be configured for this? Use transport to deliver it?
3. ... other ideas?
Any ideas what to do or how to do one of the ideas I suggested?
I have done a bit of research and it would seem that having the code in master.cf is the best way to handle this. What I need to figure out is how to tell the virtual delivery to deliver @special.domain.tld to special in master and everything else to virtual as it does by default.