Postfix Backup MX (Nomad)

Overview

IMPORTANT NOTE: THIS IS A BETA IMAGE!

This is a Postfix jail that can be started with pot but it can also be deployed via nomad.

For more details about nomadimages, see about potluck.

The jail exposes these parameters that can either be set via the environment or by setting the cookparameters (the latter either via nomad, see example below, or by editing the downloaded jails pot.conf file):

Environment cook parameter Content
HOSTNAME -h Optional: myhostname in main.cf
MYNETWORKS -n Optional: mynetworks in main.cf (private network addresses that are permitted to send outbound)
RELAYDOMAINS -d relay_domains in main.cf (domains this server feels responsible for)
SMTPDBANNER -b Optional: smtpd_banner in main.cf

Nomad Job Description Example

Example with passing parameters to the cook script:

job "backupmx" {
  datacenters = ["mydc"]
  type        = "service"

  group "group1" {
    count = 1 

    task "backupmx1" {
      driver = "pot"

      service {
        tags = ["backupmx", "postfix"]
        name = "backupmx"
        port = "smtp"

         check {
            type     = "tcp"
            name     = "tcp"
            interval = "60s"
            timeout  = "30s"
          }
      }
      
      config {
        image = "https://potluck.honeyguide.net/postfix-backupmx-nomad"
        pot = "postfix-backupmx-nomad-amd64-12_1"
        tag = "1.0"
        command = "/usr/local/bin/cook"
        args = ["-n","10.10.10.10/32","-d","'example1.com, example2.com, example.de'","-b","'mx2.example1.com ESMTP \\$mail_name'","-h","mx2.example1.com"]

        port_map = {
          smtp = "25"
        }
      }

      resources {
        cpu = 200
        memory = 64

        network {
          mbits = 10
          port "smtp" {
            static = 25000
          }
        }
      }
    }
  }
}

Example with passing parameters via environment variables (not working with pot 0.11.2 or below due to a bug):

job "backupmx" {
  datacenters = ["mydc"]
  type        = "service"

  group "group1" {
    count = 1 

    task "backupmx1" {
      driver = "pot"

      service {
        tags = ["backupmx", "postfix"]
        name = "backupmx"
        port = "smtp"

         check {
            type     = "tcp"
            name     = "tcp"
            interval = "60s"
            timeout  = "30s"
          }
      }
      
      env {
        MYNETWORKS = "10.10.10.10/32"
        RELAYDOMAINS = "'example1.com, example2.com, example.de'"
        SMTPDBANNER = "'mx2.example1.com ESMTP \\$mail_name'"
        HOSTNAME = "mx2.example1.com"
       }
       config {
        image = "https://potluck.honeyguide.net/postfix-backupmx-nomad"
        pot = "postfix-backupmx-nomad-amd64-12_1"
        tag = "1.0"
        command = "/usr/local/bin/cook"
        args = [""]

        port_map = {
          smtp = "25"
        }
      }

      resources {
        cpu = 200
        memory = 64

        network {
          mbits = 10
          port "smtp" {
            static = 25000
          }
        }
      }
    }
  }
}

How To Use The Ready-Made Image

FreeBSD 12.1:
pot import -p postfix-backupmx-nomad-amd64-12_1 -t 1.0 -U https://potluck.honeyguide.net/postfix-backupmx-nomad

FreeBSD 11.4:
pot import -p postfix-backupmx-nomad-amd64-11_4 -t 1.0 -U https://potluck.honeyguide.net/postfix-backupmx-nomad

Note: Some images might require specific network configuration, double check the Overview-chapter at the top.

Alternatively: Create a Jail With This Flavour Yourself

1. Create Flavour Files

Create the following
/usr/local/etc/pot/flavours/postfix-backupmx-nomad.sh
and
chmod ugo+x /usr/local/etc/pot/flavours/postfix-backupmx-nomad.sh

#!/bin/sh

# POTLUCK TEMPLATE v2.0
# EDIT THE FOLLOWING FOR NEW FLAVOUR:
# 1. RUNS_IN_NOMAD - yes or no
# 2. Create a matching <flavour> file with this <flavour>.sh file that
#    contains the copy-in commands for the config files from <flavour>.d/
#    Remember that the package directories don't exist yet, so likely copy to /root
# 3. Adjust package installation between BEGIN & END PACKAGE SETUP
# 4. Adjust jail configuration script generation between BEGIN & END COOK
#    Configure the config files that have been copied in where necessary

# Set this to true if this jail flavour is to be created as a nomad (i.e. blocking) jail.
# You can then query it in the cook script generation below and the script is installed
# appropriately at the end of this script 
RUNS_IN_NOMAD=true

# -------------- BEGIN PACKAGE SETUP -------------
[ -w /etc/pkg/FreeBSD.conf ] && sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
ASSUME_ALWAYS_YES=yes pkg bootstrap
touch /etc/rc.conf
sysrc sendmail_enable="NO"

# Install packages
pkg install -y postfix 
pkg clean -y
# -------------- END PACKAGE SETUP -------------

#
# Create configurations
#

#
# Now generate the run command script "cook"
# It configures the system on the first run by creating the config file(s) 
# On subsequent runs, it only starts sleeps (if nomad-jail) or simply exits 
#

