Condensate Into Attic Sewer Vent

I would imagine sewer gases could vent into the air handler.
Condensate into attic sewer vent. The condensate line is connected to the house drain vent piping. It doesn t seem correct. The other possibility is that a large amount of air is leaking around the holes in the dw and depending on the house. The vent opening should always rise above the trip level of the condensate overflow switch when it is in the primary drain line or pan or above the secondary aux overflow port on the primary drain pan.
This backup condensate system requirement refers for example to an indoor air handler installed in an attic or in living space where leakage into the attic ceiling or onto a floor system could cause damage to the structure. The pipe is also picking up heat from the central heating. I was adding insulation to my attic recently and noticed that the air handler condensate line was running into my stack vent. Is this code compliant.
In older homes condensate lines located in the attic where the evaporator coil is busy removing humidity and cooling the air with refrigerant charged lines are not tied to a home s plumbing system. This is causing the condensation. The inspectors say we if we discharge the condensate into the house s actual drainage system it must be by means of an indirect waste pipe. The air in the attic is a much lower temperature than the hot water running into the soil pipe.
This helps ensure that if a backup occurs that the water properly trips the switch instead of overflowing out of the vent. According to some experts and plumbing codes this is an improper plumbing connection and for some lines there also is no condensate trap in this plumbing arrangement risking possible bacteria or even dangerous sewer gases entering the building air handling system. The trap in the bathroom sink also prevents the sewer gasses from coming into your home and into your air conditioning system. Should this be fixed or should it be left alone.
And to clarify that an indirect waste pipe is something upstream of a trap rather than downstream and this includes the main venting stack as well.