RFC 3598

Sieve Email Filtering -- Subaddress Extension

πŸ“… published September 2003, from ietf

RFC 3598 πŸŽ€ Sieve Email Filtering -- Subaddress Extension

okay bestie, this one's from September 2003 and it's a Standards Track doc πŸ’… Written by Kenneth Murchison (K. Murchison) at Oceana Matrix Ltd. for the Network Working Group. It doesn't say it obsoletes or updates anything, so there's no drama there. ✨

Status of This Memo

This doc is an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements 🫢 For the current standardization state and status, check the "Internet Official Protocol Standards" (STD 1) edition. Distribution is unlimited, so share it with your whole group chat πŸ’œ

Copyright (C) The Internet Society (2003). All Rights Reserved. 🌸

Abstract

okay so on email systems that allow "subaddressing" or "detailed addressing" (like ken+sieve@example.org), it's sometimes super useful to compare against these sub-parts of addresses ✨ This doc defines an extension to the Sieve mail filtering language that lets users compare against the user and detail parts of an address. Iconic. πŸ¦‹

Table of Contents

1.  Introduction. . . . . . . . . . . . . . . . . . . . . . . . .   2
2.  Capability Identifier . . . . . . . . . . . . . . . . . . . .   2
3.  Subaddress Comparisons. . . . . . . . . . . . . . . . . . . .   2
4.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
6.  Normative References. . . . . . . . . . . . . . . . . . . . .   4
7.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .   5
8.  Intellectual Property Statement . . . . . . . . . . . . . . .   5
9.  Author's Address. . . . . . . . . . . . . . . . . . . . . . .   5
10. Full Copyright Statement. . . . . . . . . . . . . . . . . . .   6

1. Introduction πŸ’–

Subaddressing is when you tack some "detail" info onto the local-part of an [IMAIL] address so the message gets delivered to the mailbox that detail points to 🧚 The detail is set off by a special "separator character" (usually +). That character is the boundary between the "user" (the original local-part) and the "detail" sub-parts, kind of like how @ separates the local-part from the domain. Literally the same energy. πŸ’…

Typical uses look like this:

  • A message addressed to ken+sieve@example.org gets delivered into a mailbox called "sieve" belonging to the user "ken".
  • A message addressed to 5551212#123@example.org gets delivered to voice mailbox number "123" at phone number "5551212". πŸ“ž

This doc describes an extension to the Sieve language defined in [SIEVE] for comparing the "user" and "detail" sub-parts of an address. Conventions for notation follow [SIEVE] section 1.1, including the use of [KEYWORDS]. πŸŽ€

2. Capability Identifier πŸ¦‹

The capability string for this extension is subaddress. That's the whole thing, no cap. ✨

3. Subaddress Comparisons πŸ‘‘

Commands that act exclusively on addresses can take the optional tagged arguments :user and :detail to pick which sub-part of the local-part gets acted on. Main character energy πŸ”₯

NOTE: In most cases, the envelope "to" address is the preferred address to examine for subaddress information when you want to sort messages based on how they were addressed, so you can get to a specific recipient. The envelope address is literally the reason a message is being processed by a given sieve script for a given user πŸ’€ This is especially true with mailing lists, aliases, and "virtual domains", since the envelope might be the only source of detail info for the specific recipient. Iykyk. πŸ™ˆ

The :user argument picks out the sub-part of the local-part to the left of the separator character (so ken in ken+sieve@example.org). If there's no separator character, :user gives you the entire left side of the address, same as :localpart. πŸ“

The :detail argument picks out the sub-part to the right of the separator character (so sieve in ken+sieve@example.org). If there's no separator character, the test evaluates to false 😭 If there's nothing to the right of the separator, then :detail :is the null key (""). Otherwise, the :detail sub-part contains the null key. Okay, that's the logic. 🌈

Implementations MUST make sure the separator character matches what the encompassing mail system uses and/or allows, or unexpected results might happen. Implementations SHOULD let the separator character be configurable so they can work with a variety of mail systems ⭐ Heads up that the mechanisms for defining or querying the separator character used by the mail system are outside the scope of this doc 🫢

The :user and :detail address parts follow the same rules and restrictions as the standard address parts defined in [SIEVE]. For convenience, the "ADDRESS-PART" syntax element from [SIEVE] gets augmented like so:

   ADDRESS-PART  =/  ":user" / ":detail"

Here's a diagram of the ADDRESS-PARTs of an email address using a separator character of '+':

    :user "+" :detail  "@" :domain
   `-----------------'
       :local-part

Example time 🧚

require "subaddress";

# File mailing list messages (subscribed as "ken+mta-filters").
if envelope :detail "to" "mta-filters" {
  fileinto "inbox.ietf-mta-filters";
}

# If a message is not to me (ignoring +detail), junk it.
if not allof (address :user ["to", "cc", "bcc"] "ken",
     address :domain ["to", "cc", "bcc"] "example.org") {
  discard;

}

# Redirect all mail sent to +foo.
if envelope :detail ["to", "cc", "bcc"] "foo" {
  redirect "ken@example.edu";
}

4. Security Considerations πŸ”₯

Security considerations are discussed in [SIEVE]. It is believed that this extension does not introduce any additional security concerns. Still, take this seriously, bestie. Check [SIEVE] before you ship anything πŸ’…

5. IANA Considerations 🌸

The following template is for registering the Sieve extension this doc specifies with IANA:

To: iana@iana.org
Subject: Registration of new Sieve extension

Capability name: subaddress
Capability keyword: subaddress
Capability arguments: N/A
Standards Track/RFC 3598
Person and email address to contact for further information:

Kenneth Murchison
ken@oceana.com

Once that's done, the info gets added to the list of sieve extensions at http://www.iana.org/assignments/sieve-extensions. Registry, but make it cute πŸ¦‹

6. Normative References πŸ“š

[IMAIL]    Resnick, P., Ed., "Internet Message Format", RFC 2822,
           April 2001.

[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119, March 1997.

[SIEVE]    Showalter, T., "Sieve: A Mail Filtering Language", RFC
           3028, January 2001.

7. Acknowledgments 🫢

Big thanks to Tim Showalter, Alexey Melnikov, Michael Salmon, Randall Gellens, Philip Guenther and Jutta Degener for helping with this doc πŸ’œ

8. Intellectual Property Statement ✨

The IETF takes no position on the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology in this doc, or on whether any license under such rights might be available. It also doesn't say it has tried to identify any such rights. Info on the IETF's procedures for rights in standards-track and standards-related docs can be found in BCP-11. Copies of claims of rights made available for publication, and any assurances of licenses to be made available, or the result of an attempt to get a general license or permission for implementers or users to use such proprietary rights, can be obtained from the IETF Secretariat.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology required to practice this standard. Send that info to the IETF Executive Director. πŸ“¬

9. Author's Address πŸŽ€

Kenneth Murchison
Oceana Matrix Ltd.
21 Princeton Place
Orchard Park, NY 14127

EMail: ken@oceana.com

Copyright (C) The Internet Society (2003). All Rights Reserved.

This doc and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or help implement it may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, as long as the above copyright notice and this paragraph are included on all such copies and derivative works. However, this doc itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations. The exceptions are when it's needed for developing Internet standards, in which case the copyright procedures in the Internet Standards process must be followed, or when it's needed to translate it into languages other than English.

The limited permissions above are perpetual and won't be revoked by the Internet Society or its successors or assignees.

This doc and the info in it is provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. πŸ’€

Acknowledgement 🧚

Funding for the RFC Editor function is currently provided by the Internet Society. πŸ’–

πŸ“¦ where this page comes from