# ----------------- BEGIN COOK ------------------ 
echo "#!/bin/sh
RUNS_IN_NOMAD=$RUNS_IN_NOMAD
# No need to change this, just ensures configuration is done only once
if [ -e /usr/local/etc/pot-is-seasoned ]
then
    # If this pot flavour is blocking (i.e. it should not return), 
    # we block indefinitely
    if [ \$RUNS_IN_NOMAD ]
    then
        /bin/sh /etc/rc
        tail -f /dev/null 
    fi
    exit 0
fi

# ADJUST THIS: STOP SERVICES AS NEEDED BEFORE CONFIGURATION
/usr/local/etc/rc.d postfix stop || true

# No need to adjust this:
# If this pot flavour is not blocking, we need to read the environment first from /tmp/environment.sh
# where pot is storing it in this case
if [ -e /tmp/environment.sh ]
then
    . /tmp/environment.sh
fi


#
# ADJUST THIS BY CHECKING FOR ALL VARIABLES YOUR FLAVOUR NEEDS:
#

# Convert parameters to variables if passed (overwrite environment)
while getopts h:n:d:b: option
do
    case \"\${option}\"
    in
      h) HOSTNAME=\${OPTARG};;
      n) MYNETWORKS=\${OPTARG};;
      d) RELAYDOMAINS=\${OPTARG};;
      b) SMTPDBANNER=\${OPTARG};;
    esac
done

# Check config variables are set
if [ -z \${MYNETWORKS+x} ]; 
then 
    echo 'MYNETWORKS is unset - setting it to 192.168.0.0/16,10.0.0.0/8' >> /var/log/cook.log
    echo 'MYNETWORKS is unset - setting it to 192.168.0.0/16,10.0.0.0/8'
    MYNETWORKS=\"192.168.0.0/16,10.0.0.0/8\" 
fi
if [ -z \${RELAYDOMAINS+x} ];
then
    echo 'RELAYDOMAINS is unset - see documentation how to configure this flavour' >> /var/log/cook.log
    echo 'RELAYDOMAINS is unset - see documentation how to configure this flavour'
    exit 1
fi
if [ -z \${SMTPDBANNER+x} ];
then
    echo 'SMTPDBANNER is unset - setting it to \"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\"' >> /var/log/cook.log
    echo 'SMTPDBANNER is unset - setting it to \"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\"'
    SMTPDBANNER=\"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\" 
fi
if [ -z \${HOSTNAME+x} ];
then
    echo 'HOSTNAME is unset - setting it to \"backupmx\"' >> /var/log/cook.log
    echo 'HOSTNAME is unset - setting it to \"backupmx\"'
    HOSTNAME=\"backupmx\" 
fi

# ADJUST THIS BELOW: NOW ALL THE CONFIGURATION FILES NEED TO BE ADJUSTED & COPIED:

# main.cf 
[ -w /root/main.cf ] && sed -i '' \"s&\\\$MYNETWORKS&\$MYNETWORKS&\" /root/main.cf 
[ -w /root/main.cf ] && sed -i '' \"s/\\\$RELAYDOMAINS/\$RELAYDOMAINS/\" /root/main.cf
[ -w /root/main.cf ] && sed -i '' \"s/\\\$SMTPDBANNER/\$SMTPDBANNER/\" /root/main.cf
[ -w /root/main.cf ] && sed -i '' \"s/\\\$HOSTNAME/\$HOSTNAME/\" /root/main.cf

mkdir -p /usr/local/etc/postfix
mv /root/main.cf /usr/local/etc/postfix

mkdir -p /usr/local/etc/mail
install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf

[ -w /etc/syslog.conf ] && sed -i '' \"s/# mail.info/mail.info/\" /etc/syslog.conf
/etc/rc.d/syslogd restart

# ADJUST THIS: START THE SERVICES AGAIN AFTER CONFIGURATION

sysrc postfix_enable=\"YES\"
/usr/local/etc/rc.d/postfix restart

# Do not touch this:
touch /usr/local/etc/pot-is-seasoned
# If this pot flavour is blocking (i.e. it should not return), there is no /tmp/environment.sh
# created by pot and we now after configuration block indefinitely
if [ \$RUNS_IN_NOMAD ]
then
    /bin/sh /etc/rc
    tail -f /dev/null
fi
" > /usr/local/bin/cook

# ----------------- END COOK ------------------


# ---------- NO NEED TO EDIT BELOW ------------

chmod u+x /usr/local/bin/cook

#
# There are two ways of running a pot jail: "Normal", non-blocking mode and
# "Nomad", i.e. blocking mode (the pot start command does not return until
# the jail is stopped).
# For the normal mode, we create a /usr/local/etc/rc.d script that starts
# the "cook" script generated above each time, for the "Nomad" mode, the cook
# script is started by pot (configuration through flavour file), therefore
# we do not need to do anything here.
# 

