Fix sendmail problem in default setting
By default, Gitlab uses sendmail to send email. However, the current Docker image does not have sendmail installed, and sendmail does not work out of box when installed in Docker. This PR addresses this problem by installing sendmail by default, and fixing hostname related issues which keeps sendmail from working properly.