Stop automatic email linking to deals after it is closed lost or Won & Done?

Stop automatic email linking to deals after it is closed lost or Won & Done?

How do I closed automatic linking of emails to deal which are closed or Won & Done? This is really important for us because sometimes if a new RFQ comes in the email is gets linked into an old deal which is lost or won and done.