Skip to content

Instantly share code, notes, and snippets.

@makubi
Last active June 14, 2021 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makubi/5b616de5ecf438ac29025552c5a37aa3 to your computer and use it in GitHub Desktop.
Save makubi/5b616de5ecf438ac29025552c5a37aa3 to your computer and use it in GitHub Desktop.
require [ "fileinto", "variables", "mailbox", "envelope" ];
if address :matches "delivered-to" "*+*@domain.com" {
set "lopart" "${1}";
} elsif address :matches "delivered-to" "*@domain.com" {
set "lopart" "${1}";
}
if mailboxexists "domain.com/${lopart}" {
fileinto "domain.com/${lopart}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment