Will my emails be kept if I upgrade from 10.6.8 to 10.11? I have a (Mid 2009) Macbook Pro. I want to upgrade my MacOS X version from 10.6.8 to 10.11 but I have some issues.

I have so many important emails stored in Mail v4.5 on Snow Leopard that I don't want to lose. I wanted to know if I upgrade, will all my mail be kept in the new version of Mail?
The upgrade does keep all emails, but the new mail program will reprocess and reindex and move the actual files. 

IF there is corruption in the filed or database on your computer now, an upgrade is when things get worse, so be sure to back up your Mac before the upgrade. That way, no matter what happens with the script, you could wipe and go back to the way things were or investigate your follow on question of how to export or make the mails portable in general as opposed to trusting the upgrade does what is intended.