Royal Mail Group Security (RMGS), the investigative and security function of Royal Mail, is the oldest functioning law enforcement agency in the world. Prior to the full divorce of Post Office Limited and Royal Mail in 2012, RMGS was a branch within the larger Royal Mail Group Centre, operating alongside Post Office Security and Investigation Services (POSIS) to maintain proper function of The Post Office. RMGS was bifurcated from POSIS in 1999 – before that, POSIS was the sole investigative agency for the entire Royal Mail Group, with its executive board at headquarters known as the Security and Investigation Executive (S&IE). Before the year 1969, the Royal Mail was literally the "property of the Crown," and its agents were all officers of the State. However, since 1969 and the creation of the Statutory Corporation, their enforcement powers have been more limited.

Known before 1996 as the Post Office Investigation Department (POID), before 1967 as the Post Office Investigation Branch (IB), before 1908 as the Confidential Enquiry Branch, before 1883 as the Missing Letter Branch, and before 1816 by the nickname of The Enquirers, it has been a function of the British Postal system since 1683. For over three centuries, it has investigated those alleged criminals who have committed package theft, mail robbery, mail fraud, highway robbery, sedition, terrorism, communist activities, murder, smuggling, and other crimes involving the post. It has also been the primary investigative authority over employees of the British postal system, and until 1836, the Missing Letter Branch pursued the death penalty against any postal carrier who had stolen a single letter.

IB was the principal investigating agency into the incidents of the Great Train Robbery, directing the efforts of the Buckinghamshire Police, the Train Robbery Squad, and the Metropolitan Police. POID was especially involved in the pursuit of the serial killer Donald Neilson.

From 1968 onward, after the disastrous handling of the General Post Office by John Stonehouse (who turned out to be a Czech-KGB spy, and faked his own death in 1974), Neoliberal and Libertarian elements of the Liberal Democrats and Conservatives undertook decades-long efforts at privatization of the Post. In 1996, a massive attempt to fully privatize the British postal system was undertaken. Despite the failure of this attempt, it still resulted in the effective dismantling of POID in what was called a "modernization" program – one that would for the successors of POID – RMGS and POSIS – be the inception of the disastrous British Post Office Scandal, known today as "the greatest miscarriage of justice in British history." Confusingly, today, Royal Mail is what Brits call the company that manages the bulk of their postal services, while Post Office Limited is an entirely different organization that only oversees a very limited scope of postal services.

Origins of postal intelligence and security

Creation of the British Post (1635) The English monarchy maintained some form of postal system since the Middle Ages, and Charles I of England established an official British Post in 1635. For about twenty years, this organization operated as a once-weekly delivery service. The Post, being the state-authorized entity, was the center of all communications throughout Britain – the only other method to communicate with someone directly was to talk to them, disregarding smoke signals and wigwags. There were many private couriers, but none of them could be relied upon with the same official guarantee of delivery as that of the state's service.

The GPO and Cromwell's postal intelligence service (1653–1660)

It was not until the British Interregnum, however, that Oliver Cromwell and The Protectorate established the General Post Office (GPO) in 1653, operating it as a mechanism of the Republic. The Post Office Act of 1657, in addition to fixing the rate of postage, authorized the Republican Secretary of State, John Thurloe, to access the monopoly of the Post to gather intelligence on enemies of the state, and to oversee intelligence capabilities for the Roundheads. The GPO became England's largest intelligence apparatus, performing intelligence gathering, postal censorship, and surveillance duties, among other activities. Thurloe was removed from his office, accused of treason, and arrested in May 1660.

The Restoration Post Office and the Stuart postal intelligence service (1660–1683)

The Royalists did not end Thurloe's work, only its targets. While the methods remained the same, the targets shifted as the continuing wars upset the power balance of Great Britain. Through the rest of the Seventeenth Century, persons secret and unknown were assigned with opening and reading the mails of suspected traitors to the regime. The knowledge in the general public that the Post Office was not only carrying letters, but had normalized the practice of reading correspondences, caused a fear in Britain that their letters were not secure, which was a deliberate tactic by the Post Office. Their intention was twofold: the act of reading the mail ensured that the King knew all in his land, and the act of letting people know about it caused enough fear to hope that the Post would no longer be used to commit treason.

