EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > FastMail Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Stay in touch wirelessly

FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc.

Reply
 
Thread Tools
Old 29 Jun 2021, 11:35 PM   #1
marc1
Essential Contributor
 
Join Date: Sep 2002
Posts: 342
Rule based on fetch?

Hi all,

Wondering if you know how can I setup a rule based on either an email POP fetch or a folder?

In other words, once a mail is fetched, I want to perform certain actions. Or if a mail is fetched and placed into a folder, then based on the email being in that folder, perform certain actions.

The problem is have is the TO/CC/BCC option is too vague as Emails being fetched and emails already in my inbox match both conditions.

Thanks
marc1 is offline   Reply With Quote

Old 30 Jun 2021, 02:17 AM   #2
somdcomputerguy
Cornerstone of the Community
 
Join Date: Jun 2004
Location: Rupert, WV
Posts: 725
Look at the full header in both emails (fetched, non-fetched(already there)), there's probably something there you can use.

- Bruce
somdcomputerguy is offline   Reply With Quote
Old 30 Jun 2021, 12:55 PM   #3
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 361
Quote:
Originally Posted by marc1 View Post
In other words, once a mail is fetched, I want to perform certain actions. Or if a mail is fetched and placed into a folder, then based on the email being in that folder, perform certain actions.
Not sure exactly what you are trying to filter on but realize that the only actions you can perform on an email message is at the time the server delivers it to your sieve script. The only thing sieve can "see" is the incoming message and whether mailboxes already exist or not.

As mentioned above, if the To/CC/BCC is not unique enough then look for something else in the headers that is (Delivered-To, X-Original-Delivered-To, X-Resolved-To, something in the body, whatever).
xyzzy is offline   Reply With Quote
Old 30 Jun 2021, 01:46 PM   #4
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,705
Arrow Searches may be what you need to use

I was going to say what xyzzy said. Rules use the Sieve language, and your Sieve script only runs when a new message is directly received via POP or IMAP to your account. In other words, the message is addressed to your Fastmail email address (or forwarded to that address).

You might want to find messages which were fetched from another email account. Fetching is when Fastmail automatically logs into another email account automatically and fetches any messages there into your Fastmail account. In this case, the email is addressed to a non-Fastmail address and Fastmail pulls it info your account by periodically logging into the other email service and fetching any new messages. See:
https://www.fastmail.help/hc/en-us/a...mail-addresses

If you want to manually search for these fetched messages (ignoring the messages received via POP or IMAP), try using this search string:
Code:
header:X-Resolved-to -header:X-Delivered-To
If you want to find messages which meet some criteria, you should be using the search feature while using the Fastmail web interface or smartphone app. You can save your searches so they can be easily repeated in the future. See:
https://www.fastmail.help/hc/en-us/a...hing-your-mail

Searches can find words inside attachments as well as the addressing fields, subject, message body, and the email headers. Searches by default use stemming, so that a search for meet also finds meets, meeting, and meetings. If you only want to find meet without the stemmed words, add quotes around your search string.

For example, you could search for all messages sent from a Gmail account where the name of the sender includes the word "John" and the subject includes the word "GPS", use the search string:
Code:
from:gmail from:john subject:GPS
By default, searches work across your Inbox and all of your folders. You can search in only one folder by including in:foldername in the search string.

Bill
n5bb is offline   Reply With Quote
Old 30 Jun 2021, 03:54 PM   #5
BritTim
The "e" in e-mail
 
Join Date: May 2003
Location: mostly in Thailand
Posts: 2,889
In the distant past, each POP link was associated with a mail header of X-LinkName. This was very convenient when filtering based specifically on messages received using that POP link. There are now simple, but not 100% reliable, ways (Bill gives one); or fairly messy ones (such as a Contains search on Received headers looking for one containing 'with POP3 for <your-fastmail-account>').
BritTim is offline   Reply With Quote
Old 30 Jun 2021, 10:29 PM   #6
hadaso
The "e" in e-mail
 
Join Date: Oct 2002
Location: Holon, Israel.
Posts: 4,576
I have an X-LinkName header in an email fetched by Fastmail a couple of months ago (may 4th) from Hotmail using POP3
It also has X-LinkUIDL and X-LinkId headers.
hadaso is offline   Reply With Quote
Old 1 Jul 2021, 05:06 AM   #7
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 361
Quote:
Originally Posted by hadaso View Post
I have an X-LinkName header in an email fetched by Fastmail a couple of months ago (may 4th) from Hotmail using POP3
It also has X-LinkUIDL and X-LinkId headers.
X-LinkName is checked by the standard backscatter test in Sieve's section 3 so I have to assume it's a reliable test to check for messages coming from mail fetch identities (old name "POP links") you defined.

Last edited by xyzzy : 1 Jul 2021 at 05:16 AM.
xyzzy is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 12:18 AM.

 

Copyright EmailDiscussions.com 1998-2013. All Rights Reserved. Privacy Policy