You are currently offline, waiting for your internet to reconnect

PC Ext: Explanation of .PBB and .0LK Files

This article was previously published under Q128913
This article has been archived. It is offered "as is" and will no longer be updated.
The Microsoft Mail for PC Networks EXTERNAL.EXE program creates .0LK and.PBB files when transferring mail via asynchronous (async) or X.25communication links. This article provides an explanation of these files.
More information
A Microsoft Mail for PC Networks mail system may contain more than oneEXTERNAL.EXE to send mail to either a remote user or an externalpostoffice. Likewise, multiple EXTERNAL.EXE programs may serve identicalfunctions (for example, operate against the same group of postoffices orremote users). If more than one EXTERNAL.EXE is used against the samepostoffices, the programs must be able to access and generate mail itemswithout conflicting with one another.

The .0LK file is used to control access to a specific mail outbound queue,and the .PBB file is used to ensure that the same mail item can be sent tomultiple destinations by different Externals at the same time.

OLK Files

For outbound mail, EXTERNAL.EXE "locks" the mailbag containing the outboundmail by creating a semaphore file in the P1 subdirectory. The creation anduse of semaphore files in the P1 subdirectory keeps multiple EXTERNAL.EXEprograms from trying to do the same operation against the same mailbag.Only the EXTERNAL.EXE that currently owns the lock file can send outboundmail from the mailbag. When the session is completed, the lock is removed.

The semaphore locking mechanism is a three step process. The first step isthe creation of a file with the mailbag name for a prefix, and .0LK for asuffix. The file is created in the P1 subdirectory. The second step is toverify that there are no older types of lock files. The third step is toopen the file with read/write, deny-all permissions. If these stepssucceed, the EXTERNAL.EXE program can service the mailbag. When the sessionis complete, the file is closed and deleted.

If the lock file is stranded for any reason (system hang, machine rebootedin middle of session, etc.), this file-stranding event does notautomatically create a problem. This will depend on the status of the fileat the server.

The existence of the file is not a problem in itself, because the nextEXTERNAL.EXE to attempt a lock may be able to open the stranded semaphorelock file, perform the mail transfer operations, and remove the semaphorefile when finished. If none of the External programs can use the lock file,it will have to be manually closed through the server administrativefunctions.

PBB Files

For each message, only one .MAI file is created. Therefore, even though asingle message may be sent to many users, only one .MAI file has beencreated for that message. When multiple EXTERNAL.EXE programs deliver thesame mail message from a single postoffice to different users (eitherdifferent remote users or different postoffices), each EXTERNAL.EXE programreferences that single .MAI file from each of the remote users (orpostoffices) individual mailbag files. For example, Remote User One andRemote User Two, each have their own mailbag file. Both of those mailbagfiles point to a single .MAI message file. Because each remote user has hisor her own mailbag, two separate EXTERNAL.EXE programs may deliver thatsingle message to both users at the same time.

To send that single message to each remote user or postoffice, theEXTERNAL.EXE program must generate a file containing the addressinginformation for that .MAI message file. Each instance of EXTERNAL.EXE mustgenerate a unique addressing-information file for each remote user orpostoffice.

These unique addressing-information files have the format of XXXXXXXX.PBBwhere XXXXXXXX is the hexadecimal identifier (hex-id) of the .MAI file andthe BB is a two letter identifier generated as described in the followingparagraphs. An example of such a file is 000005AF.PBB. EXTERNAL.EXEgenerates and places the PBB files in the P1 subdirectory of thepostoffice.

During a remote or dispatch session, EXTERNAL.EXE generates a unique P1Locking ID or extension before generating any outgoing mail. It does thisvia an algorithm that tries to create a file, where xxx is anextension that can be anything from .PBB to .PZZ. If LOCKP1ID.PBB isalready in use, an attempt to create "LOCKP1ID.PBC" is done. If this cannotbe done, then the extension is again incremented until all possibilitiesare exhausted. There are at least 500 possible combinations, so theprobability of that many concurrent sessions occurring is incredibly small.

Once the P1 lock (that is, extension) is generated for the session,EXTERNAL.EXE uses it for the filename extension for generating theaddressing-information file. This allows for multiple EXTERNAL.EXEs todispatch the same piece of mail to multiple remote recipients. You will getfilenames like xxx.PBB and xxx.PBC for the same piece of outgoing mailif a concurrent transmission is occurring (the prefix will be the same asthe .MAI).

When the session is complete, EXTERNAL.EXE will clean up by deleting anygenerated files, including the lock file(s).
3.00 olk mia semophore

Article ID: 128913 - Last Review: 10/26/2013 03:16:00 - Revision: 2.0

  • kbnosurvey kbarchive KB128913