# Create rc.d script for "normal" mode:
echo "#!/bin/sh
#
# PROVIDE: cook 
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
. /etc/rc.subr
name=cook
rcvar=cook_enable
load_rc_config $name
: ${cook_enable:=\"NO\"}
: ${cook_env:=\"\"}
command=\"/usr/local/bin/cook\"
command_args=\"\"
run_rc_command \"\$1\"
" > /usr/local/etc/rc.d/cook

chmod u+x /usr/local/etc/rc.d/cook

if [ $RUNS_IN_NOMAD = false ]
then
    # This is a non-nomad (non-blocking) jail, so we need to make sure the script
    # gets started when the jail is started:
    # Otherwise, /usr/local/bin/cook will be set as start script by the pot flavour
    echo "cook_enable=\"YES\"" >> /etc/rc.conf
fi

Create the following /usr/local/etc/pot/flavours/postfix-backupmx-nomad:

set-attribute -A persistent -V OFF
set-attribute -A no-rc-script -V ON
copy-in -s /usr/local/etc/pot/flavours/postfix-backupmx-nomad.d/main.cf -d /root

Create the following /usr/local/etc/pot/flavours/postfix-backupmx-nomad+4:

set-cmd -c "/usr/local/bin/cook"

2. Create Jail From Flavour

Run
pot create -b <FreeBSD Version> -p <jailname> -t single -N public-bridge -f fbsd-update -f postfix-backupmx-nomad -f postfix-backupmx-nomad+4

with your FreeBSD version (e.g. 12.1) and the name your jail should get.

Note: Some images might require specific network configuration, double check the Overview-chapter at the top.

Version History

1.0

  • Tested version

0.9

  • Initial commit, beta

These images were built on Wed Aug 12 14:04:38 UTC 2020

Manual Image Download Links

postfix-backupmx-nomad-amd64-12_1_1.0.xz ( 210.893 MB )
postfix-backupmx-nomad-amd64-12_1_1.0.xz.skein ( 0.250977 KB )

postfix-backupmx-nomad-amd64-11_4_1.0.xz ( 175.606 MB )
postfix-backupmx-nomad-amd64-11_4_1.0.xz.skein ( 0.250977 KB )

Jenkins Pot Creation Logs

postfix-backupmx-nomad-amd64-12_1_1.0:


postfix-backupmx-nomad/postfix-backupmx-nomad:
set-attribute -A persistent -V OFF
set-attribute -A no-rc-script -V ON
copy-in -s /usr/local/etc/pot/flavours/postfix-backupmx-nomad.d/main.cf -d /root
postfix-backupmx-nomad/postfix-backupmx-nomad.sh:
#!/bin/sh

# POTLUCK TEMPLATE v2.0
# EDIT THE FOLLOWING FOR NEW FLAVOUR:
# 1. RUNS_IN_NOMAD - yes or no
# 2. Create a matching <flavour> file with this <flavour>.sh file that
#    contains the copy-in commands for the config files from <flavour>.d/
#    Remember that the package directories don't exist yet, so likely copy to /root
# 3. Adjust package installation between BEGIN & END PACKAGE SETUP
# 4. Adjust jail configuration script generation between BEGIN & END COOK
#    Configure the config files that have been copied in where necessary

# Set this to true if this jail flavour is to be created as a nomad (i.e. blocking) jail.
# You can then query it in the cook script generation below and the script is installed
# appropriately at the end of this script 
RUNS_IN_NOMAD=true

# -------------- BEGIN PACKAGE SETUP -------------
[ -w /etc/pkg/FreeBSD.conf ] && sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
ASSUME_ALWAYS_YES=yes pkg bootstrap
touch /etc/rc.conf
sysrc sendmail_enable="NO"

# Install packages
pkg install -y postfix 
pkg clean -y
# -------------- END PACKAGE SETUP -------------

#
# Create configurations
#

#
# Now generate the run command script "cook"
# It configures the system on the first run by creating the config file(s) 
# On subsequent runs, it only starts sleeps (if nomad-jail) or simply exits 
#

# ----------------- BEGIN COOK ------------------ 
echo "#!/bin/sh
RUNS_IN_NOMAD=$RUNS_IN_NOMAD
# No need to change this, just ensures configuration is done only once
if [ -e /usr/local/etc/pot-is-seasoned ]
then
    # If this pot flavour is blocking (i.e. it should not return), 
    # we block indefinitely
    if [ \$RUNS_IN_NOMAD ]
    then
        /bin/sh /etc/rc
        tail -f /dev/null 
    fi
    exit 0
fi

# ADJUST THIS: STOP SERVICES AS NEEDED BEFORE CONFIGURATION
/usr/local/etc/rc.d postfix stop || true

# No need to adjust this:
# If this pot flavour is not blocking, we need to read the environment first from /tmp/environment.sh
# where pot is storing it in this case
if [ -e /tmp/environment.sh ]
then
    . /tmp/environment.sh
fi


#
# ADJUST THIS BY CHECKING FOR ALL VARIABLES YOUR FLAVOUR NEEDS:
#

# Convert parameters to variables if passed (overwrite environment)
while getopts h:n:d:b: option
do
    case \"\${option}\"
    in
      h) HOSTNAME=\${OPTARG};;
      n) MYNETWORKS=\${OPTARG};;
      d) RELAYDOMAINS=\${OPTARG};;
      b) SMTPDBANNER=\${OPTARG};;
    esac
done

# Check config variables are set
if [ -z \${MYNETWORKS+x} ]; 
then 
    echo 'MYNETWORKS is unset - setting it to 192.168.0.0/16,10.0.0.0/8' >> /var/log/cook.log
    echo 'MYNETWORKS is unset - setting it to 192.168.0.0/16,10.0.0.0/8'
    MYNETWORKS=\"192.168.0.0/16,10.0.0.0/8\" 
fi
if [ -z \${RELAYDOMAINS+x} ];
then
    echo 'RELAYDOMAINS is unset - see documentation how to configure this flavour' >> /var/log/cook.log
    echo 'RELAYDOMAINS is unset - see documentation how to configure this flavour'
    exit 1
fi
if [ -z \${SMTPDBANNER+x} ];
then
    echo 'SMTPDBANNER is unset - setting it to \"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\"' >> /var/log/cook.log
    echo 'SMTPDBANNER is unset - setting it to \"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\"'
    SMTPDBANNER=\"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\" 
fi
if [ -z \${HOSTNAME+x} ];
then
    echo 'HOSTNAME is unset - setting it to \"backupmx\"' >> /var/log/cook.log
    echo 'HOSTNAME is unset - setting it to \"backupmx\"'
    HOSTNAME=\"backupmx\" 
fi

# ADJUST THIS BELOW: NOW ALL THE CONFIGURATION FILES NEED TO BE ADJUSTED & COPIED:

# main.cf 
[ -w /root/main.cf ] && sed -i '' \"s&\\\$MYNETWORKS&\$MYNETWORKS&\" /root/main.cf 
[ -w /root/main.cf ] && sed -i '' \"s/\\\$RELAYDOMAINS/\$RELAYDOMAINS/\" /root/main.cf
[ -w /root/main.cf ] && sed -i '' \"s/\\\$SMTPDBANNER/\$SMTPDBANNER/\" /root/main.cf
[ -w /root/main.cf ] && sed -i '' \"s/\\\$HOSTNAME/\$HOSTNAME/\" /root/main.cf

mkdir -p /usr/local/etc/postfix
mv /root/main.cf /usr/local/etc/postfix

mkdir -p /usr/local/etc/mail
install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf

[ -w /etc/syslog.conf ] && sed -i '' \"s/# mail.info/mail.info/\" /etc/syslog.conf
/etc/rc.d/syslogd restart

# ADJUST THIS: START THE SERVICES AGAIN AFTER CONFIGURATION

sysrc postfix_enable=\"YES\"
/usr/local/etc/rc.d/postfix restart

# Do not touch this:
touch /usr/local/etc/pot-is-seasoned
# If this pot flavour is blocking (i.e. it should not return), there is no /tmp/environment.sh
# created by pot and we now after configuration block indefinitely
if [ \$RUNS_IN_NOMAD ]
then
    /bin/sh /etc/rc
    tail -f /dev/null
fi
" > /usr/local/bin/cook

# ----------------- END COOK ------------------


# ---------- NO NEED TO EDIT BELOW ------------

chmod u+x /usr/local/bin/cook

#
# There are two ways of running a pot jail: "Normal", non-blocking mode and
# "Nomad", i.e. blocking mode (the pot start command does not return until
# the jail is stopped).
# For the normal mode, we create a /usr/local/etc/rc.d script that starts
# the "cook" script generated above each time, for the "Nomad" mode, the cook
# script is started by pot (configuration through flavour file), therefore
# we do not need to do anything here.
# 

# Create rc.d script for "normal" mode:
echo "#!/bin/sh
#
# PROVIDE: cook 
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
. /etc/rc.subr
name=cook
rcvar=cook_enable
load_rc_config $name
: ${cook_enable:=\"NO\"}
: ${cook_env:=\"\"}
command=\"/usr/local/bin/cook\"
command_args=\"\"
run_rc_command \"\$1\"
" > /usr/local/etc/rc.d/cook

chmod u+x /usr/local/etc/rc.d/cook

if [ $RUNS_IN_NOMAD = false ]
then
    # This is a non-nomad (non-blocking) jail, so we need to make sure the script
    # gets started when the jail is started:
    # Otherwise, /usr/local/bin/cook will be set as start script by the pot flavour
    echo "cook_enable=\"YES\"" >> /etc/rc.conf
fi


postfix-backupmx-nomad/postfix-backupmx-nomad+1:
postfix-backupmx-nomad/postfix-backupmx-nomad+1.sh:

postfix-backupmx-nomad/postfix-backupmx-nomad+2:
postfix-backupmx-nomad/postfix-backupmx-nomad+2.sh:

postfix-backupmx-nomad/postfix-backupmx-nomad+3:
postfix-backupmx-nomad/postfix-backupmx-nomad+3.sh:

postfix-backupmx-nomad/postfix-backupmx-nomad+4:
set-cmd -c "/usr/local/bin/cook"
postfix-backupmx-nomad/postfix-backupmx-nomad+4.sh:
Password:=====>  -i auto: assigned 10.192.0.3
===>  Creating a new pot
===>  pot name : postfix-backupmx-nomad-amd64-12_1
===>  type : single
===>  base : 12.1
===>  pot_base :
===>  level : 0
===>  network-type: public-bridge
===>  ip : 10.192.0.3
===>  bridge :
===>  dns : inherit
===>  flavours : fbsd-update postfix-backupmx-nomad postfix-backupmx-nomad+1 postfix-backupmx-nomad+2 postfix-backupmx-nomad+3 postfix-backupmx-nomad+4
===>  Fetching FreeBSD 12.1
===>  Extract the tarball
=====>  Flavour: fbsd-update
=====>  Starting postfix-backupmx-nomad-amd64-12_1 pot for the initial bootstrap
=====>  mount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp
defaultrouter: NO -> 10.192.0.1
===>  Starting the pot postfix-backupmx-nomad-amd64-12_1
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path: /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
	inet 127.0.0.1 netmask 0xff000000
	groups: lo
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:8b:69:e4:f5:0b
	inet 10.192.0.3 netmask 0xffc00000 broadcast 10.255.255.255
	groups: epair
	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Generating host.conf.
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp (X related).
Updating motd:.
Starting sendmail_submit.
Starting sendmail_msp_queue.
Starting cron.

Wed Aug 12 13:59:42 UTC 2020
/usr/local/etc/pot/flavours/fbsd-update.sh -> /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp/fbsd-update.sh
=====>  Executing fbsd-update script on postfix-backupmx-nomad-amd64-12_1
src component not installed, skipped
freebsd-update fetch should not be run non-interactively.
Run freebsd-update cron instead.
src component not installed, skipped
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
=====>  Stop the pot postfix-backupmx-nomad-amd64-12_1
=====>  Remove epair0[a|b] network interfaces
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/dev
=====>  Flavour: postfix-backupmx-nomad
=====>  Executing postfix-backupmx-nomad pot commands on postfix-backupmx-nomad-amd64-12_1
=====>  mount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp
/usr/local/etc/pot/flavours/postfix-backupmx-nomad.d/main.cf -> /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/root/main.cf
=====>  Source /usr/local/etc/pot/flavours/postfix-backupmx-nomad.d/main.cf copied in the pot postfix-backupmx-nomad-amd64-12_1
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp
=====>  /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/dev is already unmounted
=====>  Starting postfix-backupmx-nomad-amd64-12_1 pot for the initial bootstrap
=====>  mount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp
===>  Starting the pot postfix-backupmx-nomad-amd64-12_1
add net default: gateway 10.192.0.1
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path: /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
	inet 127.0.0.1 netmask 0xff000000
	groups: lo
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:1d:15:15:ec:0b
	inet6 fe80::1d:15ff:fe15:ec0b%epair0b prefixlen 64 tentative scopeid 0x2
	inet 10.192.0.3 netmask 0xffc00000 broadcast 10.255.255.255
	groups: epair
	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp (X related).
Updating motd:.
Starting sendmail_submit.
Starting sendmail_msp_queue.
Starting cron.

Wed Aug 12 13:59:47 UTC 2020
/usr/local/etc/pot/flavours/postfix-backupmx-nomad.sh -> /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp/postfix-backupmx-nomad.sh
=====>  Executing postfix-backupmx-nomad script on postfix-backupmx-nomad-amd64-12_1
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] Installing pkg-1.14.6...
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] Extracting pkg-1.14.6: .......... done
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
sendmail_enable: NO -> NO
Updating FreeBSD repository catalogue...
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] Fetching meta.conf: . done
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] Fetching packagesite.txz: .......... done
Processing entries: .......... done
FreeBSD repository update completed. 32011 packages processed.
All repositories are up to date.
Updating database digests format: . done
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	icu: 67.1,1
	pcre: 8.44
	postfix: 3.5.6,1

Number of packages to be installed: 3

The process will require 62 MiB more space.
13 MiB to be downloaded.
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [1/3] Fetching postfix-3.5.6,1.txz: .......... done
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [2/3] Fetching pcre-8.44.txz: .......... done
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [3/3] Fetching icu-67.1,1.txz: .......... done
Checking integrity... done (0 conflicting)
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [1/3] Installing pcre-8.44...
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [1/3] Extracting pcre-8.44: .......... done
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [2/3] Installing icu-67.1,1...
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [2/3] Extracting icu-67.1,1: .......... done
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [3/3] Installing postfix-3.5.6,1...
===> Creating groups.
Using existing group 'mail'.
Creating group 'maildrop' with gid '126'.
Creating group 'postfix' with gid '125'.
===> Creating users
Creating user 'postfix' with uid '125'.
===> Creating homedir(s)
Adding user 'postfix' to group 'mail'.
[postfix-backupmx-nomad-amd64-12_1.vsf00001.cpt.za.honeyguide.net] [3/3] Extracting postfix-3.5.6,1: .......... done

===============================================================
Postfix was *not* activated in /usr/local/etc/mail/mailer.conf! 

To finish installation run the following commands:

  mkdir -p /usr/local/etc/mail
  install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf
===============================================================

=====
Message from postfix-3.5.6,1:

--
To use postfix instead of sendmail:
  - clear sendmail queue and stop the sendmail daemons

Run the following commands to enable postfix during startup:
  - sysrc postfix_enable="YES"
  - sysrc sendmail_enable="NONE"

If postfix is *not* already activated in /usr/local/etc/mail/mailer.conf
  - mv /usr/local/etc/mail/mailer.conf /usr/local/etc/mail/mailer.conf.old
  - install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf

Disable sendmail(8) specific tasks,
add the following lines to /etc/periodic.conf(.local):
  daily_clean_hoststat_enable="NO"
  daily_status_mail_rejects_enable="NO"
  daily_status_include_submit_mailq="NO"
  daily_submit_queuerun="NO"

If you are using SASL, you need to make sure that postfix has access to read
the sasldb file.  This is accomplished by adding postfix to group mail and
making the /usr/local/etc/sasldb* file(s) readable by group mail (this should
be the default for new installs).
Nothing to do.
=====>  Stop the pot postfix-backupmx-nomad-amd64-12_1
=====>  Remove epair0[a|b] network interfaces
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/tmp
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-12_1/m/dev
=====>  Flavour: postfix-backupmx-nomad+1
=====>  Executing postfix-backupmx-nomad+1 pot commands on postfix-backupmx-nomad-amd64-12_1
=====>  No shell script available for the flavour postfix-backupmx-nomad+1
=====>  Flavour: postfix-backupmx-nomad+2
=====>  Executing postfix-backupmx-nomad+2 pot commands on postfix-backupmx-nomad-amd64-12_1
=====>  No shell script available for the flavour postfix-backupmx-nomad+2
=====>  Flavour: postfix-backupmx-nomad+3
=====>  Executing postfix-backupmx-nomad+3 pot commands on postfix-backupmx-nomad-amd64-12_1
=====>  No shell script available for the flavour postfix-backupmx-nomad+3
=====>  Flavour: postfix-backupmx-nomad+4
=====>  Executing postfix-backupmx-nomad+4 pot commands on postfix-backupmx-nomad-amd64-12_1
=====>  No shell script available for the flavour postfix-backupmx-nomad+4

