I am building a mail server using FreeBSD 9.1-RELEASE with a jail.
On the direct OS, all what I have to do was only adding my domain name to
/etc/mail/local-host-names file. Anyway I wanted to run Sendmail in a jail.
So I add a jail, and added a NAT rule (using
pf) to redirect TCP 25 traffic into the jail.
In a Jail, Sendmail is working well, but there's one problem. When I am sending a mail in the jail, sender domain address is printed as the jail's hostname. This is expected an normal operation on direct OS, but in a jail, I want to change this default sender domain name to proper one.
How can I change default sender domain name of Sendmail?
Also, I am planning to install an IMAP server in the same jail.(maybe
dovecot) Can this affect to there too? If I want to make any future services work well, what should I do?