Last active
December 15, 2015 09:19
-
-
Save poritsky/5238032 to your computer and use it in GitHub Desktop.
Gathers list of expressions in Apple Mail rules, which in my use simply gathers a list of email addresses, then formats them into a procmail rule.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set l to {} | |
set r to "Archive" --Apple Mail Rule from which to pull addresses | |
set f to "Archive" --Name of folder to move messages from sender to | |
tell application "Mail" | |
set m to properties of rule conditions of rule r | |
repeat with v in m | |
set p to the expression of v | |
set l to l & ".*" & p & "|" as list | |
end repeat | |
end tell | |
return ":0:" & " | |
" & "* ^From:" & l & " | |
" & "." & f & "/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment