---
name: nullmailer
version: 1.11_1,1
origin: mail/nullmailer
comment: MTA for hosts which relay to a fixed set of smart relays
arch: freebsd:9:x86:64
www: http://untroubled.org/nullmailer/
maintainer: glarkin@FreeBSD.org
prefix: /usr/local
licenselogic: single
licenses: [GPLv2]
flatsize: 237803
desc: |
  This is nullmailer, a sendmail/qmail/etc replacement MTA for hosts which
  relay to a fixed set of smart relays.  It is designed to be simple to
  configure, secure, and easily extendable.

  WWW: http://untroubled.org/nullmailer/
categories: [mail]
users: [nullmail]
groups: [nullmail]
options: {GNUTLS: off}
files:
  /usr/local/bin/nullmailer-inject: bcca2b1fdd32cf87b520c4ea8bf9e5b176c18c3be748286d21905ae342d4bd09
  /usr/local/bin/nullmailer-smtpd: dcdde24a62c7fa87c5fb8b1554ac3e8ccfd62b2fc67280d618df57e2c9f927b4
  /usr/local/etc/nullmailer/me.sample: 6bd3e99960277a22729dbb8a2f48764659d7bf926c0a678c13012d980d9d6689
  /usr/local/etc/nullmailer/remotes.sample: b343c2e6272b4f9a1ff26a9dfb7571c0b794778169f689b0520520affd244e2e
  /usr/local/etc/rc.d/nullmailer: a59e4136aca893d871f46d984fa780d9eeaf7dc3d6ac77ef02ea523701b132b8
  /usr/local/libexec/nullmailer/mailq: 72b10ab3455f49ffbe2950674b4772b9c5b8d736732a0b68d141097e6ee9bcd4
  /usr/local/libexec/nullmailer/qmqp: 9dc053c1efecdbba0689381cc425074410260eaf6527c52cc2fd4f30a6713f56
  /usr/local/libexec/nullmailer/sendmail: c7c8ebaa626a26aa2cb05e80898804f1fb3b0101d50e53468f73f77d1e938aa7
  /usr/local/libexec/nullmailer/smtp: 6ac47dd7b6b1f7935295bb4a2bb17f8c453ec64b35483a6a09014e1b546b36ad
  /usr/local/man/man1/nullmailer-inject.1.gz: 34ca61fa84f16d901e32412c8abfbcf12af848c51ecf299603d170a1dafcf9d6
  /usr/local/man/man1/sendmail.1.gz: 5710e8c648d34531e045ed93ef520d392cae427d7a73cf66de30f58eccc3cf75
  /usr/local/man/man7/nullmailer.7.gz: 024b999e86428990ce2a0b1c6d61f5dea26c933cb8b0a08ae0228fe1098045ca
  /usr/local/man/man8/nullmailer-queue.8.gz: 9e631eaa254da661bdaf58cab5ba41e06c4ab356ef4b67f7e4a43393871678cf
  /usr/local/man/man8/nullmailer-send.8.gz: 439559c928d8252a04653f5f1085e140238e78447339c76ba51a5bce6cd9f90c
  /usr/local/sbin/nullmailer-queue: ee1819efa401b87d0dcf29c3637de1dea69d6008e28ea783d30c9ca0bcb205c8
  /usr/local/sbin/nullmailer-send: 6903a5548b9db4c8a29c75a4a64989233e4cad774a707e28f9ba3b9a69de0b67
  /usr/local/share/licenses/nullmailer-1.11_1,1/GPLv2: 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
  /usr/local/share/licenses/nullmailer-1.11_1,1/LICENSE: 7e1394d03c5f275a402fe721ff1d1349449ea8602b52af954c76463afcdb6ef7
  /usr/local/share/licenses/nullmailer-1.11_1,1/catalog.mk: 0df3a1c3215ce02243a2c6f51ee3a022efb4e7261700a18ea75a6faf0bd94b08
directories:
  /var/spool/nullmailer/tmp/: y
  /var/spool/nullmailer/queue/: y
  /var/spool/nullmailer/: y
  /usr/local/share/licenses/nullmailer-1.11_1,1/: n
  /usr/local/share/licenses/: y
  /usr/local/libexec/nullmailer/: n
  /usr/local/etc/nullmailer/: y