postfix-backupmx-nomad-amd64-11_4_1.0:


postfix-backupmx-nomad/postfix-backupmx-nomad:
set-attribute -A persistent -V OFF
set-attribute -A no-rc-script -V ON
copy-in -s /usr/local/etc/pot/flavours/postfix-backupmx-nomad.d/main.cf -d /root
postfix-backupmx-nomad/postfix-backupmx-nomad.sh:
#!/bin/sh

# POTLUCK TEMPLATE v2.0
# EDIT THE FOLLOWING FOR NEW FLAVOUR:
# 1. RUNS_IN_NOMAD - yes or no
# 2. Create a matching <flavour> file with this <flavour>.sh file that
#    contains the copy-in commands for the config files from <flavour>.d/
#    Remember that the package directories don't exist yet, so likely copy to /root
# 3. Adjust package installation between BEGIN & END PACKAGE SETUP
# 4. Adjust jail configuration script generation between BEGIN & END COOK
#    Configure the config files that have been copied in where necessary

# Set this to true if this jail flavour is to be created as a nomad (i.e. blocking) jail.
# You can then query it in the cook script generation below and the script is installed
# appropriately at the end of this script 
RUNS_IN_NOMAD=true

# -------------- BEGIN PACKAGE SETUP -------------
[ -w /etc/pkg/FreeBSD.conf ] && sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
ASSUME_ALWAYS_YES=yes pkg bootstrap
touch /etc/rc.conf
sysrc sendmail_enable="NO"

# Install packages
pkg install -y postfix 
pkg clean -y
# -------------- END PACKAGE SETUP -------------

#
# Create configurations
#

#
# Now generate the run command script "cook"
# It configures the system on the first run by creating the config file(s) 
# On subsequent runs, it only starts sleeps (if nomad-jail) or simply exits 
#

# ----------------- BEGIN COOK ------------------ 
echo "#!/bin/sh
RUNS_IN_NOMAD=$RUNS_IN_NOMAD
# No need to change this, just ensures configuration is done only once
if [ -e /usr/local/etc/pot-is-seasoned ]
then
    # If this pot flavour is blocking (i.e. it should not return), 
    # we block indefinitely
    if [ \$RUNS_IN_NOMAD ]
    then
        /bin/sh /etc/rc
        tail -f /dev/null 
    fi
    exit 0
fi

# ADJUST THIS: STOP SERVICES AS NEEDED BEFORE CONFIGURATION
/usr/local/etc/rc.d postfix stop || true

# No need to adjust this:
# If this pot flavour is not blocking, we need to read the environment first from /tmp/environment.sh
# where pot is storing it in this case
if [ -e /tmp/environment.sh ]
then
    . /tmp/environment.sh
fi


#
# ADJUST THIS BY CHECKING FOR ALL VARIABLES YOUR FLAVOUR NEEDS:
#

# Convert parameters to variables if passed (overwrite environment)
while getopts h:n:d:b: option
do
    case \"\${option}\"
    in
      h) HOSTNAME=\${OPTARG};;
      n) MYNETWORKS=\${OPTARG};;
      d) RELAYDOMAINS=\${OPTARG};;
      b) SMTPDBANNER=\${OPTARG};;
    esac
done

# Check config variables are set
if [ -z \${MYNETWORKS+x} ]; 
then 
    echo 'MYNETWORKS is unset - setting it to 192.168.0.0/16,10.0.0.0/8' >> /var/log/cook.log
    echo 'MYNETWORKS is unset - setting it to 192.168.0.0/16,10.0.0.0/8'
    MYNETWORKS=\"192.168.0.0/16,10.0.0.0/8\" 
fi
if [ -z \${RELAYDOMAINS+x} ];
then
    echo 'RELAYDOMAINS is unset - see documentation how to configure this flavour' >> /var/log/cook.log
    echo 'RELAYDOMAINS is unset - see documentation how to configure this flavour'
    exit 1
fi
if [ -z \${SMTPDBANNER+x} ];
then
    echo 'SMTPDBANNER is unset - setting it to \"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\"' >> /var/log/cook.log
    echo 'SMTPDBANNER is unset - setting it to \"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\"'
    SMTPDBANNER=\"\\\$myhostname ESMTP \\\$mail_name (\\\$mail_version)\" 
fi
if [ -z \${HOSTNAME+x} ];
then
    echo 'HOSTNAME is unset - setting it to \"backupmx\"' >> /var/log/cook.log
    echo 'HOSTNAME is unset - setting it to \"backupmx\"'
    HOSTNAME=\"backupmx\" 
fi

# ADJUST THIS BELOW: NOW ALL THE CONFIGURATION FILES NEED TO BE ADJUSTED & COPIED:

