|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
3 Sep 2019, 09:54 PM | #16 |
Junior Member
Join Date: Jul 2016
Posts: 23
|
:domain takes the domain part from the address without the "@".
So "@linkedin.com" would never match. |
3 Sep 2019, 09:55 PM | #17 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
got it - thanks!
|
3 Sep 2019, 10:23 PM | #18 |
Essential Contributor
Join Date: Jan 2017
Posts: 280
|
You need the * with :matches because you need to match the whole string. regexes match on substings unless you anchor them, hence the "$". Your ".+" makes no difference at all here.
|
3 Sep 2019, 10:28 PM | #19 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
so, using :domain, I got this to work which is fairly simple as no need to worry about the "@" anymore.
Code:
address :domain :regex "From" "\\.*linkedin\\.com$", |
3 Sep 2019, 10:30 PM | #20 | |
Junior Member
Join Date: Jul 2016
Posts: 23
|
Quote:
So, Fastmail aren't the ones to blame. |
|
3 Sep 2019, 10:51 PM | #21 | |
The "e" in e-mail
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
|
Quote:
Code:
address :domain :regex "From" "linkedin\\.com$", |
|
3 Sep 2019, 10:58 PM | #22 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
Code:
address :regex "From" "[\\.@]linkedin\\.com$", Code:
address :matches "From" "*[.@]linkedin.com", |
|
3 Sep 2019, 11:00 PM | #23 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
So I don't really want to use :domain as I want the first character to be either an "@" or a "." ...works out for me because actually I am putting these rules into the UI (minus the double slashes as FM adds them for me) and I cannot find a way to have "domain in the UI. |
|
3 Sep 2019, 11:01 PM | #24 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
thanks to everyone for their kind and friendly support in solving my problem and helping me learn in the process :-)
|
3 Sep 2019, 11:11 PM | #25 | |
Essential Contributor
Join Date: Jan 2017
Posts: 280
|
Quote:
In sieve a \ is used to escape the double quote character that's normally the string delimiter, and a literal \ itself has to be escaped as \\. Other backslashes are ignored. This is done before the regex string is passed to the regex library. |
|
4 Sep 2019, 12:17 AM | #26 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Brilliant - thanks for that explanation, SideshowBob
|