I have a problem when the mail server can't access the shared storage and then the emails start piling up in the mail queue. Now I would like postfix to try and send the emails to the secondary mail server if it can't do the delivery locally. Is it possible?
I don't know if posfix even supports something like this, because if the domain is in my_destinations then the delivery is local and can't be through a remote system.
Would it be easier to create a script that would check if the mail queue is too big and if it is restart postfix with a different config file, for example one that would make it only a backup mx server and relay mail to the other one. I hope I won't be reinventing the wheel.