Date: Mon, 16 Nov 2015 22:12:50 +0000 From: Poul-Henning Kamp <phk@phk.freebsd.dk> To: hackers@freebsd.org Subject: Getting rid of 2*Njail sendmail processes Message-ID: <49034.1447711970@critter.freebsd.dk>
next in thread | raw e-mail | index | archive | help
It has always bothered me to no end, to have to run two sendmail processes in jails, just to be able to get the cron emails. Tonight I figured out how to avoid that: In the hosts rc.conf: sendmail_enable=YES That makes sendmail listen to *:25 In the jails rc.conf: sendmail_enable=NONE Add the magic sauce: Put all jail hostnames into the hosts /etc/mail/local-host-names The quick way: jls | awk '{print $3}' > /etc/mail/local-host-names That makes the hosts sendmail treat all the jails as itself. Clean up, from the host: killall sendmail sh /etc/rc.d/sendmail start Congratulations: You just got rid of 2*Njail sendmail processes. Obviously this doesn't allow you to receive email in the jails, so it is not a general solution for all jails, but only for the very common case where the only email activity is out of the jails. Poul-Henning PS: Somebody please stick this in the relevant handbooks/docs... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49034.1447711970>