template directory structure a bit.
+++ /dev/null
-From: FAX Agent <$FROMADDR>
-To: $SENDTO
-Subject: Fax received from "$SENDER"
-Content-type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: Quoted-Printable
-
-$FILE (ftp://$HOSTNAME:$PORT/$FILE):
- Sender: $SENDER
- Pages: $PAGES
- Quality: $QUALITY
- Size: $PAGE
- Received: $RECEIVED
- Time To Receive: $TIMETORECV
- Signal Rate: $SIGNALRATE
- Data Format: $DATAFORMAT
- Error Correct: $ERRCORRECT
- CallID1: $CALLID1
- CallID2: $CALLID2
- Received On: $DEVICE
- CommID: $COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)
-
-Errors were received:
-$SESSION_LOG
+++ /dev/null
-From: FAX Agent <$FROMADDR>
-To: $TOADDR
-Subject: Fax received from "$SENDER"
-Content-type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: Quoted-Printable
-
-Fax not received.
-
- $MSG
-
-Session log follows:
-$SESSION_LOG
+++ /dev/null
-From: FAX Agent <$FROMADDR>
-To: $TOADDR
-Subject: Fax received with errors from "$SENDER"
-Content-type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: Quoted-Printable
-
-$FILE (ftp://$HOSTNAME:$PORT/$FILE):
- Sender: $SENDER
- Pages: $PAGES
- Quality: $QUALITY
- Size: $PAGE
- Received: $RECEIVED
- Time To Receive: $TIMETORECV
- Signal Rate: $SIGNALRATE
- Data Format: $DATAFORMAT
- Error Correct: $ERRCORRECT
- CallID1: $CALLID1
- CallID2: $CALLID2
- Received On: $DEVICE
- CommID: $COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)
-
-
-Session log:
-$SESSION_LOG
+++ /dev/null
-From: FAX Agent <$FROMADDR>
-To: $TOADDR
-Subject: Fax received from "$SENDER"
-Content-type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: Quoted-Printable
-
-$FILE (ftp://$HOSTNAME:$PORT/$FILE):
- Sender: $SENDER
- Pages: $PAGES
- Quality: $QUALITY
- Size: $PAGE
- Received: $RECEIVED
- Time To Receive: $TIMETORECV
- Signal Rate: $SIGNALRATE
- Data Format: $DATAFORMAT
- Error Correct: $ERRCORRECT
- CallID1: $CALLID1
- CallID2: $CALLID2
- Received On: $DEVICE
- CommID: $COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)
+++ /dev/null
-From: FAX Agent <$FROMADDR>
-To: $SENDTO
-Subject: Fax received from "$SENDER"
-Content-type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: Quoted-Printable
-
-$FILE (ftp://$HOSTNAME:$PORT/$FILE):
- Sender: $SENDER
- Pages: $PAGES
- Quality: $QUALITY
- Size: $PAGE
- Received: $RECEIVED
- Time To Receive: $TIMETORECV
- Signal Rate: $SIGNALRATE
- Data Format: $DATAFORMAT
- Error Correct: $ERRCORRECT
- CallID1: $CALLID1
- CallID2: $CALLID2
- Received On: $DEVICE
- CommID: $COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION blocked
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number is delayed in the scheduling queues because:
-
-$faxstatus
-
-The job will be processed as soon as possible.
+++ /dev/null
-To: $SENDTO
-Subject: pager to $DESTINATION completed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your page to $number was completed successfully.
- Dialogs: $tottries (exchanges with remote device)
- Calls: $totdials (total phone calls placed)
- Modem: $modem
- Submitted From: $client
- JobID: $jobid
- GroupID: $groupid
- CommID: c$commid
-
-Processing time was $JTIME.
-
- Additional information:
-
-$faxstatus
-
- ---- Transcript of session follows ----
-
-$SESSION_LOG
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION completed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number was completed successfully.
- Pages: $npages
- Receiver: $csi
- Quality: $resolution
- Page Width: $pagewidth (mm)
- Page Length: $pagelength
- Signal Rate: $signalrate
- Data Format: $dataformat
- Remote Equipment: $equipment
- Remote Station: $station
- Dialogs: $tottries (exchanges with remote device)
- Calls: $totdials (total phone calls placed)
- Modem: $modem
- Submitted From: $client
- JobID: $jobid
- GroupID: $groupid
- CommID: c$commid
-
-Processing time was $JTIME.
-
- Additional information:
-
-$faxstatus
-
- ---- Transcript of session follows ----
-
-$SESSION_LOG
+++ /dev/null
-To: $SENDTO
-Subject: pager to $DESTINATION failed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number failed because:
-
-$faxstatus
-
-
- ---- Transcript of session follows ----
-
-$SESSION_LOG
-
-------- Unsent job status -------
- Destination: $number
- JobID: $jobid
- GroupID: $groupid
- CommID: $commid
- Modem: $modem
- Submitted From: $client
- Status: $faxstatus
- Dialogs: $tottries
- Dials: $ndials
- Calls: $totdials
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION failed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number failed because:
-
-$faxstatus
-
-
- ---- Transcript of session follows ----
-
-$SESSION_LOG
-
-------- Unsent job status -------
- Destination: $number
- JobID: $jobid
- GroupID: $groupid
- Sender: $sender
- Mailaddr: $mailaddr
- CommID: $commid
- Modem: $modem
- Submitted From: $client
- Page Width: $pagewidth (mm)
- Page Length: $pagelength (mm)
- Resolution: $resolution (lpi)
- Status: $faxstatus
- Dialogs: $tottries
- Dials: $ndials
- Calls: $totdials
- Pages: $npages
- TotPages: $totpages
- Attempts: $ntries
- Dirnum: $dirnum
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION failed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number was not sent because document conversion
-failed. The output from the converter program was:
-
-$faxstatus
-
-Check any PostScript documents for non-standard fonts and invalid constructs
-
-------- Unsent job status -------
- Destination: $number
- JobID: $jobid
- GroupID: $groupid
- Sender: $sender
- Mailaddr: $mailaddr
- CommID: $commid
- Modem: $modem
- Submitted From: $client
- Page Width: $pagewidth (mm)
- Page Length: $pagelength (mm)
- Resolution: $resolution (lpi)
- Status: $faxstatus
- Dialogs: $tottries
- Dials: $ndials
- Calls: $totdials
- Pages: $npages
- TotPages: $totpages
- Attempts: $ntries
- Dirnum: $dirnum
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION removed from queue
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-You job to $number was deleted from the queue.
-
-------- Unsent job status -------
- Destination: $number
- JobID: $jobid
- GroupID: $groupid
- Sender: $sender
- Mailaddr: $mailaddr
- CommID: $commid
- Modem: $modem
- Submitted From: $client
- Page Width: $pagewidth (mm)
- Page Length: $pagelength (mm)
- Resolution: $resolution (lpi)
- Status: $faxstatus
- Dialogs: $tottries
- Dials: $ndials
- Calls: $totdials
- Pages: $npages
- TotPages: $totpages
- Attempts: $ntries
- Dirnum: $dirnum
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION failed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-
-Your job to $number failed because the document conversion script was
-not found.
-
-------- Unsent job status -------
- Destination: $number
- JobID: $jobid
- GroupID: $groupid
- Sender: $sender
- Mailaddr: $mailaddr
- CommID: $commid
- Modem: $modem
- Submitted From: $client
- Page Width: $pagewidth (mm)
- Page Length: $pagelength (mm)
- Resolution: $resolution (lpi)
- Status: $faxstatus
- Dialogs: $tottries
- Dials: $ndials
- Calls: $totdials
- Pages: $npages
- TotPages: $totpages
- Attempts: $ntries
- Dirnum: $dirnum
+++ /dev/null
-To: $SENDTO
-Subject: Notice about facsimile
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your polling request to $number could not be completed because
-an unspecified problem occurred.
-
-Processing time was $JTIME.
+++ /dev/null
-To: $SENDTO
-Subject: Notice about facsimile
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your polling request to $number could not be completed because
-no document was available for retrieval.
-
-Processing time was $JTIME.
+++ /dev/null
-To: $SENDTO
-Subject: Notice about facsimile
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your polling request to $number could not be completed because
-the remote side rejected your request.
-
-Processing time was $JTIME.
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION failed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number was rejected because:
-
-$faxstatus
-
-------- Unsent job status -------
- Destination: $number
- JobID: $jobid
- GroupID: $groupid
- Sender: $sender
- Mailaddr: $mailaddr
- CommID: $commid
- Modem: $modem
- Submitted From: $client
- Page Width: $pagewidth (mm)
- Page Length: $pagelength (mm)
- Resolution: $resolution (lpi)
- Status: $faxstatus
- Dialogs: $tottries
- Dials: $ndials
- Calls: $totdials
- Pages: $npages
- TotPages: $totpages
- Attempts: $ntries
- Dirnum: $dirnum
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION removed from queue
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number was deleted from the queue.
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION was requeued
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number was not sent because:
-
-$faxstatus
-
-The job will be retried at $NEXT
+++ /dev/null
-To: $SENDTO
-Subject: facsimile to $DESTINATION failed
-From: $FROMADDR
-Content-type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: Quoted-Printable
-
-Your job to $number could not be completed before the appointed
-deadline.
-
-------- Unsent job status -------
- Destination: $number
- JobID: $jobid
- GroupID: $groupid
- Sender: $sender
- Mailaddr: $mailaddr
- CommID: $commid
- Modem: $modem
- Submitted From: $client
- Page Width: $pagewidth (mm)
- Page Length: $pagelength (mm)
- Resolution: $resolution (lpi)
- Status: $faxstatus
- Dialogs: $tottries
- Dials: $ndials
- Calls: $totdials
- Pages: $npages
- TotPages: $totpages
- Attempts: $ntries
- Dirnum: $dirnum
}
+# And some common variables for things using our functions
+if [ -z "$TEMPLATE" ]
+then
+ TEMPLATE=en
+fi