
The idea is to control the
PC LAN channel functions from the PC as much as possible. The example DOS
command files below support cc:Mail and
Microsoft
Mail, but the ideas should work for any of the PC LAN Mail systems supported
by PMDF-LAN.
Implementation notes:
- A .rhosts file is required on the remote system.
- The PC LAN channel should be marked with the slave keyword.
Example BAT file for cc:Mail to PMDF Transfers XFER-CC.BAT
echo on
Rem Command file for support PC to control transfers to PMDF-LAN
Rem cc:Mail
Rem Go to the work directory. This is required because the brain dead rcp
Rem get confused about whether the : indicates a local device token or
Rem a host.username token.
d:
cd\pmdf
:loop_it
Rem Check for left over files first
if exist ccmail.imp goto in2cc
Rem Get files out of cc PO. Assume the PO is on the C disk in the
Rem directory maildata
n:\ccadmin\export /nPMDF /PPMDF /dn:\ccdata /files/hex
if exist ccmail.exp goto copyup
goto runpmdf
:copyup
%debugit%
Rem Copy the files to the PMDF system. Make sure that there is a
Rem .rhosts file on the remote machine for username. Probably want
Rem to make sure that this does not overwrite an existing file. If
Rem VMS this is probably not a problem, but UNIXland is a whole other
Rem ball game.
rcp -b ccmail.exp newbie.process.com.pmdf_lan:pmdf_root:[a_lan.ccmail]ccmail.exp
%debugit%
Rem Delete the message file once we have moved it up to the remote
Rem system. This is just a straight delete, but I would probably
Rem implement a pseudo version scheme with renames just to make
Rem it harder to completely lose messages.
del ccmail.exp
:runpmdf
%debugit%
Rem Fire off the PMDF channel program. Do the work in line, not in
Rem batch to insure sychronization
rsh newbie.process.com -l pmdf_lan @pmdf_com:master cc_local poll
:getit
%debugit%
Rem Get the file from the remote system
rcp -b newbie.process.com.pmdf_lan:pmdf_root:[a_lan.ccmail]ccmail.imp ccmail.imp
%debugit%
if exist ccmail.imp goto inbound
goto undcheck
:inbound
%debugit%
Rem Delete the remote temporary file. (Could just rename it too
Rem and have a clean up procedure run on the remote system
Rem periodically)
rsh newbie.process.com -l pmdf_lan delete/log/noconfirm pmdf_root:[a_lan.ccmail]ccmail.imp;
:in2cc
%debugit%
Rem Put the messages into the PO
n:\ccadmin\import /dN:\ccdata /nIII-HQ /pPASSWORD /files/hex
%debugit%
Rem Delete the local message file
if exist ccmail.imp goto brokenput
:undcheck
%debugit%
if exist ccmail.und goto und2pmdf
goto loopdelay
:brokenput
Rem Problem processing the message. On VMS copy it back to host and let
Rem file version take care of duplicates. On UNIX probably want to
Rem append all errors into a single file.
Rem Copy the message drop file back to VMSland
rcp -b ccmail.imp newbie.process.com.pmdf_lan:pmdf_root:[a_lan.ccmail]ccmail.failed
Rem Tell the postmaster we have a problem
rsh newbie.process.com -l pmdf_lan pmdf mail ccmail-error.txt postmaster/subject="cc Mail Failure"
Rem Delete the local file so that cc can deliver other process
del ccmail.imp
goto undcheck
:und2pmdf
%debugit%
Rem Send undelivereds to PMDFland
rcp -b ccmail.und newbie.process.com.pmdf_lan:pmdf_root:[a_lan.ccmail]ccmail.und
del ccmail.und
:loopdelay
Rem ==========================Mail loop Pause============================
echo off
echo Enter G to execute right now
echo Enter X to exit the message loop
choice /C:XG /T:G,60 Enter either G or X
echo on
if errorlevel 2 goto loop_it
Example BAT file for Microsoft Mail to PMDF Transfers XFER-MS.BAT
echo on
Rem Command file for support PC to control transfers to PMDF-LAN
Rem MS Mail
Rem Go to the work directory. This is required because the brain dead rcp
Rem get confused about whether the : indicates a local device token or
Rem a host.username token.
d:
cd\pmdf
:loop_it
Rem Check for left over files first
if exist pmdf2ms.msg goto in2ms
Rem Get files out of MS PO. Assume the PO is on the C disk in the
Rem directory maildata
m:\mssmtp\pmdfget -dm:\maildata\ -f2 -h -aadmin:password ms2pmdf.msg
if exist ms2pmdf.msg goto copyup
goto runpmdf
:copyup
%debugit%
Rem Copy the files to the PMDF system. Make sure that there is a
Rem .rhosts file on the remote machine for username. Probably want
Rem to make sure that this does not overwrite an existing file. If
Rem VMS this is probably not a problem, but UNIXland is a whole other
Rem ball game.
rcp -b ms2pmdf.msg newbie.process.com.pmdf_lan:pmdf_root:[a_lan.msmail]ms2pmdf.msg
%debugit%
Rem Delete the message file once we have moved it up to the remote
Rem system. This is just a straight delete, but I would probably
Rem implement a pseudo version scheme with renames just to make
Rem it harder to completely lose messages.
del ms2pmdf.msg
:runpmdf
%debugit%
Rem Fire off the PMDF channel program. Do the work in line, not in
Rem batch to insure sychronization
rsh newbie.process.com -l pmdf_lan @pmdf_com:master ff_local poll
:getit
%debugit%
Rem Get the file from the remote system
rcp -b newbie.process.com.pmdf_lan:pmdf_root:[a_lan.msmail]pmdf2ms.msg pmdf2ms.msg
%debugit%
if exist pmdf2ms.msg goto inbound
goto loopdelay
:inbound
%debugit%
Rem Delete the remote temporary file. (Could just rename it too
Rem and have a clean up procedure run on the remote system
Rem periodically)
rsh newbie.process.com -l pmdf_lan delete/log/noconfirm pmdf_root:[a_lan.msmail]pmdf2ms.msg;
:in2ms
%debugit%
Rem Put the messages into the PO
pmdfput -dm:\maildata\ -f2 -aadmin:password pmdf2ms.msg
%debugit%
Rem Delete the local message file
if exist pmdf2ms.msg goto brokenput
goto loopdelay
Rem Problem processing the message. On VMS copy it back to host and let
Rem file version take care of duplicates. On UNIX probably want to
Rem append all errors into a single file.
:brokenput
Rem Copy the message drop file back to VMSland
rcp -b pmdf2ms.msg newbie.process.com.pmdf_lan:pmdf_root:[a_lan.msmail]pmdf2ms.failed
Rem Tell the postmaster we have a problem
rsh newbie.process.com -l pmdf_lan pmdf mail msmail-error.txt postmaster/subject="MS Mail Failure"
Rem Delete the local file so that MS can deliver other process
del pmdf2ms.msg
:loopdelay
Rem ==========================Mail loop Pause============================
echo off
echo Enter G to execute right now
echo Enter X to exit the message loop
choice /C:XG /T:G,60 Enter either G or X
echo on
if errorlevel 2 goto loop_it
|