PMDF System Manager's Guide


Previous Contents Index

37.3.5 Automated Processing of Inbound FAXes

It is possible to initiate site-dependent automatic processing of each and every received FAX. This is useful, for instance, when OCR software is to be used to analyze FAX cover pages. This automated processing is achieved by establishing a special username and account on a system running PMDF and sharing a file directory with the system running PMDF and PMDF-FAX. FAXes received by PMDF-FAX should then be output as files to the file directory and e-mail notifications sent to the special username. This is accomplished with the OUTPUT_AS, DIRECTORY_PATH, and TO channel options for the DATA_TO_BITMAP channel (see Section 37.3.7.1).

Now, every time a FAX is received, it will be stored in the specified file directory and a notification e-mail message will be sent to the mailbox specified with the TO option. The notification message will contain, in the Content-Type: header, a full file specification pointing to the newly received FAX. The Subject: header of the message will read "Subject: FAX reception notification". By setting up a mail.delivery file and placing it in the login account for this special username, automated processing of each received FAX can be initiated. The examples Example 37-8 and Example 37-9 illustrate how to do this. Refer to the DELIVER documentation in the OpenVMS Edition of the PMDF User's Guide for directions on using DELIVER and mail.delivery files.

Example 37-8 mail.delivery file for automated inbound FAX processing

! mail.delivery file for automated processing of received FAXes 
! 
! Run fax.com if the Subject: contains "FAX reception notification" 
* * *                              A 1 "content-type" 
* * *                              A S 
* * "*FAX reception notification*" T E @fax.com 
! 
! Send anything else to the Postmaster 
* * * O F postmaster 

Example 37-9 fax.com command file for automated inbound FAX processing

$ ! fax.com -- Sample command procedure to perform automated 
$ !            processing of a received FAX. 
$ !-------------------------------------------------------------- 
$ ! Extract the file spec. from the Content-Type: header line 
$ i = f$locate ("NAME=", C1) 
$ j = f$length (C1) 
$ if i .ne. j then goto continue 
$ ! 
$ ! We end up here when no file spec. is found in the header line 
$ exit 
$ ! 
$ continue: 
$ filename = f$extract (i+5, 1+j-(i+5), C1) 
$ ! 
$ ! ************************************************************* 
$ ! The full file specification for the file containing the FAX 
$ ! is stored in the local symbol "filename".  At this point, the 
$ ! site supplied processing routine should be invoked. 
$ ! ************************************************************* 
$ ! 
$ write sys$output "''filename'" 

Note also that received FAXes sent as e-mail will contain the phone number of the sending FAX machine, if supplied by the sending FAX device, in the Subject: and Comment: header lines. This information is also placed in the Comment: header line supplied in the FAX receive notifications generated when received FAXes are output to a disk file.


Previous Next Contents Index