Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2001 17:06:26 -0600
From:      J & C Frazier <admin@csocs.com>
To:        support@invicta.net
Cc:        Freebsd-ISP <freebsd-isp@FreeBSD.ORG>
Subject:   Re: 
Message-ID:  <3ADF6F72.325202E@csocs.com>
References:  <NDBBKODAOKAJLGIOGBIAAEHADGAA.support@invicta.net>

next in thread | previous in thread | raw e-mail | index | archive | help
You looking for something like this:

#!/bin/sh
echo "CSOCS Automated Billing System."
for foo in `cat /etc/master.passwd|cut -f 1 -d ":"`
do
              if expr O`cat /etc/master.passwd|grep $foo|cut -f 5 -d ":"` =
"O" >>/dev/null
                then
                  export expir="yes"
                  export name="`cat /etc/master.passwd|grep $foo|cut -f 8 -d
':'`"
                  echo "Subject: Important: Account Expiring in $1
Days.">>/root/bin/exp.$foo
                  echo "From: CSOCS Automated Billing
<billing@csocs.com>">>/root/bin/exp.$foo
                  echo "To: $name <$foo@csocs.com>">>/root/bin/exp.$foo
                  echo "">>/root/bin/exp.$foo
                  echo "$name:">>/root/bin/exp.$foo
                  echo "">>/root/bin/exp.$foo
                  echo "This is an automated e-mail sent to inform you that
your account">>/root/bin/exp.$foo
                  echo "with CSOCS will expire in $1 days.  If your payment is
not received">>/root/bin/exp.$foo
                  echo "by it's due date, your account can be subject to an
increase to">>/root/bin/exp.$foo
                  echo "our current prices and suspended until payment is
remitted.  Please">>/root/bin/exp.$foo
                  echo "direct any questions you may have to
billing@csocs.com.  If your">>/root/bin/exp.$foo
                  echo "payment has already been sent or previous arrangements
have been">>/root/bin/exp.$foo
                  echo "made, please disregard this e-mail.  Thank you for
choosing CSOCS">>/root/bin/exp.$foo
                  echo "for all your web hosting solutions.  We look forward
to continue">>/root/bin/exp.$foo
                  echo "doing business with you.">>/root/bin/exp.$foo
                  echo "">>/root/bin/exp.$foo
                  echo "Username: $foo">>/root/bin/exp.$foo
                  echo "Expires: `date -v+$1d -v0H -v1M "+%m-%d-%Y at %H:%M
MST"`.">>/root/bin/exp.$foo
                  echo "">>/root/bin/exp.$foo
                 echo "CSOCS Automated Billing         CSOCS INTERNET
SERVICES">>/root/bin/exp.$foo
                  echo "billing@csocs.com               1623B Washakie
Loop.">>/root/bin/exp.$foo
                  echo "http://www.csocs.com            Cheyenne, WY
82001">>/root/bin/exp.$foo
                  /usr/sbin/sendmail -t < /root/bin/exp.$foo
                  rm /root/bin/exp.$foo
                  echo "        Accounts Expiring in $1 days:"
                  echo "                $foo"
                else
              fi
done

InvictaNet Support wrote:

> I realise this may be very basic - but...
>
> In a shell script that I am slowly getting to work, I have the line:
>
> "echo New User ${1} ${2} | mail root"
>
> This does exactly what it says on the box (English TV advert joke), but...
>
> How can I get some/all of this information on the subject line of the
> message instead of/as well as in the body?
>
> Martyn
> -----------------------------------------------------
> InvictaNet - The Internet in Plain English, Guaranteed
> http://www.invictanet.co.uk
> info@invictanet.co.uk
> phone: 08707 440180
> fax: 08707 440181
> ------------------------------------------------------
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ADF6F72.325202E>