# main.cf 
[ -w /root/main.cf ] && sed -i '' \"s&\\\$MYNETWORKS&\$MYNETWORKS&\" /root/main.cf 
[ -w /root/main.cf ] && sed -i '' \"s/\\\$RELAYDOMAINS/\$RELAYDOMAINS/\" /root/main.cf
[ -w /root/main.cf ] && sed -i '' \"s/\\\$SMTPDBANNER/\$SMTPDBANNER/\" /root/main.cf
[ -w /root/main.cf ] && sed -i '' \"s/\\\$HOSTNAME/\$HOSTNAME/\" /root/main.cf

mkdir -p /usr/local/etc/postfix
mv /root/main.cf /usr/local/etc/postfix

mkdir -p /usr/local/etc/mail
install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf

[ -w /etc/syslog.conf ] && sed -i '' \"s/# mail.info/mail.info/\" /etc/syslog.conf
/etc/rc.d/syslogd restart

# ADJUST THIS: START THE SERVICES AGAIN AFTER CONFIGURATION

sysrc postfix_enable=\"YES\"
/usr/local/etc/rc.d/postfix restart

# Do not touch this:
touch /usr/local/etc/pot-is-seasoned
# If this pot flavour is blocking (i.e. it should not return), there is no /tmp/environment.sh
# created by pot and we now after configuration block indefinitely
if [ \$RUNS_IN_NOMAD ]
then
    /bin/sh /etc/rc
    tail -f /dev/null
fi
" > /usr/local/bin/cook

# ----------------- END COOK ------------------


# ---------- NO NEED TO EDIT BELOW ------------

chmod u+x /usr/local/bin/cook

#
# There are two ways of running a pot jail: "Normal", non-blocking mode and
# "Nomad", i.e. blocking mode (the pot start command does not return until
# the jail is stopped).
# For the normal mode, we create a /usr/local/etc/rc.d script that starts
# the "cook" script generated above each time, for the "Nomad" mode, the cook
# script is started by pot (configuration through flavour file), therefore
# we do not need to do anything here.
# 

# Create rc.d script for "normal" mode:
echo "#!/bin/sh
#
# PROVIDE: cook 
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
. /etc/rc.subr
name=cook
rcvar=cook_enable
load_rc_config $name
: ${cook_enable:=\"NO\"}
: ${cook_env:=\"\"}
command=\"/usr/local/bin/cook\"
command_args=\"\"
run_rc_command \"\$1\"
" > /usr/local/etc/rc.d/cook

chmod u+x /usr/local/etc/rc.d/cook

if [ $RUNS_IN_NOMAD = false ]
then
    # This is a non-nomad (non-blocking) jail, so we need to make sure the script
    # gets started when the jail is started:
    # Otherwise, /usr/local/bin/cook will be set as start script by the pot flavour
    echo "cook_enable=\"YES\"" >> /etc/rc.conf
fi


postfix-backupmx-nomad/postfix-backupmx-nomad+1:
postfix-backupmx-nomad/postfix-backupmx-nomad+1.sh:

postfix-backupmx-nomad/postfix-backupmx-nomad+2:
postfix-backupmx-nomad/postfix-backupmx-nomad+2.sh:

postfix-backupmx-nomad/postfix-backupmx-nomad+3:
postfix-backupmx-nomad/postfix-backupmx-nomad+3.sh:

postfix-backupmx-nomad/postfix-backupmx-nomad+4:
set-cmd -c "/usr/local/bin/cook"
postfix-backupmx-nomad/postfix-backupmx-nomad+4.sh:
Password:=====>  -i auto: assigned 10.192.0.4
===>  Creating a new pot
===>  pot name : postfix-backupmx-nomad-amd64-11_4
===>  type : single
===>  base : 11.4
===>  pot_base :
===>  level : 0
===>  network-type: public-bridge
===>  ip : 10.192.0.4
===>  bridge :
===>  dns : inherit
===>  flavours : fbsd-update postfix-backupmx-nomad postfix-backupmx-nomad+1 postfix-backupmx-nomad+2 postfix-backupmx-nomad+3 postfix-backupmx-nomad+4
===>  Fetching FreeBSD 11.4
===>  Extract the tarball
=====>  Flavour: fbsd-update
=====>  Starting postfix-backupmx-nomad-amd64-11_4 pot for the initial bootstrap
=====>  mount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp
defaultrouter: NO -> 10.192.0.1
===>  Starting the pot postfix-backupmx-nomad-amd64-11_4
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path: /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
	inet 127.0.0.1 netmask 0xff000000
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
	groups: lo
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:d3:a5:64:be:0b
	hwaddr 02:d3:a5:64:be:0b
	inet 10.192.0.4 netmask 0xffc00000 broadcast 10.255.255.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
	status: active
	groups: epair
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Generating host.conf.
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp (X related).
Updating motd:.
Starting sendmail_submit.
Starting sendmail_msp_queue.
Starting cron.

Wed Aug 12 14:02:16 UTC 2020
/usr/local/etc/pot/flavours/fbsd-update.sh -> /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp/fbsd-update.sh
=====>  Executing fbsd-update script on postfix-backupmx-nomad-amd64-11_4
src component not installed, skipped
freebsd-update fetch should not be run non-interactively.
Run freebsd-update cron instead.
src component not installed, skipped
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
=====>  Stop the pot postfix-backupmx-nomad-amd64-11_4
=====>  Remove epair0[a|b] network interfaces
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/dev
=====>  Flavour: postfix-backupmx-nomad
=====>  Executing postfix-backupmx-nomad pot commands on postfix-backupmx-nomad-amd64-11_4
=====>  mount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp
/usr/local/etc/pot/flavours/postfix-backupmx-nomad.d/main.cf -> /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/root/main.cf
=====>  Source /usr/local/etc/pot/flavours/postfix-backupmx-nomad.d/main.cf copied in the pot postfix-backupmx-nomad-amd64-11_4
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp
=====>  /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/dev is already unmounted
=====>  Starting postfix-backupmx-nomad-amd64-11_4 pot for the initial bootstrap
=====>  mount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp
===>  Starting the pot postfix-backupmx-nomad-amd64-11_4
add net default: gateway 10.192.0.1
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path: /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
	inet 127.0.0.1 netmask 0xff000000
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
	groups: lo
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:b8:2e:03:5a:0b
	hwaddr 02:b8:2e:03:5a:0b
	inet6 fe80::b8:2eff:fe03:5a0b%epair0b prefixlen 64 tentative scopeid 0x2
	inet 10.192.0.4 netmask 0xffc00000 broadcast 10.255.255.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
	status: active
	groups: epair
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp (X related).
Updating motd:.
Starting sendmail_submit.
Starting sendmail_msp_queue.
Starting cron.

Wed Aug 12 14:02:21 UTC 2020
/usr/local/etc/pot/flavours/postfix-backupmx-nomad.sh -> /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp/postfix-backupmx-nomad.sh
=====>  Executing postfix-backupmx-nomad script on postfix-backupmx-nomad-amd64-11_4
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] Installing pkg-1.14.6...
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] Extracting pkg-1.14.6: .......... done
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
sendmail_enable: NO -> NO
Updating FreeBSD repository catalogue...
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] Fetching meta.conf: . done
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] Fetching packagesite.txz: .......... done
Processing entries: .......... done
FreeBSD repository update completed. 30860 packages processed.
All repositories are up to date.
Updating database digests format: . done
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	icu: 67.1,1
	pcre: 8.44
	postfix: 3.5.6,1

