You can easily file an imported email to a Deal, Quote or Project record. Read on for more details.
Type the Deal code anywhere in the email subject field (or Quote/Project code). Send the email to your special email address.
The imported email will be filed to the particular record. You can find it in the History of a related account or contact at the same time.