Electronic switch with negative and positive voltage
Here is how I would do (well, I don't like relays, but it's a personal preference...).



The upper signal is the +12/-12 coming from MAX232. The lower signal is a +3.3/0V signal coming directly from the MCU to enable the "switch".

When the enable signal is high (3.3V), it drives the P channel FET gate low. Then, if the MAX232 signal is high, it will pass (because the mosfet gate sees a positive voltage). If the MAX 232 signal is low (-12V), the gate is not triggered, but the signal will still pass, because of the body diode (there will be a slight voltage drop, but not of big consequences at these levels).

When the enable signal is low and the MAX232 signal is high, the output is driven high impedance.

There is one big constraint: The MAX232 signal must always be high (+12V) when you disable the switch. Otherwise, if it is negative (-12V), the body diode will make the signal pass anyway. But this can easily be made sure in the firmware.

Note: Circuit has been updated In the previous circuit, I was using BJT NPN at the bottom. I realized that the negative voltage could have been destructive to the transistor, so an additional diode would have been necessary to protect it. So, actually, I changed it to a NFET, because then, there is no need for such a diode, and the base resistor can also be avoided. So it's only three components, now. And you can even get Nfet and Pfet in a single package, so that would be two components.