|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
29 Dec 2019, 03:06 PM | #1 |
Member
Join Date: Apr 2016
Posts: 67
|
Issues with Rules / not in INBOX?
Hi,
I have some issues with the rules section. I do have a main mail-address and an alias. I created a rule, which sorts all mails coming to alias@domain.de to a subfolder (works like a charm). But if I get a message like: To: main@domain.de CC: alias@domain.de The mail is visible within the subfolder (defined by the rule), but 'not' in my INBOX. Why does it happen and what can I do, as I wrote the mail to main@ and alias@? Hope to get some help over here? |
29 Dec 2019, 06:34 PM | #2 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
the sieve action fileinto is a *move* (not *copy*) action.
If your test only looks for the presence of **alias@domain.de** (and not last the absence of **main@domain.de**) and then **moves** it to the subfolder, there would be no logic to do something different if the email also contains **main@domain.de**. Can you please share your sieve? [edit: typos and clarification] |
29 Dec 2019, 07:45 PM | #3 |
Essential Contributor
Join Date: May 2018
Posts: 474
|
I assume you created a rule that moves a email that matches the alias on the to or cc to place in your alias subfolder. If so that has precedence over the default which would move to the inbox. Using the Rules UI you cannot explicitly file a single message into two mailboxes. But you can by explicitly writing it in the sieve code.
For example, assuming your current rule is, Code:
Any "Cc" email address is exactly alias@domain.de Code:
elsif address :is "CC" "alias@domain.de" { fileinto "INBOX.subfolder"; } In order to get this to filter into both your subfolder and inbox you would need to remove the UI organize rule and explicitly add the following sieve code to your sieve script with a small change: Code:
elsif address :is "CC" "alias@domain.de" { fileinto :copy "INBOX.subfolder"; } One convenient (and logical) place to add this code might be in the last edit box of the sieve script. This is the area following UI generated organize rules code. There you would also use an elsif (as shown) if it isn't the only organize rule. Be aware that while you see two copies of the message in the two folders, if I recall, actions performed on one affect the other. For example marking one as read also marks the other as read. I can't recall if deleting one deletes the other (but I think it does). Not sure I like this behavior but it is what it is. Note I haven't had occasion to test this out for a while so maybe this behavior has changed since then. Note, I am not sure why you would want to send one to a separate folder and the inbox (unless you also are using a POP email client and want it to get it's own copy too -- and not delete the inbox copy from the client) but that's your business and none of mine. Last edited by xyzzy : 29 Dec 2019 at 09:09 PM. |
29 Dec 2019, 08:29 PM | #4 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
could not, for the life of me, remember how to copy (not move). Thanks :-)
Last edited by JamesHenderson : 30 Dec 2019 at 01:58 AM. |
29 Dec 2019, 11:24 PM | #5 |
Member
Join Date: Apr 2016
Posts: 67
|
Thx for your feedback.
I made a standard rule like: Any "To"/"CC"/"BCC" email-address is alias@domain.de > Move the message to subfolder 'aliasfolder". The rule is working. But like I said, if I get a mail from someone who is writing to my main address (mail@domain.de) AND to alias@domain.de then the mail only appears in the subfolder aliasfolder (and is not in my INBOX). Just to clarify... It's one mailbox with an alias. Not two different mailboxes. The alias address is a address from my website (contact address). So everyone who writes to this address the mail should be moved to the alias-subfolder. But it could also be the reason that someone writes to my main-address AND to my alias address (within one mail). Last edited by TheJapanese : 29 Dec 2019 at 11:28 PM. Reason: explanation added |
30 Dec 2019, 02:00 AM | #6 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Are you an ex-Gmail user? I ask because in Fastmail, an email cannot be in two folders at the same time. An email can be copied into another folder but then there are two separate (identical) emails.
|
30 Dec 2019, 02:03 AM | #7 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
Any "To"/"CC"/"BCC" email-address is alias@domain.de and no "To"/"CC"/"BCC" email-address is main@domain.de> move the message to subfolder 'aliasfolder". Any "To"/"CC"/"BCC" email-address is alias@domain.de and any "To"/"CC"/"BCC" email-address is main@domain.de> copy the message to subfolder 'aliasfolder". ...something like this? Code:
if address :is ["To","Cc","Bcc"] "alias@domain.de" { if address :is ["To","Cc","Bcc"] "main@domain.de" { fileinto :copy "INBOX.alias"; } elseif not address :is ["To","Cc","Bcc"] "main@domain.de" { fileinto "INBOX.alias"; } } Last edited by JamesHenderson : 30 Dec 2019 at 02:15 AM. Reason: added code example |
|
30 Dec 2019, 03:15 AM | #8 | |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
Quote:
Using :copy doesn't guarantee that a copy goes into the Inbox (or alternate default folder), but an explicit "keep;" after the fileinto does. |
|
30 Dec 2019, 03:26 AM | #9 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
Code:
if address :is ["To","Cc","Bcc"] "alias@domain.de" { if address :is ["To","Cc","Bcc"] "main@domain.de" { fileinto "INBOX.alias"; keep; } elseif not address :is ["To","Cc","Bcc"] "main@domain.de" { fileinto "INBOX.alias"; } } |
|
30 Dec 2019, 06:24 AM | #10 |
Essential Contributor
Join Date: May 2018
Posts: 474
|
At fileinto :copy or a fileinto without a :copy plus a keep will both work.
And an update to what I said about the effects of this. Deleting one does not delete the other but marking as read or unread does affect the other. Just ran some tests on this to verify both these statements. Last edited by xyzzy : 30 Dec 2019 at 06:30 AM. |
30 Dec 2019, 07:57 AM | #11 | ||
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
Quote:
The point of :copy is that "implicit keep" is an important safety-net and sometimes you want to redirect or fileinto without the side-effect of canceling it. For example, you may want to redirect email to another account without the risk of not have a local copy in your own account. Quote:
|
||
30 Dec 2019, 08:13 AM | #12 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Can you expand on this as I didn’t fully understand it; why would redirect make fileinto :copy not work?
|
30 Dec 2019, 02:45 PM | #13 |
Member
Join Date: Apr 2016
Posts: 67
|
Oh my god - thought that it isn't that kind of a problem?
As I send to two different aliases I thought, this does work without a problem... But looks like it is really really complicated. |
30 Dec 2019, 04:47 PM | #14 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
You are asking for 2 things:
|
|
30 Dec 2019, 06:38 PM | #15 |
Member
Join Date: Apr 2016
Posts: 67
|
That's what I want. Which sieve script do I have to use?
|
Thread Tools | |
|
|