Getting incoming mail to work when port forwarding from a router

You can look at some other templates that modify files. The web templates do that, for example.