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?

  • You can set the Hostname of the Jail to the FQDN you want sendmail to use. This is possible and should not lead to conflicts since the jail and host don't know much about each other. – sleeplessnerd Apr 21 '14 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.