Sun Java logo     Copyright      Index      Next     

Sun logo
Sun Java System Messaging Server 6 2005Q1 MTA Developer's Reference 

Contents


Preface
Who Should Use This Book
Before You Read This Book
How This Book Is Organized
Conventions Used in This Book
Typographic Conventions
Symbols
Default Paths and File Names
Command Line Prompts
Related Documentation
Messaging Server Documents
Communications Services Documents
Accessing Sun Resources Online
Contacting Sun Technical Support
Related Third-Party Web Site References
Sun Welcomes Your Comments

Part I MTA SDK

Chapter 1   MTA SDK Concepts and Overview
Channel Programs and Message Queuing
Managing Multiple Threads: Contexts
Enqueuing Messages
Message Components
Envelope
Header
Body
Example
Threads and Enqueue Contexts
Enqueuing Dequeued Mail
Dequeuing Messages
Threads and Dequeue Contexts
Message Processing Threads
String-valued Call Arguments
Item Codes and Item Lists

Chapter 2   MTA SDK Programming Considerations
Running Your Enqueue and Dequeue Programs
Debugging Programs and Logging Diagnostics
Required Privileges
Compiling and Linking Programs
Compiling
Linking Instructions for Solaris
Running Your Test Programs
Preventing Mail Loops when Re-enqueuing Mail
Miscellaneous Programming Considerations
Retrieving Error Codes
Writing Output From a Channel Program
Considerations for Persistent Programs
Refreshing Stale Configuration Information
Keeping the Log File Available For Update

Chapter 3   Enqueuing Messages
Basic Steps to Enqueue Messages
Originating Messages
A Simple Example of Enqueuing a Message
Enqueuing a Message Example Output
Transferring Messages into the MTA
Intermediate Processing Channels
Delivery Processing Options: Envelope fields
Order Dependencies

Chapter 4   Dequeuing Messages
How Dequeuing Works
Basic Dequeuing Steps
Caller-Supplied Processing Routine
The process_message() Routine
A Simple Dequeue Example
Explanatory Text for Numbered Comments
Output from the Simple Dequeue Example
Processing the Message Queue
The process_done() Routine
A Complex Dequeuing Example
Explanatory Text for Numbered Comments
Output from the Complex Dequeue Example
Intermediate processing channels
Preserve Envelope Information
Use MTA_ENV_TO
Use Rewrite Rules to Prevent Message Loops
Intermediate Channel Example
Explanatory Text for Numbered Comments
Sample Input Message for the Intermediate Channel Example
Output from the Intermediate Channel Example
Thread Creation Loop in mtaDequeueStart
Multiple Calls to mtaDequeueStart
Calling Order Dependencies

Chapter 5   Decoding Messages
Usage Modes for mtaDecodeMessage()
The Input Source
Dequeue Context
Caller-Supplied Input Routine
The Inspection Routine
A Simple Decoding Example
Explanatory Text for Numbered Comments
MIME Message Decoding Simple Example Output
The Output Destination
Enqueue Context
Caller-Supplied Output Routine
Decode Contexts
A Simple Virus Scanner Example
Example Option File
Sample Input Message
Explanatory Text for Numbered Comments
Decoding MIME Messages Complex Example Output

