USPS Technical Specifications for Mail.dat and Mail.xml
USPS Technical Specifications for Mail.dat and Mail.xml are the USPS documents that say how PostalOne! accepts mailing data in the two industry formats.Mail.xml Technical Specifications R65.0.0.0 page 23“The purpose of this Technical Specification is to supplement the DTAC Mail.XML”USPS original Technical programmers and managers use them to build software that submits electronic documentation for mailings.Mail.xml Technical Specifications R65.0.0.0 page 23“The intended audience for this specification is technical programmers and technical managers.”USPS original
What it is
Mail.dat is the mailing industry's standard file format for sending a mailing's details to USPS.Mail.dat Technical Specifications R65.0.0.0page 12“One of the ways the system enables customers to electronically send detailed information is using the mailing industry’s standardized”USPS original DTAC, the Delivery Technology Advocacy Council, maintains the Mail.dat File Specification.Mail.dat Technical Specifications R65.0.0.0page 12“The Mail.dat File Specification is a key document from DTAC.”USPS original DTAC is a member-driven group of mailing and shipping industry leaders.Mail.dat Technical Specifications R65.0.0.0page 12“DTAC is a member driven organization who has”USPS original
The USPS Mail.dat Technical Specification adds the rules PostalOne! applies to Mail.dat files.Mail.dat Technical Specifications R65.0.0.0PDF page 2“Section 9 includes Mail.dat validations.”USPS original With Mail.dat, mailers no longer fill in qualification reports and postage statements by hand.Mail.dat Technical Specifications R65.0.0.0page 12“Customers using Mail.dat files no longer have to complete manual qualification reports (standardized documentation) or”USPS original PostalOne! generates them from the files.Mail.dat Technical Specifications R65.0.0.0page 43“The PostalOne! System uses the Mail.dat files to generate postage”USPS original
Mail.XML is an XML-based DTAC specification for web services.Mail.xml Technical Specifications R65.0.0.0 page 19“Mail.XML is an XML-based DTAC specification for web services.”USPS original The USPS implementation of Mail.XML is a complement to Mail.dat.Mail.xml Technical Specifications R65.0.0.0 page 19“The Postal Service implementation of Mail.XML is a complement to Mail.dat.”USPS original Mailers may keep Mail.dat as their database and use Mail.XML for business-to-business messages.Mail.xml Technical Specifications R65.0.0.0 page 19“Mailers using Mail.dat can continue to use it as a database, but can use Mail.XML for communication and automation of business to business processing.”USPS original Mail.XML supports Full-Service, Mixed Service and Co-Palletized mailings.Mail.xml Technical Specifications R65.0.0.0 page 19“Mail.XML supports Full-Service, Mixed Service, and Co-Palletized mailings.”USPS original
The two formats differ in who counts the pieces.Mail.xml Technical Specifications R65.0.0.0 page 20“Mail.dat calculates from the raw data in several Mail.dat files the copies”USPS original Mail.dat calculates copies and pieces at each price level from the raw data in its files.Mail.xml Technical Specifications R65.0.0.0 page 20“Mail.dat calculates from the raw data in several Mail.dat files the copies”USPS original In Mail.XML, the mailer gives those numbers directly, so there is less round-off error.Mail.xml Technical Specifications R65.0.0.0 page 20“In Mail.XML, the mailer provides the numbers of copies and pieces for each price level directly”USPS original
How it works
A Mail.dat job reaches PostalOne! through the Mail.dat Client, a USPS program the mailer installs to validate and upload files.Mail.dat Technical Specifications R65.0.0.0page 14“The PostalOne! Mail.dat Client Software is used to validate and upload Mail.dat files to the PostalOne! System.”USPS original The client runs with a user interface for manual upload or unattended in batch mode.Mail.dat Technical Specifications R65.0.0.0page 15“can be run in a Graphical User Interface (GUI for manual upload) or in batch mode”USPS original
A Mail.dat job, from approved software to acceptance.
- USPS approves the mailer's software in the Test Environment for Mailers before production use.Mail.dat Technical Specifications R65.0.0.0page 13“This environment is part of the software approval process for all mailers prior to moving into the production environment.”USPS original
- The mailer builds the job's files in the DTAC Mail.dat format.Mail.dat Technical Specifications R65.0.0.0page 43“the Mail.dat files sent via the Internet must be in the mailing”USPS original
- The Mail.dat Client validates the files at the mailer's site.Mail.dat Technical Specifications R65.0.0.0page 14“By doing most of the validation at the mailers site, it can reduce the workload of the”USPS original
- After the files pass, the client uploads them to PostalOne!.Mail.dat Technical Specifications R65.0.0.0page 60“The Mail.dat Client validates the fields in the files and uploads the files to the database after successful validation.”USPS original
- PostalOne! generates postage statements and qualification reports from the files.Mail.dat Technical Specifications R65.0.0.0page 43“The PostalOne! System uses the Mail.dat files to generate postage”USPS original
- Acceptance clerks review those reports together with the physical mail.Mail.dat Technical Specifications R65.0.0.0page 43“qualification reports and postage statements together with the physical mail in the mail verification and acceptance process.”USPS original
In batch mode, the client can also download Status Receipt files.Mail.dat Technical Specifications R65.0.0.0page 27“The Status Receipt files provide information about which stage of the PostalOne! Process each”USPS original These show which stage of PostalOne! processing each Mail.dat file is in.Mail.dat Technical Specifications R65.0.0.0page 27“The Status Receipt files provide information about which stage of the PostalOne! Process each”USPS original
Mail.XML works as an exchange of messages instead of a set of files.Mail.xml Technical Specifications R65.0.0.0 page 21“There are two main types of Mail.XML messages that are used to share data between the mailer and PostalOne!:”USPS original The mailer sends request messages with container, mailpiece and postage information.Mail.xml Technical Specifications R65.0.0.0 page 21“to send container information, mailpiece information, and postage information.”USPS original PostalOne! answers each one with an Accept response when it validated and uploaded.Mail.xml Technical Specifications R65.0.0.0 page 21“Mailers will receive an Accept response if the request message that was submitted validated”USPS original After an Accept, the mailer may go on with the rest of the messages in that mailing group.Mail.xml Technical Specifications R65.0.0.0 page 21“After an Accept response is received, the mailer may continue submitting the”USPS original
Mail.dat files
PostalOne! uses seventeen Mail.dat files.Mail.dat Technical Specifications R65.0.0.0page 39“This section contains the names and definitions of the seventeen files used in Mail.dat by the PostalOne! System.”USPS original The first three in the list are:
- The Header file introduces the job and gives the record count for each file type.Mail.dat Technical Specifications R65.0.0.0page 39“importantly, it identifies the total file record count for each file type.”USPS original
- The Segment file separates parts of a mailing that need different processing.Mail.dat Technical Specifications R65.0.0.0page 62“The Segment File separates parts of a mailing that require different processing.”USPS original
- The Mailpiece Unit file describes the physical mailpiece, such as its dimensions.Mail.dat Technical Specifications R65.0.0.0page 39“The Mailpiece Unit file contains the physical description of the whole”USPS original
Every file in a set shares one eight-character name plus a three-character extension.Mail.dat Technical Specifications R65.0.0.0page 43“The file name consists of eight alphanumeric characters plus a 3-character file-specific extension.”USPS original The name joins the User License Code, a four-character code unique to each Mail.dat licensed user, and the File Set ID, a four-character identifier the user chooses.Mail.dat Technical Specifications R65.0.0.0page 43“The file name consists of eight alphanumeric characters plus a 3-character file-specific extension.”USPS original
PostalOne! lets four DTAC files ride in a file set but does not validate, upload or store their records.Mail.dat Technical Specifications R65.0.0.0page 43“For a file that is not supported, the PostalOne! System will allow the file to be included in a file set; however it will not perform any validations,”USPS original The unsupported files are:Mail.dat Technical Specifications R65.0.0.0page 43“The PostalOne! System does not support the following DTAC files.”USPS original
- Seed Name Record,
SNR - Special Fee Barcode Record,
SFB - IJ / Container Relationship Record,
ICR - Extra Piece Detail,
EPD
Mail.XML messages
Mail.XML messages fall into six sets, each with its own schema module.Mail.xml Technical Specifications R65.0.0.0 page 21“Mail.XML messages are grouped into six sets:”USPS original
- Transportation Messages
- Mailing Messages
- Data Distribution Messages
- Identification Messages
- Supply Chain Messages
- System Messages
Electronic documentation uses two of those modules, mailxml_mm.xsd and mailxml_sc.xsd.Mail.xml Technical Specifications R65.0.0.0 page 22“With the breakdown of the XSD into multiple schemas, eDoc functionality will be covered by two modules:”USPS original USPS publishes its Mail.XML specification in four volumes by subject:Mail.xml Technical Specifications R65.0.0.0 page 21“The Full Service 2016 Releases are separated based on subject matter into the following volumes:”USPS original
- Postage Payment & Reporting, for eDoc
- Appointment Scheduling, for FAST
- Profiles & Full-Service Feedback, for MID-CRID
- Data Distribution
USPS recommends eDoc messages of about 25 MB for best performance.Mail.xml Technical Specifications R65.0.0.0 page 22“USPS recommends the following eDoc file sizes for optimum performance: … 25 MB Roughly 40,000 – 45,000 Mail Pieces (MailPieceBlock)”USPS original At that size, a MailPieceCreateRequest holds roughly 40,000 to 45,000 pieces.Mail.xml Technical Specifications R65.0.0.0 page 22“25 MB Roughly 40,000 – 45,000 Mail Pieces (MailPieceBlock)”USPS original
USPS caps Mail.XML software at seven FAST queries an hour.Mail.xml Technical Specifications R65.0.0.0 page 22“The Postal Service is requiring that USPS Mail.XML customers update their Mail.XML software to query the USPS PostalOne! FAST systems no more than seven times per hour.”USPS original Web services pull software is capped at 200 queries in 24 hours for eDoc, FAST or Full-Service data.Mail.xml Technical Specifications R65.0.0.0 page 22“their web services pull software to query PostalOne! servers no more than 200 times in a given 24 hour period for”USPS original
Versions and environments
Release 65.0 deploys on January 3, 2027.Mail.dat Technical Specifications R65.0.0.0page 12“January 2027 65.0 25.1.1.0, 26.1.1.0 … Deployment Date: January 3rd, 2027”USPS original Its Mail.dat specification covers Mail.dat versions 25-1 and 26-1, which support the full-service option.Mail.dat Technical Specifications R65.0.0.0page 12“This technical specification discusses Mail.dat versions 25-1 and 26-1 which support the full-service option.”USPS original On the Mail.XML side, Release 65 adds version 29.2 and lists two older versions for decommissioning.Mail.xml Technical Specifications R65.0.0.0 page 23“January 2027 Release 65 Mail.XML 28.1* Mail.XML 28.2* Mail.XML 29.0 Mail.XML 29.1 Mail.XML 29.2** … Note: The version(s) flagged with double asterisk (**) are new versions planned for implementation with the release date. … Note: The version(s) flagged with single asterisk (*) were planned for de-commissioning”USPS original
The environments are:
- The Preproduction Environment holds pre-release software for testing with production data.Mail.dat Technical Specifications R65.0.0.0page 13“This environment will contain pre-release software and is intended for mailer testing software development testing with production data.”USPS original
- The Test Environment for Mailers is part of the software approval process.Mail.dat Technical Specifications R65.0.0.0page 13“This environment is part of the software approval process for all mailers prior to moving into the production environment.”USPS original
- The Production Environment takes Mail.dat transactions for postage payment from approved customers.Mail.dat Technical Specifications R65.0.0.0page 13“This environment will be used by all customers that have been approved in the TEM environment by the USPS to start sending Mail.dat transactions for postage payment.”USPS original
The Preproduction Environment usually opens about one month before the Production and TEM release.Mail.dat Technical Specifications R65.0.0.0page 13“will be available typically one month prior to Production and TEM release”USPS original
Rules
Mailers must successfully complete testing Mail.dat in the Test Environment for Mailers (TEM), before files can be submitted in the Production Environment.Mail.dat Technical Specifications R65.0.0.0page 12“Mailers must successfully complete testing Mail.dat in the Test Environment for Mailers (TEM), before files can be submitted in the Production Environment.”USPS original
A mailer must pass Mail.dat testing in the test environment before it submits files in production.
All file versions must use the Mail.dat Client Software described in detail in this section.Mail.dat Technical Specifications R65.0.0.0page 14“All file versions must use the Mail.dat Client Software described in detail in this section.”USPS original
Every Mail.dat version must go through the Mail.dat Client to reach PostalOne!.
The Job ID field in the header must be unique within the PostalOne! System for 13 months.Mail.dat Technical Specifications R65.0.0.0page 62“The Job ID field in the header must be unique within the PostalOne! System for 13 months.”USPS original
A Job ID in the Header file must not repeat in PostalOne! within 13 months.
Mailers must include the CSM file for all Update and Change jobs.Mail.dat Technical Specifications R65.0.0.0page 90“Mailers must include the CSM file for all Update and Change jobs.”USPS original
Every update or change job must carry the Container Summary file, CSM.
Mailers must include the PQT and the PDR for Full-Service or Mixed Service mailings to ensure that Full-Service feedback is provided.Mail.dat Technical Specifications R65.0.0.0page 90“Mailers must include the PQT and the PDR for Full-Service or Mixed Service mailings to ensure that Full-Service feedback is provided.”USPS original
A Full-Service or Mixed Service mailing must include the Package Quantity and Piece Detail files. These files are what Full-Service feedback depends on.
The mailer must then update the data based on the error messages that were provided and resubmit.Mail.xml Technical Specifications R65.0.0.0 page 21“The mailer must then update the data based on the error messages that were provided and resubmit.”USPS original
After a Mail.XML Reject response, the mailer must fix the data the errors point to and send the message again.
What goes wrong
The Mail.dat Client sorts files into three output folders: validated, failed and rejected.Mail.dat Technical Specifications R65.0.0.0page 27“In all cases, Mail.dat files will be moved from an input folder to one of three output folders”USPS original A file goes to the rejected folder before validation for these reasons:Mail.dat Technical Specifications R65.0.0.0page 27“Files are placed in the rejected folder if there are files that are not listed in the HDR file, files that are not recognized as standard Mail.dat files (HDR, SEG, SEG, etc.) or files that are identified as a nonsupported Mail.dat spec.”USPS original
- It is not listed in the Header file.
- It is not a standard Mail.dat file.
- It belongs to a Mail.dat specification PostalOne! does not support.
PostalOne! rejects a whole Mail.dat job in several cases:
- Two full-service pieces share an Intelligent Mail barcode value, since full-service mail has no duplicate threshold.Mail.dat Technical Specifications R65.0.0.0page 70“For full-service pieces, there is no threshold (0.5%) for duplicate barcodes.”USPS original
- The same original or update job arrives twice at the same time.Mail.dat Technical Specifications R65.0.0.0page 90“Duplicate original or update jobs that are submitted simultaneously will be rejected.”USPS original
- An update or change job leaves out the Container Summary file.Mail.dat Technical Specifications R65.0.0.0page 90“The mailing will be rejected If the CSM file is not included.”USPS original
- A change job sends original records whose values differ from those already submitted.Mail.dat Technical Specifications R65.0.0.0page 90“If the original records have updated values, the system rejects the job.”USPS original
- A transportation update arrives more than 30 days after the postage statement mailing date.Mail.dat Technical Specifications R65.0.0.0page 91“A Transportation Update job will be rejected if it is submitted more than 30 days after the CSM Postage Statement Mailing Date.”USPS original
A mailer cannot cancel Mail.dat files once a postal employee has frozen the job for processing.Mail.dat Technical Specifications R65.0.0.0page 90“Mailers can no longer cancel files submitted using Mail.dat files if the job has been frozen for processing by a postal employee.”USPS original
A Mail.XML request that fails validation gets a Reject response.Mail.xml Technical Specifications R65.0.0.0 page 21“Mailers will receive a Reject response if the request message that was submitted did not”USPS original The response carries a ReturnCode and a ReturnDescription that describe the errors.Mail.xml Technical Specifications R65.0.0.0 page 21“A ReturnCode and corresponding ReturnDescription, which describes the errors”USPS original A Mail.XML ContainerUpdateRequest is rejected when it arrives more than 30 days after the postage statement mailing date.Mail.xml Technical Specifications R65.0.0.0 page 86“If the Submission Date for the Mail.dat file or Mail.XML ContainerUpdateRequest message is more than 30 days after the Postage Statement Mailing Date, the file and/or message will be rejected.”USPS original
Terms
- Mail.dat
- Mail.dat is an industry-defined database structure consisting of files linked by key fields.A Guide to Full Servicepage 45“Mail.dat is an industry-defined database structure consisting of files linked by key fields.”USPS original
- Mail.xml
- Mail.XML is an XML-based DTAC specification for web services.Mail.xml Technical Specifications R65.0.0.0 page 19“Mail.XML is an XML-based DTAC specification for web services.”USPS original
- PostalOne!PostalOne! system
- the information management system that provides an electronic linkage between a customer’s mailing information and the Postal Service’s business mail acceptance and induction processes. It produces postage statements and supporting documentation.Guide to eInductionpage 7“the information management system that provides an electronic linkage between a customer’s mailing information and the Postal Service’s business mail acceptance and induction processes. It produces postage statements and supporting documentation.”USPS original
- PostalOne! Mail.dat ClientPostalOne! Mail.dat Client Software, PostalOne! Mail.dat Client Application, Mail.dat client
- is used to validate and upload Mail.dat files to the PostalOne! System.Mail.dat Technical Specifications R65.0.0.0page 14“is used to validate and upload Mail.dat files to the PostalOne! System.”USPS original
- File Validator
- checks your Mail.dat files to ensure that all required fields are populated and contain the correct character format.Mail.dat Technical Specifications R65.0.0.0page 23“checks your Mail.dat files to ensure that all required fields are populated and contain the correct character format.”USPS original
- Status Receipt files
- The Status Receipt files provide information about which stage of the PostalOne! Process each Mail.dat file is in.Mail.dat Technical Specifications R65.0.0.0page 46“The Status Receipt files provide information about which stage of the PostalOne! Process each Mail.dat file is in.”USPS original
- Test Environment for MailersTEM, Testing Environment for Mailers, TEM (Testing Environment for Mailers)
- The Test Environment for mailers (TEM) is a test platform designed to allow mailers to test their ability to submit electronic mailing information such as Full Service (FS) mailings to the Postal Service.PostalPro: Testing Environment for Mailers (TEM) Using Mail.XML“The Test Environment for mailers (TEM) is a test platform designed to allow mailers to test their ability to submit electronic mailing information such as Full Service (FS) mailings to the Postal Service.”USPS original
- Production EnvironmentPROD, Production
- This environment will be used by all customers that have been approved in the TEM environment by the USPS to start sending the transaction/messages.Mail.xml Technical Specifications R65.0.0.0 page 23“This environment will be used by all customers that have been approved in the TEM environment by the USPS to start sending the transaction/messages.”USPS original
- Preproduction Environment
- This environment will contain pre-release software and is intended for mailer testing software development testing with production data.Mail.dat Technical Specifications R65.0.0.0page 13“This environment will contain pre-release software and is intended for mailer testing software development testing with production data.”USPS original
- Electronic DocumentationeDoc, Electronic Documentation of Mailing Information, electronic document, electronic mailing documentation
- an electronic postage statement that may also contain specific information about a mailing such as barcode information and qualification reportsElectronic Documentation (eDoc) Fact SheetPDF page 1“an electronic postage statement that may also contain specific information about a mailing such as barcode information and qualification reports”USPS original
- User License CodeULC
- a four-digit alphanumeric code unique to Mail.dat licensed userMail.dat Technical Specifications R65.0.0.0page 43“a four-digit alphanumeric code unique to Mail.dat licensed user”USPS original
- Mail.XML request messages
- Mail.XML request messages are used to submit mailing information to PostalOne!Mail.xml Technical Specifications R65.0.0.0 page 21“Mail.XML request messages are used to submit mailing information to PostalOne!”USPS original
Documents
The page also holds guides for setting up Informed Delivery campaigns through Mail.dat and Mail.XML.PostalPro: USPS Technical Specifications for Mail.dat and Mail.xml“Mailer onboarding and guides for testing and setting up Informed Delivery campaigns through Mail.dat and Mail.XML via eDoc submission to PostalOne!”USPS original
Technical Specifications
- Mail.xml Technical Specifications for FAST 14.0AOctober 21, 2026
- Mail.xml Technical Specifications for FAST 16.0October 21, 2026
- Mail.dat Technical Specifications R65.0.0.0October 5, 2026
- Mail.xml Technical Specifications R65.0.0.0October 5, 2026
- Mail.dat Technical Specifications R64.0.0.0July 24, 2026
- Mail.xml Technical Specifications R64.0.0.0July 24, 2026
- Mail.dat Technical Specifications R63.0.0.0December 5, 2025
- Mail.xml Technical Specifications R63.0.0.0October 31, 2025
- Informed Delivery Mail.dat Mailer GuideJune 13, 2025
- Informed Delivery Mail.XML Mailer GuideJune 13, 2025
- Mail.dat Technical Specifications R60.0.0.0 V3June 14, 2024
- Mail.XML Technical Specifications R60.0.0.0 V3June 14, 2024
- Mail.dat Technical Specifications R59.0.0.0 V2December 12, 2023
- Mail.XML Technical Specifications R59.0.0.0 V2December 12, 2023
- Informed Delivery Saturation Campaign eDoc Field RequirementsAugust 17, 2023
- Informed Delivery Saturation eDoc ScenariosAugust 17, 2023
- Informed Delivery Promotion eDoc Embedded Campaign Types and Threshold ValidationsAugust 17, 2023
- Mail.dat Technical Specifications R58.0.0.0 V3June 21, 2023
- Mail.XML Technical Specifications R58.0.0.0 V2June 9, 2023
- Mail.XML Technical Specifications R57.0.0.0 V3November 28, 2022
- Mail.dat Technical Specifications R56.0.0.0 V1August 30, 2022
- Mail.XML Technical Specifications R56.0.0.0 V1August 30, 2022
- Mail.dat Technical Specifications R55.0.0.0 V3June 13, 2022
- Mail.XML Technical Specifications R55.0.0.0 V1June 7, 2022
- Mail.dat Technical Specifications R54.0.0.0 V3December 10, 2021
- Mail.XML Technical Specifications R54.0.0.0 V3December 10, 2021
- Mail.dat Technical Specifications R53.0.0.0 (Version 3)July 13, 2021
- Mail.XML Technical Specifications R53.0.0.0 (Version 2)July 13, 2021
- Mail.dat Technical Specifications R52.1 (Version 1)April 5, 2021
- Mail.XML Technical Specifications R52.1 (Version 1)February 16, 2021
Tech Guides
- Informed Delivery Mail.dat Mailer GuideJune 13, 2025
- Informed Delivery Mail.XML Mailer GuideJune 13, 2025
- Mail.dat Technical Specifications R61.0.0.0 V2December 3, 2024
- Mail.XML Technical Specifications R61.0.0.0 V1November 15, 2024
- Informed Delivery Saturation Campaign Mailer GuideAugust 17, 2023
- Informed Delivery Mailer Onboarding GuideJune 28, 2022
User Guides
- Informed Delivery Mailer Onboarding GuideJune 28, 2022
- Informed Delivery Create Campaign Use Case for MailersMarch 20, 2024
Contacts
The PostalOne! System Help Desk answers questions and technical problems with PostalOne!.Mail.dat Technical Specifications R65.0.0.0page 13“If you experience any difficulties when using the PostalOne! Systems, have questions, or need more information about the PostalOne!”USPS original It is open Monday through Friday, on Central time, and takes email or phone contact.Mail.dat Technical Specifications R65.0.0.0page 13“The PostalOne! System Help Desk is available Monday through Friday … CST, and can be contacted via e-mail or telephone.”USPS original Its phone number is (800) 522-9085.Mail.dat Technical Specifications R65.0.0.0page 13“(800) 522-9085”USPS original Its email address is postalone@email.usps.gov.Mail.dat Technical Specifications R65.0.0.0page 13“postalone@email.usps.gov”USPS original
Sources
- Mail.xml Technical Specifications R65.0.0.0 USPS original
- Mail.dat Technical Specifications R65.0.0.0USPS original
- A Guide to Full ServiceUSPS original
- Guide to eInductionUSPS original
- PostalPro: Testing Environment for Mailers (TEM) Using Mail.XMLUSPS original
- Electronic Documentation (eDoc) Fact SheetUSPS original
- PostalPro: USPS Technical Specifications for Mail.dat and Mail.xmlUSPS original