From b78a01cb0e2c959e4753723e940a3807c0381a8e Mon Sep 17 00:00:00 2001 From: cryx Date: Sun, 24 Jan 2010 21:22:39 +0000 Subject: Example flavour for using nullmailer as sendmail-replacement inside a jail, routing outgoing mail over an extern mailserver. --- examples/nullmailer-example/etc/mail/mailer.conf | 4 ++++ examples/nullmailer-example/etc/rc.conf | 26 ++++++++++++++++++++++ examples/nullmailer-example/ezjail.flavour | 10 +++++++++ .../usr/local/etc/nullmailer/remotes | 2 ++ 4 files changed, 42 insertions(+) create mode 100644 examples/nullmailer-example/etc/mail/mailer.conf create mode 100755 examples/nullmailer-example/etc/rc.conf create mode 100644 examples/nullmailer-example/ezjail.flavour create mode 100644 examples/nullmailer-example/usr/local/etc/nullmailer/remotes (limited to 'examples/nullmailer-example') diff --git a/examples/nullmailer-example/etc/mail/mailer.conf b/examples/nullmailer-example/etc/mail/mailer.conf new file mode 100644 index 0000000..c3fa67d --- /dev/null +++ b/examples/nullmailer-example/etc/mail/mailer.conf @@ -0,0 +1,4 @@ +# replace sendmail with nullmailer +sendmail /usr/local/libexec/nullmailer/sendmail +send-mail /usr/local/libexec/nullmailer/sendmail +mailq /usr/local/libexec/nullmailer/mailq diff --git a/examples/nullmailer-example/etc/rc.conf b/examples/nullmailer-example/etc/rc.conf new file mode 100755 index 0000000..e22f6f9 --- /dev/null +++ b/examples/nullmailer-example/etc/rc.conf @@ -0,0 +1,26 @@ +# Pretuned by German Engineers + +# No network interfaces in jails +network_interfaces="" + +# Prevent rpc +rpcbind_enable="NO" + +# Prevent loads of jails doing their cron jobs at the same time +cron_flags="$cron_flags -J 15" + +# Prevent syslog to open sockets +syslogd_flags="-ss" + +# Prevent sendmail to try to connect to localhost +sendmail_enable="NO" +sendmail_submit_enable="NO" +sendmail_outbound_enable="NO" +sendmail_msp_queue_enable="NO" + +# Bring up sshd, it takes some time and uses some entropy on first startup +# sshd_enable="YES" + +# Enable nullmailer for external mail delivery +nullmailer_enable="YES" + diff --git a/examples/nullmailer-example/ezjail.flavour b/examples/nullmailer-example/ezjail.flavour new file mode 100644 index 0000000..dc8c16e --- /dev/null +++ b/examples/nullmailer-example/ezjail.flavour @@ -0,0 +1,10 @@ +#!/bin/sh +# +# BEFORE: DAEMON +# +# ezjail flavour example + +# install nullmailer port +cd /usr/ports/mail/nullmailer +yes | make install +hostname > /usr/local/etc/nullmailer/me diff --git a/examples/nullmailer-example/usr/local/etc/nullmailer/remotes b/examples/nullmailer-example/usr/local/etc/nullmailer/remotes new file mode 100644 index 0000000..052f6c8 --- /dev/null +++ b/examples/nullmailer-example/usr/local/etc/nullmailer/remotes @@ -0,0 +1,2 @@ +# example smtp route +# 127.0.0.1 smtp -- cgit v1.2.3