Number of packages to be installed: 3

The process will require 62 MiB more space.
13 MiB to be downloaded.
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [1/3] Fetching postfix-3.5.6,1.txz: .......... done
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [2/3] Fetching pcre-8.44.txz: .......... done
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [3/3] Fetching icu-67.1,1.txz: .......... done
Checking integrity... done (0 conflicting)
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [1/3] Installing pcre-8.44...
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [1/3] Extracting pcre-8.44: .......... done
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [2/3] Installing icu-67.1,1...
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [2/3] Extracting icu-67.1,1: .......... done
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [3/3] Installing postfix-3.5.6,1...
===> Creating groups.
Using existing group 'mail'.
Creating group 'maildrop' with gid '126'.
Creating group 'postfix' with gid '125'.
===> Creating users
Creating user 'postfix' with uid '125'.
===> Creating homedir(s)
Adding user 'postfix' to group 'mail'.
[postfix-backupmx-nomad-amd64-11_4.vsf00001.cpt.za.honeyguide.net] [3/3] Extracting postfix-3.5.6,1: .......... done

===============================================================
Postfix was *not* activated in /usr/local/etc/mail/mailer.conf! 

To finish installation run the following commands:

  mkdir -p /usr/local/etc/mail
  install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf
===============================================================

=====
Message from postfix-3.5.6,1:

--
To use postfix instead of sendmail:
  - clear sendmail queue and stop the sendmail daemons

Run the following commands to enable postfix during startup:
  - sysrc postfix_enable="YES"
  - sysrc sendmail_enable="NONE"

If postfix is *not* already activated in /usr/local/etc/mail/mailer.conf
  - mv /usr/local/etc/mail/mailer.conf /usr/local/etc/mail/mailer.conf.old
  - install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf

Disable sendmail(8) specific tasks,
add the following lines to /etc/periodic.conf(.local):
  daily_clean_hoststat_enable="NO"
  daily_status_mail_rejects_enable="NO"
  daily_status_include_submit_mailq="NO"
  daily_submit_queuerun="NO"

If you are using SASL, you need to make sure that postfix has access to read
the sasldb file.  This is accomplished by adding postfix to group mail and
making the /usr/local/etc/sasldb* file(s) readable by group mail (this should
be the default for new installs).
Nothing to do.
=====>  Stop the pot postfix-backupmx-nomad-amd64-11_4
=====>  Remove epair0[a|b] network interfaces
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/tmp
=====>  unmount /mnt/data/pot/jails/postfix-backupmx-nomad-amd64-11_4/m/dev
=====>  Flavour: postfix-backupmx-nomad+1
=====>  Executing postfix-backupmx-nomad+1 pot commands on postfix-backupmx-nomad-amd64-11_4
=====>  No shell script available for the flavour postfix-backupmx-nomad+1
=====>  Flavour: postfix-backupmx-nomad+2
=====>  Executing postfix-backupmx-nomad+2 pot commands on postfix-backupmx-nomad-amd64-11_4
=====>  No shell script available for the flavour postfix-backupmx-nomad+2
=====>  Flavour: postfix-backupmx-nomad+3
=====>  Executing postfix-backupmx-nomad+3 pot commands on postfix-backupmx-nomad-amd64-11_4
=====>  No shell script available for the flavour postfix-backupmx-nomad+3
=====>  Flavour: postfix-backupmx-nomad+4
=====>  Executing postfix-backupmx-nomad+4 pot commands on postfix-backupmx-nomad-amd64-11_4
=====>  No shell script available for the flavour postfix-backupmx-nomad+4

This site © Honeyguide Group (Pty) Ltd, all the hosted software their respective license owners 2020 - Disclaimer