Applied copy logic to the mail source module

Note that the mail modules does NOT work in this setup. Purpose of this
commit is to review build logic.