-- PowerMail - Uncertain Spam Condition -- https://c-command.com/scripts/spamsieve/powermail-uncertain-spam -- Summary: Can be used as a mail filter condition to match messages that are barely considered spam. -- Requires: SpamSieve, PowerMail -- Install Location: PowerMail Files/Custom Scripts -- Last Modified: 2019-05-24 tell application "PowerMail" set {_uncertainThreshold} to my lookupKeys({"Border"}, {75}) set _messages to current messages repeat with _message in _messages set _score to spam rating of _message if _score ≥ 50 and _score ≤ _uncertainThreshold then set filter criterion result to true end if end repeat end tell on lookupDefaults(_keys, _defaultValues) tell application "SpamSieve" try set _result to {} repeat with _i from 1 to count of _keys set _key to item _i of _keys set _defaultValue to item _i of _defaultValues set _value to lookup single key _key default value _defaultValue copy _value to end of _result end repeat return _result on error -- SpamSieve 2.9.15 and earlier return lookup keys _keys default values _defaultValues end try end tell end lookupDefaults