The Restoration Act of 1660 created the Restoration Post Office and fermented the machinery of the post, with its headquarters at the General Letter Office on Clock Lane, Dowgate. Charles II of England continued to rely on GPO largely as the center of his own massive royal Stuart intelligence system. Only one year later, in 1661, the GPO was purged of all British Republicans and Roundheads who had been working at the Post under John Wildman and Henry Bishop – the same year that Bishop invented the first known postmark at Clock Lane. Bishop, despite being suspected to hold Republican sympathies, was retained as Postmaster General of the United Kingdom until the appointment of Daniel O'Neill.

Henry Bennet, 1st Earl of Arlington, serving as the Secretary of State for the Southern Department, managed to regain State's control over the Post in 1667, appointing Joseph Williamson, the creator of the London Gazette, as his chief spymaster. Members of this intelligence team were mostly holdovers from Thurloe's intelligence staff; Isaac Dorislaus, Samuel Morland, and John Wallis.

Despite the fact that the Roundheads and the Royalists had targeted each other, they both shared other common and more dangerous enemies: the French, the Dutch, and the Spanish. While the British were secretly reading their diplomatic mails and diplomatic correspondences, those other great European powers were also reading those of the British. The Earl Arlington, desiring to be able to read European letters without detection, tasked Samuel Morland with the job.

Beginning around 1664, Morland worked off of espionage reports received from Spain to develop entirely new technologies and chemistries, and successfully demonstrated to Arlington and Williamson a letter that had been opened without leaving any signs – Arlington could not tell the difference. Morland pioneered many of the early methods of postal censorship, forgery of documents and wax seals, analytical chemistry, fiber orientation analysis and paper grain direction engineering, graphonomics and graphology, steganography, and cryptography. Samuel Morland is suggested to be one of the early inventors of modern pliable plastics, which he used in his wax seal forgeries. Morland operated his laboratory until the Great Fire of London burned his entire works. He was not able to rebuild his lab until the 1690s.

The practices of postal interception were formalized and outlined by Henry Coventry in 1677, in an exchange of letters to the Earl Arlington. Coventry, himself, had only just in 1676 been ordered by the King to perform such an interception mission against Edward Colman. In his letters to the Earl Arlington, he specified that even though he personally found the practice of reading private correspondences morally wrong, as long as it was done at the orders of the King, or at the King's "particular command," no other permissions were necessary.

The Enquirers (1683–1816)

Richard Swift hires the first investigators (1683) The first officeholder of Solicitor to the General Post Office was Gentleman Attorney Richard Swift, who took office in 1683. His office was principally responsible for: “the detection and carrying on of all prosecutions against persons for robbing the mails and other fraudulent practices.” He served in this office to at least 1713, when he was commended by HM Treasury as having "...all along acted with great diligence, faithfulness, and success."

He only worked three days a week, considered normal for his position at the time. He hired an unknown number of Clerks who served as what would later become known as The Enquirers.The notorious mail robber and highwayman John Hawkins, wrote in a letter about his capture that: “I found two men whose countenances I did not like; it came to my head that they were The Enquirers.” Hawkins and his associate George Simpson were executed on 21 May 1722, hung by the neck until dead.

In 1765, an Act of Parliament ensured that a death penalty was received as standard for the following crimes related to letters, correspondence, and packages; theft, secreting, destruction of letters or packages, or embezzlement. The crime of obstructing the mail received a sentence of 6 months imprisonment.

During the American Revolutionary War, the General Post Office resumed the duties of secretly reading the mails of the rebellious Colonists. In response, the Colonists created their own security and police force for the security of their mail system, headed by William Goddard and Benjamin Franklin. That service is today known as the United States Postal Inspection Service (USPIS), the oldest continuing federal law enforcement agency in the United States, and the closest counterpart to POID.

In 1774, the Enquirers came at-odds with the office of the Commissioners of Customs over a scandal involving contraband goods being brought into Britain. The Enquirers investigated and discovered that local officers of Customs were being paid to pretend to make seizures of illegal goods at port, while allowing the bulk of those same shipments to be allowed into the country.

In 1788, Parliamentary Commissioners reported on behalf of the Treasury that they had discovered that the Solicitor at the time had hired an Assistant Solicitor named Antony Parkins in 1771, who was working without an official salary and only through legal charges and bills. The Commissioners further suggested that the current Solicitor was not carrying out his duties, and they were mostly being carried out by the Assistant Solicitor. They recommended to Parliament that people should only get paid if they actually do their job, and since Parkins was doing the Solicitor's job without a salary, that the Solicitor should be removed.

Antony Parkins is appointed Solicitor (1793)