How to stop hot air from engine compartment?

I think maybe in this case some good old-fashioned pipe dope may be the ticket, being the fact the valve will be opened/closed from time to time.