Tuesday, May 11, 2021

#1 2021-04-05 09:42:12 am

scrutinizer82
Member
Registered: 2015-08-04
Posts: 109

What is mail rule headers?

The question is in the subject.


Scripting in Mac OS X 10.7.5, OS X 10.9.5, macOS 10.14.6

Offline

 

#2 2021-04-05 01:45:42 pm

KniazidisR
Member
From:: Greece
Registered: 2019-03-03
Posts: 1797

Re: What is mail rule headers?

scrutinizer82 wrote:

The question is in the subject.


Doesn't exist mail rule headers, but exist message headers. To view email headers in Apple Mail:

Open the message for which you wish to view headers.
From the menu, select View –> Message –> Raw Source.
The full message is displayed with all headers. You can now select the message header for copying.

Here is one example. Bold words are what you call mail rule headers, but they are message headers. You can simply use some of them (From, To, Subject) in the rule conditions, and that is all:

From: Robert Kniazidis <KNIAZIDIS.ROMPERT@gmail.com>
Content-Type: text/plain;
    charset=us-ascii
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Subject: ubfg-210312-gg-proposal for contract
X-Universally-Unique-Identifier: 04A6E7B9-7D59-43D7-A2DD-110D3577F982
Message-Id: <8B42D539-A005-42F0-9FC5-2EF32189B432@gmail.com>
Date: Tue, 23 Mar 2021 21:12:40 +0200
To: Robert Kniazidis <kniazidis.rompert@gmail.com>

Last edited by KniazidisR (2021-04-05 02:10:42 pm)


Model: MacBook Pro
OS X: Catalina 10.15.4
Web Browser: Safari 14.1
Ram: 4 GB

Offline

 

#3 2021-04-05 04:05:41 pm

scrutinizer82
Member
Registered: 2015-08-04
Posts: 109

Re: What is mail rule headers?

I was talking about these rule headers (highlighted):

aHSUH35.png

Were you too?


Scripting in Mac OS X 10.7.5, OS X 10.9.5, macOS 10.14.6

Offline

 

#4 2021-04-05 05:10:06 pm

Marc Anthony
Member
From:: Dallas, TX
Registered: 2006-04-27
Posts: 1017

Re: What is mail rule headers?

It's a field that's invisible to the end user in the real world, and it appears largely inert with limited utility. Were you to explicitly set it, you could filter for it:

rule 1's rule conditions whose its header is "WHATEVER YOU NAMED IT"

Offline

 

#5 2021-04-05 10:33:16 pm

KniazidisR
Member
From:: Greece
Registered: 2019-03-03
Posts: 1797

Re: What is mail rule headers?

scrutinizer82 wrote:

I was talking about these rule headers (highlighted):

https://i.imgur.com/aHSUH35.png


It is not mail rule header but rule condition's header key. The Mail.app has by default 4 message headers for conditions: From, To, Cc, Subject.

But as you can see, the message headers are > 4. The header key of rule condition gives you possibility to add the rest message headers to condition (Content-Type, Content-Transfer-Encoding, Mime-Version, X-Universally-Unique-Identifier, Message-Id, Date).

First, run this in the Script Debugger:

Applescript:

tell application "Mail" to rules

Now, open some existing condition of some existing rule to see its properties. Then, change manually value of header property from "" to "Message_Id", then run script above again. Your Mail.app now remeber and knows 1 additional message header: Message_Id, and you can use it as well as 4 default headers of Mail.app. You can continue the same way and add rest headers as well.

Other manual way is: go Mail-->Preferences-->Rules-->Edit some certain rule-->Open popup menu-->Edit header list, add some message header name, which isn't already in the list

Last edited by KniazidisR (2021-04-05 11:26:13 pm)


Model: MacBook Pro
OS X: Catalina 10.15.4
Web Browser: Safari 14.1
Ram: 4 GB

Offline

 

#6 2021-04-05 11:38:07 pm

scrutinizer82
Member
Registered: 2015-08-04
Posts: 109

Re: What is mail rule headers?

Are you implying that the rule condition's "header" property denotes the extended set of Mail message headers? According to Marc Anthony these are arbitrary words. I'm confused.


Scripting in Mac OS X 10.7.5, OS X 10.9.5, macOS 10.14.6

Offline

 

#7 2021-04-05 11:49:06 pm

KniazidisR
Member
From:: Greece
Registered: 2019-03-03
Posts: 1797

Re: What is mail rule headers?

scrutinizer82 wrote:

Are you implying that the rule condition's "header" property denotes the extended set of Mail message headers?


Yes. Logically it is true, but I never tested this logical conclusion.


Model: MacBook Pro
OS X: Catalina 10.15.4
Web Browser: Safari 14.1
Ram: 4 GB

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)