I currently have a sieve filter that looks like the following:
require ["variables", "envelope", "fileinto", "vnd.dovecot.filter", "subaddress"];
if envelope :matches "to" "*" {
set :lower "my_recipient" "${1}";
filter ".." "${my_recipient}";
fileinto "INBOX";
}
This works great. However my filter current is unable to correctly handle sub-addresses such as: ken+sieve@example.org
So I would like to set the my_recipient
variable to be ken@example.org in order to the filter to work correctly, even when the envelope was set to ken+sieve@example.org
I have read through the subaddress documentation, and I can see how to get i.e the user
part or the domain
part, but not how to get the full address including domain without the detail
part. How could I achieve that?