---
name: "tlsrpt_add_mx_host_pattern"
section: "3"
platform: "linux"
package: "libtlsrpt"
version: "0.5.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/tlsrpt_add_mx_host_pattern"
---

# tlsrpt\_add\_mx\_host\_pattern(3)

adds a MX host pattern to the current policy

## NAME

tlsrpt\_add\_mx\_host\_pattern - adds a MX host pattern to the current policy

## SYNOPSIS

\#include \<tlsrpt.h\>

int tlsrpt\_add\_mx\_host\_pattern(struct tlsrpt\_dr\_t\* dr, const char\* mx\_host\_pattern)

## DESCRIPTION

The `tlsrpt_add_mx_host_pattern` function adds a MX host pattern to the current policy. Multiple MX host patterns can be added within a policy.

## RETURN VALUE

The tlsrpt\_add\_mx\_host\_pattern function returns 0 on success and a combined error code on failure. The combined error code can be analyzed with the *tlsrpt\_strerror* function.

## SEE ALSO

man:tlsrpt\_strerror\[3\], man:tlsrpt\_error\_code\_is\_internal\[3\]

## AUTHOR

Boris Lohner