Chapter 6   MTA SDK Reference
Summary of SDK Routines
Address Parsing
Dequeue
Enqueue
Error Handling
Initialization
Logging and Diagnostics
MIME Parsing and Decoding
Miscellaneous
Option File Processing
MTA SDK Routines
mtaAccountingLogClose
mtaAddressFinish
mtaAddressGetN
mtaAddressParse
mtaAddressToChannel
mtaBlockSize
mtaChannelGetName
mtaChannelToHost
mtaDateTime
mtaDebug
mtaDecodeMessage
Inspection Routine
Output Routine
Dequeue Context
Caller-Supplied Input Routine
Enqueue Context
Caller-Supplied Output Routine
Decode Context Queries
Item Codes
mtaDecodeMessageInfoInt
mtaDecodeMessageInfoParams
mtaDecodeMessageInfoString
mtaDecodeMessagePartCopy
mtaDecodeMessagePartDelete
mtaDequeueInfo
mtaDequeueLineNext
mtaDequeueMessageFinish
mtaDequeueRecipientDisposition
mtaDequeueRecipientNext
mtaDequeueRewind
mtaDequeueStart
Other Considerations for mtaDequeueStart
Multiple Calls to mtaDequeueStart
Message Processing
Message Processing Procedure
process_message Routine
process_done() Routine
Thread Creation Loop
mtaDequeueThreadId
mtaDone
mtaEnqueueCopyMessage
mtaEnqueueError
mtaEnqueueFinish
mtaEnqueueInfo
mtaEnqueueStart
mtaEnqueueTo
mtaEnqueueWrite
mtaEnqueueWriteLine
mtaErrno
mtaInit
mtaLog
mtaLogv
mtaOptionFinish
mtaOptionFloat
mtaOptionInt
mtaOptionStart
mtaOptionString
mtaPostmasterAddress
mtaStackSize
mtaStrError
mtaUniqueString
mtaVersionMajor
mtaVersionMinor
mtaVersionRevision

Part II Callable Send

Chapter 7   Using Callable Send: mtaSend
Sending a Message
Envelope and Header From: Addresses
To:, Cc:, and Bcc: Addresses
Message Headers and Content
Required Privileges
mtaSendDispose
Compiling and Linking Programs
Examples of Using mtaSend
Example 1: Sending a Simple Message
Example 1 Output
Example 2: Specifying an Initial Message Header
Example 2 Input File
Example 2 Output
Example 3: Sending a Message to Multiple Recipients
Example 3 Output
Example 4: Using an Input Procedure to Generate the Message Body

Chapter 8   mtaSend Routine Specification
mtaSend Syntax
Syntax
Arguments
Item Descriptor Fields
Description
Item Codes
MTA_ADR_NOSTATUS
MTA_ADR_STATUS
MTA_BCC
MTA_BLANK
MTA_CC
MTA_CHANNEL
MTA_CFILENAME
MTA_CFILENAME_NONE
MTA_CTYPE
MTA_ENC_BASE64
MTA_ENC_BASE85
MTA_ENC_BINHEX
MTA_ENC_BTOA
MTA_ENC_COMPRESSED_BASE64
MTA_ENC_COMPRESSED_BINARY
MTA_ENC_COMPRESSED_UUENCODE
MTA_ENC_HEXADECIMAL
MTA_ENC_NONE
MTA_ENC_PATHWORKS
MTA_ENC_QUOTED_PRINTABLE
MTA_ENC_UNKNOWN
MTA_ENC_UUENCODE
MTA_END_LIST
MTA_ENV_FROM
MTA_ENV_TO
MTA_FRAGMENT_BLOCKS
MTA_FRAGMENT_LINES
MTA_FROM
MTA_HDR_ADRS
MTA_HDR_BCC
MTA_HDR_CC
MTA_HDR_FILE
MTA_HDR_LINE
MTA_HDR_NOADRS
MTA_HDR_NORESENT
MTA_HDR_PROC
MTA_HDR_RESENT
MTA_HDR_TO
MTA_HDRMSG_FILE
MTA_HDRMSG_PROC
MTA_IGNORE_ERRORS
MTA_INTERACTIVE
MTA_ITEM_LIST
MTA_MAX_TO
MTA_MODE_BINARY
MTA_MODE_TEXT
MTA_MSG_FILE
MTA_MSG_PROC
MTA_NOBLANK
MTA_NOIGNORE_ERRORS
MTA_PRIV_DISABLE_PROC
MTA_PRIV_ENABLE_PROC
MTA_SUBADDRESS
MTA_SUBJECT
MTA_TO
MTA_USER

Appendix A   Error Status Codes Summary
Glossary

Index


Copyright      Index      Next     


Part No: 819-0107-10.   Copyright 2005 Sun Microsystems, Inc. All rights reserved.