EmailDiscussions.com

EmailDiscussions.com (http://www.emaildiscussions.com/index.php)
-   FastMail Forum (http://www.emaildiscussions.com/forumdisplay.php?f=27)
-   -   Rule based on fetch? (http://www.emaildiscussions.com/showthread.php?t=78715)

marc1 29 Jun 2021 11:35 PM

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

somdcomputerguy 30 Jun 2021 02:17 AM

Look at the full header in both emails (fetched, non-fetched(already there)), there's probably something there you can use.

- Bruce

xyzzy 30 Jun 2021 12:55 PM

Quote:

Originally Posted by marc1 (Post 621713)
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).

n5bb 30 Jun 2021 01:46 PM

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

BritTim 30 Jun 2021 03:54 PM

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>').

hadaso 30 Jun 2021 10:29 PM

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.

xyzzy 1 Jul 2021 05:06 AM

Quote:

Originally Posted by hadaso (Post 621732)
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.


All times are GMT +9. The time now is 04:46 AM.


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