Disclaimer
A domain can add a disclaimer to the mail its users send. The server adds it after the message leaves the composer or the mail client, so it applies the same way to the web interface, IMAP clients that submit through the server and scripts that use SMTP submission.
The disclaimer is set per domain by a global administrator or by an administrator of that domain, at Admin > Domains > (domain) > Disclaimer. A domain that has none adds nothing.
Settings
| Setting | Meaning |
|---|---|
| Add the disclaimer to outgoing mail | The disclaimer applies only while this is ticked. |
| External recipients only | On by default. Copies for other users on this server do not get the disclaimer. |
| Plain text | Added to plain-text parts after one blank line. At most 8 KiB and 50 lines. No control characters other than line breaks and tabs. |
| HTML | Added to HTML parts before the closing </body> tag, or at the end when there is none. Cleaned on saving with the same rules as the composer, so scripts, event handlers and javascript: links are removed. At most 8 KiB after cleaning. |
If you fill in only one of the two, the other is made from it: HTML from
plain text by escaping it and turning line breaks into <br>, plain text from
HTML by taking its visible text. An enabled disclaimer needs at least one.
Which domain applies
The domain of the sending user’s primary address, mapped through an alias domain to its target. It does not follow the From header or a send-as address: the setting belongs to the users the domain’s administrator manages. A user who sends as an address on another domain still gets their own domain’s disclaimer.
Which recipients count as external
The recipients that go to the outbound relay queue. A user on another domain hosted on this server, a shared inbox and the members of a distribution group are internal.
With External recipients only on (the default):
- the copy that is relayed carries the disclaimer;
- local recipients and group members receive the message as written;
- your own copy in Sent carries the disclaimer when at least one recipient is external, so it records what left the server;
- a message with no external recipient is not changed at all.
With the option off, every copy carries the disclaimer.
What changes in the message
Only the body. The first text part of a message is changed, and so are both
alternatives of a multipart/alternative. A message whose first part is a
multipart/related gets it in the root of that part. Attachments, including a
text file attached to the message, forwarded messages (message/rfc822),
header fields, the preamble and the epilogue are copied byte for byte.
A changed part is decoded, extended, and written again as quoted-printable (or
base64 when it was base64) in UTF-8. A part in a character set the server does
not know is left as it is. A message with no text part, such as a lone PDF or a
message of attachments only, gets a text/plain part with the disclaimer; a
message that is not already a multipart/mixed is wrapped in one.
The changed message starts with X-Bongo-Disclaimer: {domain}. A message that
already carries that field for the domain is not changed again, which covers a
forward through the same server. The field is sent to external recipients and
names only the sender’s domain. A submitter can add it themselves to suppress
their own domain’s disclaimer; that is accepted, in the same way as the loop
header for groups.
What is never changed
These messages go out as they are, because any change would break the signature or the encryption:
multipart/signed(S/MIME and PGP/MIME signatures);application/pkcs7-mimeandapplication/x-pkcs7-mime;multipart/encrypted;- plain text containing an inline PGP block (
-----BEGIN PGP); - a message whose MIME structure cannot be read (a missing closing boundary, or nesting deeper than the server parses).
Skipped messages are counted by bongo_disclaimer_skipped_total{reason} with
the reasons signed, encrypted, inline_pgp, unparseable and marked
(already carried the marker). bongo_disclaimer_applied_total counts the
messages that got it. Inline PGP and unreadable messages are also logged with
the user and domain under the disclaimer component, never with message
content.
A DKIM-Signature that the sender’s own client added breaks when the disclaimer changes the body, as it would for any forwarding service. The server signs the changed message itself when the domain has a DKIM key.
What it does not cover
Mail the server generates on its own, such as calendar invitations and replies, vacation replies and bounces, and drafts do not get a disclaimer. Mail that arrives on port 25 from other servers is never changed, whatever its From header says: only authenticated submission and the web composer count as the domain’s users.
When the setting cannot be read
The server refuses to send rather than send without the disclaimer. SMTP
submission answers 451 4.3.0 and the web composer shows an error; nothing is
stored or queued, and a retry works once the setting can be read again. A
message the disclaimer must leave alone (the list above) is not a failure.
Storage and delivery
The disclaimer is added before the message is stored and before attachments are split into their own blobs, so the bytes stored, the bytes reconstructed and the bytes relayed are the same. The outbound queue signs the changed message with DKIM, so the signature verifies on the copy the recipient gets. Blobs are never edited: the changed message is a separate blob, and the unreferenced one is collected by the blob garbage collector.
Editing the disclaimer applies to the next message on every node. A retry of a web send that is already in progress is not refused because of an edit.
Cluster
The setting is one record under /system/domain/{domain}/disclaimer, written
with a plain Raft command, so there is no mixed-version divergence. A node on
an older version ignores the record, so mail submitted on that node goes out
without the disclaimer until every node is upgraded. Deleting the domain
removes the record with the rest of its configuration.