Add pre and post migration scripts for mail

~~Depends on #13~~