Plus-addressing and filtering with Sieve
Plus-addressing, also called subaddressing, lets you add a tag after the local part of your address. Mail to you+tag@itpromail.com is delivered to the account you@itpromail.com. The tag is not a separate mailbox. It is metadata that you can read in the headers and use in filters. Plus-addressing is supported on ITProMail addresses.
Using tags
Give each service or sender its own tag, such as shop, news or bank. Use the same pattern every time:
you+shop@itpromail.com
you+newsletter-cooking@itpromail.com
A tag shows where an address came from. If mail arrives at you+shop from a sender you never gave that address to, you know which service exposed it, and you can filter or stop it.
Keep these points in mind:
- Tags are visible to anyone who receives the message, including in the To header. Do not put secrets in them.
- Mail to a tag you never used still reaches the account. Tags do not block anything by themselves. Use filters to act on them.
- Some web forms reject the plus sign during validation, and some systems strip it. If that happens, use a normal alias instead. See aliases.
- Replies go from the address the message was sent to, so a reply from
you+shopcarries the tag.
Filtering with Sieve
Sieve (RFC 5228) is a mail filtering language that runs when a message is delivered. Testing address parts requires the subaddress extension (RFC 5233). Sieve is available on the Operator and Shadow plans. To create and manage scripts, open Account > Filters. For the full procedure, see Sieve.
This script files everything sent to the shop tag into a folder named Shopping:
require ["fileinto", "subaddress"];
if address :detail "to" "shop" {
fileinto "Shopping";
}
The :detail argument selects the part after the plus sign. The match is case-insensitive by default. Create the target folder first, or confirm that your server creates it, before you rely on the rule.
To match a family of tags, combine :detail with :matches. This rule files every tag that starts with news:
require ["fileinto", "subaddress"];
if address :detail :matches "to" "news*" {
fileinto "Newsletters";
}
Rules run top to bottom. A matching rule does not end processing by itself, so a later rule can also match the same message. Add stop after fileinto when no later rule should run for that message.
Testing
- Send a message to a new tag from an account you control and confirm it lands in the expected folder.
- Check the Sieve script syntax before saving any rule that discards or moves mail you need.
- For more patterns, see Sieve examples.