scripts:
  post-install: |
    echo "===> Creating users and/or groups."
    if ! /usr/sbin/pw groupshow nullmail >/dev/null 2>&1; then  echo "Creating group 'nullmail' with gid '522'.";  /usr/sbin/pw groupadd nullmail -g 522; else echo "Using existing group 'nullmail'."; fi
    if ! /usr/sbin/pw usershow nullmail >/dev/null 2>&1; then  echo "Creating user 'nullmail' with uid '522'.";  /usr/sbin/pw useradd nullmail -u 522 -g 522  -c "Nullmailer Mail System" -d /var/spool/nullmailer -s /bin/sh;  else echo "Using existing user 'nullmail'."; fi
    install -d -g 522 -o 522 /var/spool/nullmailer
    chmod u+s /usr/local/libexec/nullmailer/mailq
    chown nullmail /usr/local/libexec/nullmailer/mailq
    chmod u+s /usr/local/sbin/nullmailer-queue
    chown nullmail /usr/local/sbin/nullmailer-queue
    cd /
    mkdir -p /var/spool/nullmailer/queue
    chown nullmail:nullmail /var/spool/nullmailer
    chmod 700 /var/spool/nullmailer/queue
    chown nullmail:nullmail /var/spool/nullmailer/queue
    mkdir -p /var/spool/nullmailer/tmp
    chmod 700 /var/spool/nullmailer/tmp
    chown nullmail:nullmail /var/spool/nullmailer/tmp
    mkfifo /var/spool/nullmailer/trigger
    chmod 600 /var/spool/nullmailer/trigger
    chown nullmail:nullmail /var/spool/nullmailer/trigger
    cd /usr/local
    cd /usr/local
  pre-deinstall: |
    cd /
    rm -f /var/spool/nullmailer/trigger
    if /usr/sbin/pw usershow nullmail >/dev/null 2>&1; then  echo "==> You should manually remove the \"nullmail\" user. "; fi
    cd /usr/local
    cd /usr/local
  post-deinstall: |
    cd /
    cd /usr/local
    cd /usr/local
  install: "#!/bin/sh\n\nif [ x\"$2\" = xPOST-INSTALL ]; then\n    if [ ! -f /usr/local/etc/nullmailer/me.sample
    ]; then\n\techo \"Creating \\\"/usr/local/etc/nullmailer/me.sample\\\".\"\n\techo
    `/bin/hostname` > /usr/local/etc/nullmailer/me.sample\n    fi\nfi\n"
  deinstall: "#!/bin/sh\n\nask() {\n    local question default answer\n\n    question=$1\n
    \   default=$2\n    if [ -z \"${PACKAGE_BUILDING}\" ]; then\n        read -p \"${question}
    [${default}]? \" answer\n    fi\n    if [ x${answer} = x ]; then\n        answer=${default}\n
    \   fi\n    echo ${answer}\n}\n\nyesno() {\n    local dflt question answer\n\n
    \   question=$1\n    dflt=$2\n    while :; do\n        answer=$(ask \"${question}\"
    \"${dflt}\")\n        case \"${answer}\" in\n        [Yy]*)          return 0;;\n
    \       [Nn]*)          return 1;;\n        esac\n        echo \"Please answer
    yes or no.\"\n    done\n}\n\nif [ x\"$2\" = xDEINSTALL ]; then\n    if [ ! -n
    \"$BATCH\" ]; then\n\tif /bin/ps -axc | /usr/bin/grep -q nullmailer-send; then\n\t
    \   if yesno \"There are some nullmailer processes running.  Shall I kill them\"
    y; then\n\t\t/usr/local/etc/rc.d/nullmailer stop\n\t\tsleep 2\n\t    else\n\t\techo
    \"OK ... I hope you know what you are doing.\"\n\t    fi\n\tfi\n\n    fi\nfi\n"
message: "==================================================================\n\nPlease
  take /usr/local/etc/nullmailer/remotes.sample\nas an example and edit your own \n/usr/local/etc/nullmailer/remotes\n\nIt's
  possible to redefine mailq and sendmail in your /etc/mail/mailer.conf:\n\nsendmail\t/usr/local/libexec/nullmailer/sendmail\nsend-mail\t/usr/local/libexec/nullmailer/sendmail\nmailq\t\t/usr/local/libexec/nullmailer/mailq\n\nWARNING!
  It will cause problem in case delivering to local recipients.\nAlso man nullmailer-send(8)
  for more details\n\nNOTE for the ones upgrading from 1.00:\nThe smtp authentication
  option has been changed from\n--auth=joe,secret to --user=joe and --pass=secret,
  see nullmailer-send(8)\nfor details.\n\n==================================================================\n"
