如何通过单个测试过滤和解决?


2

我似乎无法找到一种简单的方法来过滤来自或来自给定地址的邮件。您似乎必须复制地址并使用两个条件,例如

From - contains - fred@nowehere.com
Any recipient - contains - fred@nowehere.com

我希望“任何收件人”可能包括“发件人”,但似乎它只包括“收件人”,“抄送员”,“密送”等。


1
我错过了什么吗?你不能只设置一个具有这两个条件的规则并any在弹出窗口中选择:“如果满足以下任何条件:”使用两个条件有什么问题?
ghoppe 2011年

问题是我有很多过滤器,其中一些有几个电子邮件地址所以我必须经历所有这些重复每个From:test并使其成为Any收件人:test - 一个维护头痛以及所有初始痛。我有时想念Eudora ......
Paul R

Answers:


2

不幸的是,规则非常有限,但您有时可以使用智能邮箱来帮助您解决问题。

例如,如果您需要在满足条件(A OR B)和C时执行操作的规则,则可以设置名为“X”的智能邮箱,其中包含所有(A OR B)为真的电子邮件,然后第二个名为Y的智能邮箱,其中包含所有电子邮件(C为真且邮箱为X)。

如有必要,您可以设置一个规则来执行您需要对邮箱Y的内容执行的任何处理,并根据需要手动运行它(选择邮箱Y中的所有邮件,然后选择消息 - >应用规则)。


感谢这个建议 - 一个横向思维的一点点 - 我不确定它对我的特定问题有帮助,但我可以看到它在其他情况下可能是一个有用的技巧。
保罗R

2

这个问题再次出现在我的雷达上,因为我的评论被投了票,但仍然没有好的答案所以我会更加努力。;)这是一个有趣的练习。

你说你“有很多过滤器,其中一些有几个电子邮件地址所以我必须经历所有这些重复每一个来自:测试并使其成为任何收件人:测试 - 维护头痛以及所有初始痛”

可以通过Applescript的魔力消除这种维护问题。以下脚本接收在Apple Mail中选择的邮件,通过所有“发件人”字段查找尚未拥有这些“来自/任何收件人”规则的新发件人,如果没有,则使用“来自” /任何收件人“规则条件。

我不确定你正在使用邮件规则做什么,但我会假设你正在为每个邮件“对话”设置每个电子邮件地址的文件夹。我只搜索“from”标题来设置这些,因为电子邮件可能有很多收件人。它很粗糙,准备好了,你会想要自己修改它。例如,我不对邮箱名称进行任何健全性检查,带正斜杠的名称将导致生成额外的邮箱。

这里是!

tell application "Mail"
    set _sel to get selected messages of first message viewer
    repeat with _msg in _sel
        set _senderEmail to extract address from sender of _msg
        set _ruleName to "Conversations with <" & _senderEmail & ">"
        set _mailRules to rules
        set foundIt to false
        repeat with _rule in _mailRules
            if ((extract address from name of _rule) is _senderEmail) then
                set foundIt to true
                exit repeat
            end if
        end repeat
        if not foundIt then
            set _senderName to "Conversations/" & (extract name from sender of _msg)
            if not (mailbox _senderName exists) then
                make new mailbox at end of mailboxes with properties {name:_senderName}
            end if
            set _destination to (mailbox _senderName)
            set newRule to make new rule at end of rules with properties {name:_ruleName, enabled:true, should move message:true, all conditions must be met:false}
            tell newRule
                make new rule condition at end of rule conditions with properties {rule type:from header, expression:_senderEmail, qualifier:does contain value}
                make new rule condition at end of rule conditions with properties {rule type:any recipient, expression:_senderEmail, qualifier:does contain value}
                set move message to _destination
            end tell
        end if
    end repeat
end tell

非常感谢 - 我可能能够根据我的需求调整脚本。
保罗R
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.