Exchange receipients.sh

From Alpine Linux
Revision as of 14:40, 6 June 2008 by Clandmeter (talk | contribs) (New page: #!/bin/sh ### The minimal lines virtual.txt must have to generate the db MINLINES="50" ### The url to the receipients file URL="" wget "$URL" -qO /tmp/virtual.txt if [ -f /tmp/virtual.t...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  1. !/bin/sh
      1. The minimal lines virtual.txt must have to generate the db

MINLINES="50"

      1. The url to the receipients file

URL=""

wget "$URL" -qO /tmp/virtual.txt

if [ -f /tmp/virtual.txt ]; then

  LINES=`cat /tmp/virtual.txt | wc -l`
  if [ "$LINES" -gt "$MINLINES" ]; then
     dos2unix /tmp/virtual.txt
     sed '/^\#/d; /^$/d' /tmp/virtual.txt > /etc/postfix/exchange_receipients
     postmap /etc/postfix/exchange_receipients
  fi

fi