-- Apple Mail - Block Reply-To -- https://c-command.com/scripts/spamsieve/apple-mail-block-reply-to -- Summary: Adds a rule to SpamSieve’s blocklist for the selected message’s Reply-To. -- Requires: SpamSieve, Apple Mail -- Install Location: ~/Library/Scripts/Applications/Mail -- Last Modified: 2025-02-25 on run tell application "Mail" set _messages to the selection as list my processMessages(_messages) end tell end run on processMessages(_messages) try repeat with _message in _messages my processMessage(_message) end repeat on error _errorMessage number _errorNumber tell application "SpamSieve" add log entry source "com.c-command.spamsieve.apple-mail.script.block-reply-to" error number _errorNumber message _errorMessage end tell end try end processMessages on processMessage(_message) tell application "Mail" set _address to extract address from _message's reply to end tell tell application "SpamSieve" tell blocklist -- SpamSieve automatically prevents duplicate rules make rule with properties {text to match:_address, match field:reply to field, match style:exact style} end tell end tell end processMessage