Administrative email from FreeBSD jails

Valeri Galtsev galtsev at
Fri Feb 16 16:27:12 UTC 2018

On 02/16/18 08:08, Dean E. Weimer wrote:
> On 2018-02-16 7:52 am, James B. Byrne via freebsd-questions wrote:
>> I have the relocated WebDAV site running in a jail on FreeBSD-11.1.
>> The question I now have what is the simplest method to redirect all
>> email generated in the jail to our smart hub.  I am conversant with
>> doing this using Postfix but that seems a bit of a heavyweight
>> solution in this instance.
>> Is the any simpler software package that can forward all application
>> and system generated email from a jail to an external hub?
>> How do other people handle this requirement in their jails?
> I just use the mailertable feature of sendmail.
> Edit the contents of /etc/mail/mailertable
> To do all mail put a single line in it.
> .       smtp:[]
> Then run make && make restart from the /etc/mail directory, Sendmail 
> will then forward all mail to the mail server specified. You can also 
> add secondary server using a : as a separator.
As I replace sendmail with postfix since forever... I just have jails 
built so that sendmail is disabled in them, and if I have anything 
inside jail that only is capable to localhost as smtp setver, then I run 
postfix instance inside such jail. Similarly to what Dean does: running 
smtp server inside particular jail, only using postfix instead of 
sendmail. I do like in that case to have postfix listen to localhost 
inet interface only. I don't know if that is started by ezjail script, 
but in jails I build - by the book - I have to configure local inet 
interface in particular jail configuration, then postfix does have local 
interface to listen to, otherwise it will not start.

Good luck!

Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247

More information about the freebsd-questions mailing list